diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2018-06-29 13:33:12 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2018-06-29 13:43:03 +0000 |
commit | 1c014c757378c0329ea49ce5469a04438738d810 (patch) | |
tree | 8f4431e055d23193ee90aeb9f0e95d013eb8a24b /src/plugins/cmakeprojectmanager | |
parent | 9c1fd4c2aa30344f837162c6dda5d125792319e0 (diff) | |
download | qt-creator-1c014c757378c0329ea49ce5469a04438738d810.tar.gz |
CMake: Remove handling of legacy settings for CMake
Remove the code that reads CMake tool location from the Qt Creator settings
and then removes them from there.
This code was added in QtC 4.1 to ease transition to the (back then) new
cmaketools.xml settings file.
Change-Id: Ice96628159f4171716882cfdefc8991ec2341556
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/cmakeprojectmanager')
-rw-r--r-- | src/plugins/cmakeprojectmanager/cmaketoolmanager.cpp | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmaketoolmanager.cpp b/src/plugins/cmakeprojectmanager/cmaketoolmanager.cpp index 0d58a6d9e2..97e7021f14 100644 --- a/src/plugins/cmakeprojectmanager/cmaketoolmanager.cpp +++ b/src/plugins/cmakeprojectmanager/cmaketoolmanager.cpp @@ -110,35 +110,6 @@ static QList<CMakeTool *> readCMakeTools(const FileName &fileName, Core::Id *def return loaded; } -static void readAndDeleteLegacyCMakeSettings () -{ - // restore the legacy cmake - QSettings *settings = ICore::settings(); - settings->beginGroup(QLatin1String("CMakeSettings")); - - FileName exec = FileName::fromUserInput(settings->value(QLatin1String("cmakeExecutable")).toString()); - if (exec.toFileInfo().isExecutable()) { - CMakeTool *item = CMakeToolManager::findByCommand(exec); - if (!item) { - item = new CMakeTool(CMakeTool::ManualDetection, CMakeTool::createId()); - item->setCMakeExecutable(exec); - item->setDisplayName(CMakeToolManager::tr("CMake at %1").arg(item->cmakeExecutable().toUserOutput())); - - if (!CMakeToolManager::registerCMakeTool(item)) { - delete item; - item = nullptr; - } - } - - //this setting used to be the default cmake, make sure it is again - if (item) - d->m_defaultCMake = item->id(); - } - - settings->remove(QString()); - settings->endGroup(); -} - static QList<CMakeTool *> autoDetectCMakeTools() { Utils::Environment env = Environment::systemEnvironment(); @@ -387,8 +358,6 @@ void CMakeToolManager::restoreCMakeTools() if (CMakeToolManager::findById(defaultId)) d->m_defaultCMake = defaultId; - // restore the legacy cmake settings only once and keep them around - readAndDeleteLegacyCMakeSettings(); emit m_instance->cmakeToolsLoaded(); } |