forked from qt-creator/qt-creator
CompilationDataBasePM: Do not delay creating targets
A target can/should handle/use unparsed projects just fine. Change-Id: I54b8399eab4b4fe7ead2de3cef8ab25cc7bbc621 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -405,12 +405,7 @@ CompilationDatabaseProject::CompilationDatabaseProject(const Utils::FilePath &pr
|
|||||||
setPreferredKitPredicate([](const Kit *) { return false; });
|
setPreferredKitPredicate([](const Kit *) { return false; });
|
||||||
|
|
||||||
m_kit.reset(KitManager::defaultKit()->clone());
|
m_kit.reset(KitManager::defaultKit()->clone());
|
||||||
connect(this, &CompilationDatabaseProject::parsingFinished, this, [this]() {
|
|
||||||
if (!m_hasTarget) {
|
|
||||||
addTarget(createTarget(m_kit.get()));
|
addTarget(createTarget(m_kit.get()));
|
||||||
m_hasTarget = true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
connect(this, &CompilationDatabaseProject::rootProjectDirectoryChanged,
|
connect(this, &CompilationDatabaseProject::rootProjectDirectoryChanged,
|
||||||
m_parseDelay, QOverload<>::of(&QTimer::start));
|
m_parseDelay, QOverload<>::of(&QTimer::start));
|
||||||
|
@@ -74,7 +74,6 @@ private:
|
|||||||
MimeBinaryCache m_mimeBinaryCache;
|
MimeBinaryCache m_mimeBinaryCache;
|
||||||
QTimer * const m_parseDelay;
|
QTimer * const m_parseDelay;
|
||||||
CompilationDbParser *m_parser = nullptr;
|
CompilationDbParser *m_parser = nullptr;
|
||||||
bool m_hasTarget = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class CompilationDatabaseEditorFactory : public TextEditor::TextEditorFactory
|
class CompilationDatabaseEditorFactory : public TextEditor::TextEditorFactory
|
||||||
|
Reference in New Issue
Block a user