diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectplugin.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectplugin.cpp index 0178164b39c..1551030ce0b 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectplugin.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeprojectplugin.cpp @@ -31,6 +31,8 @@ #include #include +#include + 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)