ProjectExplorer: Make "Manage..." kits button work again

When configuring a newly opened or created project you are
able to press a 'Manage...' button that brings up the
options page of the kits. Was broken with the rework done
on the global object pool.

Change-Id: I87d91351c5769655c1192431a53784de1bca77aa
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2018-04-24 15:07:02 +02:00
parent ef9c5e47bb
commit f8937daf71
4 changed files with 16 additions and 9 deletions

View File

@@ -42,8 +42,6 @@
#include <coreplugin/icore.h>
#include <coreplugin/idocument.h>
#include <extensionsystem/pluginmanager.h>
#include <utils/algorithm.h>
#include <utils/basetreeview.h>
#include <utils/navigationtreeview.h>
@@ -531,8 +529,8 @@ public:
void handleManageKits()
{
if (ProjectItem *projectItem = m_projectsModel.rootItem()->childAt(0)) {
if (KitOptionsPage *page = ExtensionSystem::PluginManager::getObject<KitOptionsPage>())
page->showKit(KitManager::kit(Id::fromSetting(projectItem->data(0, KitIdRole))));
if (auto kitPage = KitOptionsPage::instance())
kitPage->showKit(KitManager::kit(Id::fromSetting(projectItem->data(0, KitIdRole))));
}
ICore::showOptionsDialog(Constants::KITS_SETTINGS_PAGE_ID, ICore::mainWindow());
}