ProjectWindow: Remove special handling for TargetSettingsPanelWidget

Instead hide it in a standard IProjectPanelFactory

Change-Id: I7e49b7be00e26c5f33e32d692079e2b82cbfe087
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Daniel Teske
2014-07-11 18:13:03 +02:00
parent 137a2d63bb
commit 1e12e53e0d
3 changed files with 19 additions and 16 deletions

View File

@@ -37,7 +37,6 @@
#include "projectexplorer.h"
#include "session.h"
#include "iprojectproperties.h"
#include "targetsettingspanel.h"
#include "target.h"
#include <coreplugin/idocument.h>
@@ -165,9 +164,6 @@ void ProjectWindow::registerProject(ProjectExplorer::Project *project)
bool projectHasTarget = hasTarget(project);
m_hasTarget.insert(project, projectHasTarget);
if (projectHasTarget || project->requiresTargetPanel()) // Use the Targets page
subtabs << QCoreApplication::translate("TargetSettingsPanelFactory", "Build & Run");
// Add the project specific pages
QList<IProjectPanelFactory *> factories = ExtensionSystem::PluginManager::getObjects<IProjectPanelFactory>();
Utils::sort(factories, &IProjectPanelFactory::prioritySort);
@@ -216,18 +212,6 @@ void ProjectWindow::showProperties(int index, int subIndex)
int pos = 0;
IProjectPanelFactory *fac = 0;
if (m_hasTarget.value(project) || project->requiresTargetPanel()) {
if (subIndex == 0) {
// Targets page
removeCurrentWidget();
TargetSettingsPanelWidget *panelWidget = new TargetSettingsPanelWidget(project);
m_currentWidget = panelWidget;
m_centralWidget->addWidget(m_currentWidget);
m_centralWidget->setCurrentWidget(m_currentWidget);
}
++pos;
}
QList<IProjectPanelFactory *> factories = ExtensionSystem::PluginManager::getObjects<IProjectPanelFactory>();
Utils::sort(factories, &IProjectPanelFactory::prioritySort);
foreach (IProjectPanelFactory *panelFactory, factories) {