diff options
author | Tobias Hunger <tobias.hunger@nokia.com> | 2012-09-06 16:19:14 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@nokia.com> | 2012-09-07 14:20:48 +0200 |
commit | e77bb8af0489688ec06f2f74a9f963f076c36584 (patch) | |
tree | 6919513c308aa463dfcc59d7eba3370ceb6ae4f9 | |
parent | aa8a0cf0edca18d1e70da1f403f1ae6af1eb062a (diff) |
Handle non-qmake projects without kits
Make it possible to add kits again after all kits were removed
from a non qmake project.
Task-number: QTCREATORBUG-7814
Change-Id: I38967cd4c106b95288b7020fe325d8cfe2688a7c
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
-rw-r--r-- | src/plugins/projectexplorer/project.cpp | 5 | ||||
-rw-r--r-- | src/plugins/projectexplorer/project.h | 2 | ||||
-rw-r--r-- | src/plugins/projectexplorer/projectwindow.cpp | 2 | ||||
-rw-r--r-- | src/plugins/projectexplorer/targetsettingspanel.cpp | 2 | ||||
-rw-r--r-- | src/plugins/qt4projectmanager/qt4project.cpp | 5 | ||||
-rw-r--r-- | src/plugins/qt4projectmanager/qt4project.h | 2 |
6 files changed, 16 insertions, 2 deletions
diff --git a/src/plugins/projectexplorer/project.cpp b/src/plugins/projectexplorer/project.cpp index 3bc256d992..b53bb0435b 100644 --- a/src/plugins/projectexplorer/project.cpp +++ b/src/plugins/projectexplorer/project.cpp @@ -439,6 +439,11 @@ void Project::configureAsExampleProject(const QStringList &platforms) Q_UNUSED(platforms); } +bool Project::supportsNoTargetPanel() const +{ + return false; +} + void Project::onBuildDirectoryChanged() { Target *target = qobject_cast<Target *>(sender()); diff --git a/src/plugins/projectexplorer/project.h b/src/plugins/projectexplorer/project.h index e0814d3ca1..70d97260c3 100644 --- a/src/plugins/projectexplorer/project.h +++ b/src/plugins/projectexplorer/project.h @@ -124,6 +124,8 @@ public: virtual bool needsConfiguration() const; virtual void configureAsExampleProject(const QStringList &platforms); + virtual bool supportsNoTargetPanel() const; + signals: void displayNameChanged(); void fileListChanged(); diff --git a/src/plugins/projectexplorer/projectwindow.cpp b/src/plugins/projectexplorer/projectwindow.cpp index 8a9f23d540..e9cf59b3c1 100644 --- a/src/plugins/projectexplorer/projectwindow.cpp +++ b/src/plugins/projectexplorer/projectwindow.cpp @@ -384,7 +384,7 @@ void ProjectWindow::showProperties(int index, int subIndex) m_previousTargetSubIndex = previousPanelWidget->currentSubIndex(); } - if (m_hasTarget.value(project)) { + if (m_hasTarget.value(project) || !project->supportsNoTargetPanel()) { if (subIndex == 0) { // Targets page removeCurrentWidget(); diff --git a/src/plugins/projectexplorer/targetsettingspanel.cpp b/src/plugins/projectexplorer/targetsettingspanel.cpp index f315fbe37f..1d2b7d36cc 100644 --- a/src/plugins/projectexplorer/targetsettingspanel.cpp +++ b/src/plugins/projectexplorer/targetsettingspanel.cpp @@ -115,7 +115,7 @@ void TargetSettingsPanelWidget::setupUi() QVBoxLayout *noTargetLayout = new QVBoxLayout(m_noTargetLabel); noTargetLayout->setMargin(0); QLabel *label = new QLabel(m_noTargetLabel); - label->setText(tr("No kit defined.")); + label->setText(tr("No kit defined in this project.")); { QFont f = label->font(); f.setPointSizeF(f.pointSizeF() * 1.4); diff --git a/src/plugins/qt4projectmanager/qt4project.cpp b/src/plugins/qt4projectmanager/qt4project.cpp index f62bd9eff5..129eb5a8fc 100644 --- a/src/plugins/qt4projectmanager/qt4project.cpp +++ b/src/plugins/qt4projectmanager/qt4project.cpp @@ -1367,6 +1367,11 @@ void Qt4Project::configureAsExampleProject(const QStringList &platforms) ProjectExplorer::ProjectExplorerPlugin::instance()->requestProjectModeUpdate(this); } +bool Qt4Project::supportsNoTargetPanel() const +{ + return true; +} + // All the Qt4 run configurations should share code. // This is a rather suboptimal way to do that for disabledReason() // but more pratical then duplicated the code everywhere diff --git a/src/plugins/qt4projectmanager/qt4project.h b/src/plugins/qt4projectmanager/qt4project.h index f711ad2cf6..6d4dff54eb 100644 --- a/src/plugins/qt4projectmanager/qt4project.h +++ b/src/plugins/qt4projectmanager/qt4project.h @@ -129,6 +129,8 @@ public: void configureAsExampleProject(const QStringList &platforms); + bool supportsNoTargetPanel() const; + /// \internal QString disabledReasonForRunConfiguration(const QString &proFilePath); |