Commit fec98bdf authored by dt_'s avatar dt_ Committed by Daniel Teske

Add RunConfiguration::disabledReason

Not used yet

Change-Id: I76b3b81282dea4bca97eaf64e297154a20cf2096
Reviewed-on: http://codereview.qt.nokia.com/190Reviewed-by: default avatarChristian Kandeler <christian.kandeler@nokia.com>
parent 2fd50576
......@@ -324,6 +324,13 @@ bool CMakeRunConfiguration::isEnabled() const
return m_enabled;
}
QString CMakeRunConfiguration::disabledReason() const
{
if (!m_enabled)
return tr("The executable is not built by the current buildconfiguration");
return QString();
}
// Configuration widget
CMakeRunConfigurationWidget::CMakeRunConfigurationWidget(CMakeRunConfiguration *cmakeRunConfiguration, QWidget *parent)
: QWidget(parent), m_ignoreChange(false), m_cmakeRunConfiguration(cmakeRunConfiguration)
......
......@@ -91,6 +91,7 @@ public:
void setEnabled(bool b);
bool isEnabled() const;
QString disabledReason() const;
signals:
void baseEnvironmentChanged();
......
......@@ -206,6 +206,11 @@ bool RunConfiguration::isEnabled() const
return true;
}
QString RunConfiguration::disabledReason() const
{
return QString();
}
/*!
\fn virtual QWidget *ProjectExplorer::RunConfiguration::createConfigurationWidget()
......
......@@ -60,6 +60,7 @@ public:
virtual ~RunConfiguration();
virtual bool isEnabled() const;
virtual QString disabledReason() const;
virtual QWidget *createConfigurationWidget() = 0;
Target *target() const;
......
......@@ -91,6 +91,13 @@ bool QmlProjectRunConfiguration::isEnabled() const
return m_isEnabled;
}
QString QmlProjectRunConfiguration::disabledReason() const
{
if (!m_isEnabled)
return tr("No qmlviewer or qmlobserver found.");
return QString();
}
void QmlProjectRunConfiguration::ctor()
{
// reset default settings in constructor
......
......@@ -98,6 +98,7 @@ public:
// RunConfiguration
bool isEnabled() const;
QString disabledReason() const;
virtual QWidget *createConfigurationWidget();
Utils::OutputFormatter *createOutputFormatter() const;
QVariantMap toMap() const;
......
......@@ -143,6 +143,13 @@ bool Qt4RunConfiguration::isEnabled() const
return m_parseSuccess;
}
QString Qt4RunConfiguration::disabledReason() const
{
if (!m_parseSuccess)
return tr("The .pro file could not be parsed");
return QString();
}
void Qt4RunConfiguration::handleParseState(bool success)
{
bool enabled = isEnabled();
......
......@@ -83,6 +83,7 @@ public:
Qt4DesktopTarget *qt4Target() const;
virtual bool isEnabled() const;
virtual QString disabledReason() const;
virtual QWidget *createConfigurationWidget();
virtual QString executable() const;
......
......@@ -161,6 +161,13 @@ bool S60DeviceRunConfiguration::isEnabled() const
return m_validParse;
}
QString S60DeviceRunConfiguration::disabledReason() const
{
if (!m_validParse)
return tr("The .pro file could not be parsed");
return QString();
}
QWidget *S60DeviceRunConfiguration::createConfigurationWidget()
{
return new S60DeviceRunConfigurationWidget(this);
......
......@@ -68,6 +68,7 @@ public:
SymbianQtVersion *qtVersion() const;
bool isEnabled() const;
QString disabledReason() const;
QWidget *createConfigurationWidget();
Utils::OutputFormatter *createOutputFormatter() const;
......
......@@ -145,6 +145,13 @@ bool S60EmulatorRunConfiguration::isEnabled() const
return m_validParse;
}
QString S60EmulatorRunConfiguration::disabledReason() const
{
if (!m_validParse)
return tr("The .pro file could not be parsed");
return QString();
}
QWidget *S60EmulatorRunConfiguration::createConfigurationWidget()
{
return new S60EmulatorRunConfigurationWidget(this);
......
......@@ -69,6 +69,7 @@ public:
Qt4SymbianTarget *qt4Target() const;
bool isEnabled() const;
QString disabledReason() const;
QWidget *createConfigurationWidget();
Utils::OutputFormatter *createOutputFormatter() const;
......
......@@ -134,6 +134,13 @@ bool MaemoRunConfiguration::isEnabled() const
return m_validParse;
}
QString MaemoRunConfiguration::disabledReason() const
{
if (!m_validParse)
return tr("The .pro file could not be parsed");
return QString();
}
QWidget *MaemoRunConfiguration::createConfigurationWidget()
{
return new MaemoRunConfigurationWidget(this);
......
......@@ -81,6 +81,7 @@ public:
virtual ~MaemoRunConfiguration();
bool isEnabled() const;
QString disabledReason() const;
QWidget *createConfigurationWidget();
Utils::OutputFormatter *createOutputFormatter() const;
Qt4ProjectManager::Qt4BaseTarget *qt4Target() const;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment