summaryrefslogtreecommitdiff
path: root/src/plugins/compilationdatabaseprojectmanager
diff options
context:
space:
mode:
authorIvan Donchevskii <ivan.donchevskii@qt.io>2018-11-02 10:00:20 +0100
committerIvan Donchevskii <ivan.donchevskii@qt.io>2018-11-02 13:37:13 +0000
commitfb25bd53c118490935db377e3948297ed44cf2c0 (patch)
treec60e165b1d92feb8712e00107f79d9e51ff55940 /src/plugins/compilationdatabaseprojectmanager
parent6cdcae528dc72c8deab0ad60630242142fd3ab5d (diff)
downloadqt-creator-fb25bd53c118490935db377e3948297ed44cf2c0.tar.gz
CompilationDatabase: Create target in the same thread
Causes a warning otherwise. Change-Id: I040c3298e7c0898364b49ff4c6605f11f01c538f Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Diffstat (limited to 'src/plugins/compilationdatabaseprojectmanager')
-rw-r--r--src/plugins/compilationdatabaseprojectmanager/compilationdatabaseproject.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseproject.cpp b/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseproject.cpp
index 2da1135fe4..48a3879d62 100644
--- a/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseproject.cpp
+++ b/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseproject.cpp
@@ -302,8 +302,6 @@ void CompilationDatabaseProject::buildTreeAndProjectParts(const Utils::FileName
setRootProjectNode(std::move(root));
- addTarget(createTarget(m_kit.get()));
-
m_cppCodeModelUpdater->update({this, cToolchain, cxxToolchain, m_kit.get(), rpps});
emitParsingFinished(true);
@@ -321,6 +319,9 @@ CompilationDatabaseProject::CompilationDatabaseProject(const Utils::FileName &pr
m_kit.reset(KitManager::defaultKit()->clone());
+ connect(this, &CompilationDatabaseProject::parsingFinished,
+ this, [this]() { addTarget(createTarget(m_kit.get())); });
+
emitParsingStarted();
const QFuture<void> future = ::Utils::runAsync([this, projectFile](){