forked from qt-creator/qt-creator
Fixed a crash on exit when include files are still being scanned
Found by Roberto.
(cherry picked from commit b07c1be547
)
This commit is contained in:
@@ -728,7 +728,7 @@ QByteArray CppModelManager::internalDefinedMacros() const
|
||||
return macros;
|
||||
}
|
||||
|
||||
void CppModelManager::setIncludesInPaths(const QMap<QString, QStringList> includesInPaths)
|
||||
void CppModelManager::setIncludesInPaths(const QMap<QString, QStringList> &includesInPaths)
|
||||
{
|
||||
QMutexLocker locker(&mutex);
|
||||
QMapIterator<QString, QStringList> i(includesInPaths);
|
||||
@@ -1178,7 +1178,7 @@ void CppModelManager::updateIncludesInPaths(QFutureInterface<void> &future,
|
||||
future.waitForResume();
|
||||
|
||||
if (future.isCanceled())
|
||||
break;
|
||||
return;
|
||||
|
||||
const QString path = paths.takeFirst();
|
||||
|
||||
|
@@ -162,7 +162,7 @@ private:
|
||||
QStringList internalFrameworkPaths() const;
|
||||
QByteArray internalDefinedMacros() const;
|
||||
|
||||
void setIncludesInPaths(const QMap<QString, QStringList> includesInPaths);
|
||||
void setIncludesInPaths(const QMap<QString, QStringList> &includesInPaths);
|
||||
|
||||
static void updateIncludesInPaths(QFutureInterface<void> &future,
|
||||
CppModelManager *manager,
|
||||
|
Reference in New Issue
Block a user