summaryrefslogtreecommitdiff
path: root/src/plugins/cmakeprojectmanager
diff options
context:
space:
mode:
authorMarcus Tillmanns <marcus.tillmanns@qt.io>2022-09-29 10:11:28 +0200
committerMarcus Tillmanns <marcus.tillmanns@qt.io>2022-10-06 05:16:36 +0000
commit8d80623a0f6885810bbfe8448128d5fbc7cc9ddb (patch)
tree1b5c0113e19fccd9b95efe544e30f35a1f1e2db1 /src/plugins/cmakeprojectmanager
parent1748c6e80be30c02975ab3f5547dd8aeaa3962d2 (diff)
downloadqt-creator-8d80623a0f6885810bbfe8448128d5fbc7cc9ddb.tar.gz
CMake: Delay restoration until devices load
If the devices have not loaded yet, trying to restore a remote cmake will result in errors. Change-Id: I08a802441d64b203388334e5cbb6b962d1f0d213 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Diffstat (limited to 'src/plugins/cmakeprojectmanager')
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeprojectplugin.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectplugin.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectplugin.cpp
index 0178164b39..1551030ce0 100644
--- a/src/plugins/cmakeprojectmanager/cmakeprojectplugin.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeprojectplugin.cpp
@@ -31,6 +31,8 @@
#include <utils/fsengine/fileiconprovider.h>
#include <utils/parameteraction.h>
+#include <QTimer>
+
using namespace Core;
using namespace ProjectExplorer;
using namespace Utils;
@@ -118,8 +120,8 @@ bool CMakeProjectPlugin::initialize(const QStringList & /*arguments*/, QString *
void CMakeProjectPlugin::extensionsInitialized()
{
- //restore the cmake tools before loading the kits
- CMakeToolManager::restoreCMakeTools();
+ // Delay the restoration to allow the devices to load first.
+ QTimer::singleShot(0, this, [] { CMakeToolManager::restoreCMakeTools(); });
}
void CMakeProjectPlugin::updateContextActions(Node *node)