Launcher: fix for unreliable aircraft-dir scanning
This commit is contained in:
parent
d127a6ff9a
commit
58fa9fcaa7
2 changed files with 6 additions and 1 deletions
|
@ -418,8 +418,12 @@ void LocalAircraftCache::scanDirs()
|
|||
m_scanThread = new AircraftScanThread(dirs);
|
||||
connect(m_scanThread, &AircraftScanThread::finished, this,
|
||||
&LocalAircraftCache::onScanFinished);
|
||||
// force a queued connection here since we the scan thread object still
|
||||
// belongs to the same thread as us, and hence this would otherwise be
|
||||
// a direct connection
|
||||
connect(m_scanThread, &AircraftScanThread::addedItems,
|
||||
this, &LocalAircraftCache::onScanResults);
|
||||
this, &LocalAircraftCache::onScanResults,
|
||||
Qt::QueuedConnection);
|
||||
m_scanThread->start();
|
||||
|
||||
emit scanStarted();
|
||||
|
|
|
@ -197,6 +197,7 @@ QVariantList QmlAircraftInfo::previews() const
|
|||
}
|
||||
result.append(QUrl::fromLocalFile(QString::fromStdString(localPreviewPath.utf8Str())));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// return remote urls
|
||||
|
|
Loading…
Add table
Reference in a new issue