diff --git a/src/GUI/LocalAircraftCache.cxx b/src/GUI/LocalAircraftCache.cxx index 8d9aec8fe..5ed2d707f 100644 --- a/src/GUI/LocalAircraftCache.cxx +++ b/src/GUI/LocalAircraftCache.cxx @@ -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(); diff --git a/src/GUI/QmlAircraftInfo.cxx b/src/GUI/QmlAircraftInfo.cxx index f35526deb..6a3ce4e70 100644 --- a/src/GUI/QmlAircraftInfo.cxx +++ b/src/GUI/QmlAircraftInfo.cxx @@ -197,6 +197,7 @@ QVariantList QmlAircraftInfo::previews() const } result.append(QUrl::fromLocalFile(QString::fromStdString(localPreviewPath.utf8Str()))); } + return result; } // return remote urls