forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -439,6 +439,11 @@ void Project::configureAsExampleProject(const QStringList &platforms)
|
|||||||
Q_UNUSED(platforms);
|
Q_UNUSED(platforms);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Project::supportsNoTargetPanel() const
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void Project::onBuildDirectoryChanged()
|
void Project::onBuildDirectoryChanged()
|
||||||
{
|
{
|
||||||
Target *target = qobject_cast<Target *>(sender());
|
Target *target = qobject_cast<Target *>(sender());
|
||||||
|
|||||||
@@ -124,6 +124,8 @@ public:
|
|||||||
virtual bool needsConfiguration() const;
|
virtual bool needsConfiguration() const;
|
||||||
virtual void configureAsExampleProject(const QStringList &platforms);
|
virtual void configureAsExampleProject(const QStringList &platforms);
|
||||||
|
|
||||||
|
virtual bool supportsNoTargetPanel() const;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void displayNameChanged();
|
void displayNameChanged();
|
||||||
void fileListChanged();
|
void fileListChanged();
|
||||||
|
|||||||
@@ -384,7 +384,7 @@ void ProjectWindow::showProperties(int index, int subIndex)
|
|||||||
m_previousTargetSubIndex = previousPanelWidget->currentSubIndex();
|
m_previousTargetSubIndex = previousPanelWidget->currentSubIndex();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_hasTarget.value(project)) {
|
if (m_hasTarget.value(project) || !project->supportsNoTargetPanel()) {
|
||||||
if (subIndex == 0) {
|
if (subIndex == 0) {
|
||||||
// Targets page
|
// Targets page
|
||||||
removeCurrentWidget();
|
removeCurrentWidget();
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ void TargetSettingsPanelWidget::setupUi()
|
|||||||
QVBoxLayout *noTargetLayout = new QVBoxLayout(m_noTargetLabel);
|
QVBoxLayout *noTargetLayout = new QVBoxLayout(m_noTargetLabel);
|
||||||
noTargetLayout->setMargin(0);
|
noTargetLayout->setMargin(0);
|
||||||
QLabel *label = new QLabel(m_noTargetLabel);
|
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();
|
QFont f = label->font();
|
||||||
f.setPointSizeF(f.pointSizeF() * 1.4);
|
f.setPointSizeF(f.pointSizeF() * 1.4);
|
||||||
|
|||||||
@@ -1367,6 +1367,11 @@ void Qt4Project::configureAsExampleProject(const QStringList &platforms)
|
|||||||
ProjectExplorer::ProjectExplorerPlugin::instance()->requestProjectModeUpdate(this);
|
ProjectExplorer::ProjectExplorerPlugin::instance()->requestProjectModeUpdate(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Qt4Project::supportsNoTargetPanel() const
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// All the Qt4 run configurations should share code.
|
// All the Qt4 run configurations should share code.
|
||||||
// This is a rather suboptimal way to do that for disabledReason()
|
// This is a rather suboptimal way to do that for disabledReason()
|
||||||
// but more pratical then duplicated the code everywhere
|
// but more pratical then duplicated the code everywhere
|
||||||
|
|||||||
@@ -129,6 +129,8 @@ public:
|
|||||||
|
|
||||||
void configureAsExampleProject(const QStringList &platforms);
|
void configureAsExampleProject(const QStringList &platforms);
|
||||||
|
|
||||||
|
bool supportsNoTargetPanel() const;
|
||||||
|
|
||||||
/// \internal
|
/// \internal
|
||||||
QString disabledReasonForRunConfiguration(const QString &proFilePath);
|
QString disabledReasonForRunConfiguration(const QString &proFilePath);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user