Merge pull request #143 from dirk-de-bugger/ShowBusyDuringScraping

Make Scraper non-blocking
This commit is contained in:
Jools Wills 2017-05-31 16:43:41 +01:00 committed by GitHub
commit 4688a6dbec
2 changed files with 3 additions and 2 deletions

View file

@ -205,6 +205,8 @@ void ScraperSearchComponent::updateViewStyle()
void ScraperSearchComponent::search(const ScraperSearchParams& params)
{
mBlockAccept = true;
mResultList->clear();
mScraperResults.clear();
mThumbnailReq.reset();

View file

@ -41,7 +41,7 @@ void ScraperSearchHandle::update()
if(mStatus == ASYNC_DONE)
return;
while(!mRequestQueue.empty())
if(!mRequestQueue.empty())
{
auto& req = mRequestQueue.front();
AsyncHandleStatus status = req->status();
@ -62,7 +62,6 @@ void ScraperSearchHandle::update()
if(status == ASYNC_DONE)
{
mRequestQueue.pop();
continue;
}
// status == ASYNC_IN_PROGRESS