forked from openkylin/ukui-search
完善应用搜索中断返回逻辑;
This commit is contained in:
parent
3eddcd3f90
commit
e73366e7f0
|
@ -65,7 +65,6 @@ AppSearchWorker::AppSearchWorker(AppSearchTask *AppSarchTask, std::shared_ptr<Se
|
||||||
void AppSearchWorker::run()
|
void AppSearchWorker::run()
|
||||||
{
|
{
|
||||||
m_currentSearchId = m_searchController->getCurrentSearchId();
|
m_currentSearchId = m_searchController->getCurrentSearchId();
|
||||||
bool finished = true;
|
|
||||||
QStringList results;
|
QStringList results;
|
||||||
QStringList keyWords = m_searchController->getKeyword();
|
QStringList keyWords = m_searchController->getKeyword();
|
||||||
ResultDataTypes dataType = m_searchController->getResultDataType(SearchType::Application);
|
ResultDataTypes dataType = m_searchController->getResultDataType(SearchType::Application);
|
||||||
|
@ -94,6 +93,7 @@ void AppSearchWorker::run()
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "Search id changed!";
|
qDebug() << "Search id changed!";
|
||||||
m_searchController->finishSearchIdCheck();
|
m_searchController->finishSearchIdCheck();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (m_searchController->isSearchOnlineApps()) {
|
if (m_searchController->isSearchOnlineApps()) {
|
||||||
|
@ -130,15 +130,17 @@ void AppSearchWorker::run()
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "Search id changed!";
|
qDebug() << "Search id changed!";
|
||||||
m_searchController->finishSearchIdCheck();
|
m_searchController->finishSearchIdCheck();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
qWarning() << "SoftWareCenter dbus called failed!" << reply.error();
|
qWarning() << "SoftWareCenter dbus called failed!" << reply.error();
|
||||||
|
sendErrorMsg(QString("SoftWareCenter dbus called failed!") + reply.error().message());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (finished) QMetaObject::invokeMethod(m_AppSearchTask, "searchFinished", Q_ARG(size_t, m_currentSearchId));
|
QMetaObject::invokeMethod(m_AppSearchTask, "searchFinished", Q_ARG(size_t, m_currentSearchId));
|
||||||
}
|
}
|
||||||
|
|
||||||
AppSearchWorker::~AppSearchWorker()
|
AppSearchWorker::~AppSearchWorker()
|
||||||
|
|
Loading…
Reference in New Issue