Fix the problem that the online app will not be shown because of timeout.
This commit is contained in:
parent
1134ffc8be
commit
c0c634f980
|
@ -72,7 +72,7 @@ void ReceiveResultThread::stop()
|
||||||
|
|
||||||
void ReceiveResultThread::run()
|
void ReceiveResultThread::run()
|
||||||
{
|
{
|
||||||
QDeadlineTimer deadline(3000);
|
QDeadlineTimer deadline(25000);
|
||||||
while(!isInterruptionRequested()) {
|
while(!isInterruptionRequested()) {
|
||||||
SearchPluginIface::ResultInfo oneResult = m_resultQueue->tryDequeue();
|
SearchPluginIface::ResultInfo oneResult = m_resultQueue->tryDequeue();
|
||||||
if(oneResult.name.isEmpty()) {
|
if(oneResult.name.isEmpty()) {
|
||||||
|
@ -82,7 +82,7 @@ void ReceiveResultThread::run()
|
||||||
this->requestInterruption();
|
this->requestInterruption();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
deadline.setRemainingTime(3000);
|
deadline.setRemainingTime(25000);
|
||||||
Q_EMIT gotResultInfo(oneResult);
|
Q_EMIT gotResultInfo(oneResult);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,6 +86,8 @@ void AppSearchPlugin::KeywordSearch(QString keyword, DataQueue<SearchPluginIface
|
||||||
void AppSearchPlugin::stopSearch()
|
void AppSearchPlugin::stopSearch()
|
||||||
{
|
{
|
||||||
m_appSearchTask->stop();
|
m_appSearchTask->stop();
|
||||||
|
this->requestInterruption();
|
||||||
|
this->wait();
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<SearchPluginIface::Actioninfo> AppSearchPlugin::getActioninfo(int type)
|
QList<SearchPluginIface::Actioninfo> AppSearchPlugin::getActioninfo(int type)
|
||||||
|
@ -173,7 +175,7 @@ QWidget *AppSearchPlugin::detailPage(const ResultInfo &ri)
|
||||||
|
|
||||||
void AppSearchPlugin::run()
|
void AppSearchPlugin::run()
|
||||||
{
|
{
|
||||||
QDeadlineTimer deadline(3000);
|
QDeadlineTimer deadline(25000);
|
||||||
while(!isInterruptionRequested()) {
|
while(!isInterruptionRequested()) {
|
||||||
ResultItem oneResult = m_appSearchResults->tryDequeue();
|
ResultItem oneResult = m_appSearchResults->tryDequeue();
|
||||||
SearchResultPropertyMap data = oneResult.getAllValue();
|
SearchResultPropertyMap data = oneResult.getAllValue();
|
||||||
|
@ -185,7 +187,7 @@ void AppSearchPlugin::run()
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
deadline.setRemainingTime(3000);
|
deadline.setRemainingTime(25000);
|
||||||
SearchPluginIface::ResultInfo ri;
|
SearchPluginIface::ResultInfo ri;
|
||||||
|
|
||||||
ri.name = data.value(SearchProperty::SearchResultProperty::ApplicationLocalName).toString();
|
ri.name = data.value(SearchProperty::SearchResultProperty::ApplicationLocalName).toString();
|
||||||
|
|
Loading…
Reference in New Issue