1
0
Fork 0

Launcher: fix for unreliable aircraft-dir scanning

This commit is contained in:
James Turner 2017-12-09 09:32:25 +00:00
parent d127a6ff9a
commit 58fa9fcaa7
2 changed files with 6 additions and 1 deletions

View file

@ -418,8 +418,12 @@ void LocalAircraftCache::scanDirs()
m_scanThread = new AircraftScanThread(dirs); m_scanThread = new AircraftScanThread(dirs);
connect(m_scanThread, &AircraftScanThread::finished, this, connect(m_scanThread, &AircraftScanThread::finished, this,
&LocalAircraftCache::onScanFinished); &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, connect(m_scanThread, &AircraftScanThread::addedItems,
this, &LocalAircraftCache::onScanResults); this, &LocalAircraftCache::onScanResults,
Qt::QueuedConnection);
m_scanThread->start(); m_scanThread->start();
emit scanStarted(); emit scanStarted();

View file

@ -197,6 +197,7 @@ QVariantList QmlAircraftInfo::previews() const
} }
result.append(QUrl::fromLocalFile(QString::fromStdString(localPreviewPath.utf8Str()))); result.append(QUrl::fromLocalFile(QString::fromStdString(localPreviewPath.utf8Str())));
} }
return result;
} }
// return remote urls // return remote urls