summaryrefslogtreecommitdiff
path: root/src/plugins/compilationdatabaseprojectmanager
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2019-08-01 14:06:37 +0200
committerhjk <hjk@qt.io>2019-08-01 15:22:59 +0000
commit79f9449f68855280caf9a79aa709b18f2089dd00 (patch)
tree294cda3cce5fa7e3c31e59ff50f46b57c070de53 /src/plugins/compilationdatabaseprojectmanager
parent2e14df7561ee10c7a408bd3ebb4944016ecdd1f4 (diff)
downloadqt-creator-79f9449f68855280caf9a79aa709b18f2089dd00.tar.gz
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>
Diffstat (limited to 'src/plugins/compilationdatabaseprojectmanager')
-rw-r--r--src/plugins/compilationdatabaseprojectmanager/compilationdatabaseproject.cpp7
-rw-r--r--src/plugins/compilationdatabaseprojectmanager/compilationdatabaseproject.h1
2 files changed, 1 insertions, 7 deletions
diff --git a/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseproject.cpp b/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseproject.cpp
index 4c4eb20a7e..0dc865bd4e 100644
--- a/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseproject.cpp
+++ b/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseproject.cpp
@@ -405,12 +405,7 @@ CompilationDatabaseProject::CompilationDatabaseProject(const Utils::FilePath &pr
setPreferredKitPredicate([](const Kit *) { return false; });
m_kit.reset(KitManager::defaultKit()->clone());
- connect(this, &CompilationDatabaseProject::parsingFinished, this, [this]() {
- if (!m_hasTarget) {
- addTarget(createTarget(m_kit.get()));
- m_hasTarget = true;
- }
- });
+ addTarget(createTarget(m_kit.get()));
connect(this, &CompilationDatabaseProject::rootProjectDirectoryChanged,
m_parseDelay, QOverload<>::of(&QTimer::start));
diff --git a/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseproject.h b/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseproject.h
index 7597e78cc3..2ea4b870ec 100644
--- a/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseproject.h
+++ b/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseproject.h
@@ -74,7 +74,6 @@ private:
MimeBinaryCache m_mimeBinaryCache;
QTimer * const m_parseDelay;
CompilationDbParser *m_parser = nullptr;
- bool m_hasTarget = false;
};
class CompilationDatabaseEditorFactory : public TextEditor::TextEditorFactory