Commit 89f3c1c2 authored by Tobias Hunger's avatar Tobias Hunger

RunConfig: Rename signal isEnabledChanged(bool)

Rename signal isEnabledChanged(bool) to enabledChanged() as that is
also used by the BuildConfigurations.

Change-Id: I9fc8906a2abbf9d19e21129309bee6ff5a142117
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent 0ebd74d6
...@@ -316,7 +316,7 @@ void CMakeRunConfiguration::setEnabled(bool b) ...@@ -316,7 +316,7 @@ void CMakeRunConfiguration::setEnabled(bool b)
if (m_enabled == b) if (m_enabled == b)
return; return;
m_enabled = b; m_enabled = b;
emit isEnabledChanged(isEnabled()); emit enabledChanged();
setDefaultDisplayName(defaultDisplayName()); setDefaultDisplayName(defaultDisplayName());
} }
......
...@@ -93,13 +93,14 @@ MaemoRunConfigurationWidget::MaemoRunConfigurationWidget( ...@@ -93,13 +93,14 @@ MaemoRunConfigurationWidget::MaemoRunConfigurationWidget(
= qobject_cast<AbstractQt4MaemoTarget *>(runConfiguration->target()); = qobject_cast<AbstractQt4MaemoTarget *>(runConfiguration->target());
m_mountDetailsContainer->setVisible(maemoTarget->allowsRemoteMounts()); m_mountDetailsContainer->setVisible(maemoTarget->allowsRemoteMounts());
connect(m_runConfiguration, SIGNAL(isEnabledChanged(bool)), connect(m_runConfiguration, SIGNAL(enabledChanged()),
this, SLOT(runConfigurationEnabledChange(bool))); this, SLOT(runConfigurationEnabledChange()));
runConfigurationEnabledChange(m_runConfiguration->isEnabled()); runConfigurationEnabledChange();
} }
void MaemoRunConfigurationWidget::runConfigurationEnabledChange(bool enabled) void MaemoRunConfigurationWidget::runConfigurationEnabledChange()
{ {
bool enabled = m_runConfiguration->isEnabled();
m_subWidget->setEnabled(enabled); m_subWidget->setEnabled(enabled);
} }
......
...@@ -66,7 +66,7 @@ private slots: ...@@ -66,7 +66,7 @@ private slots:
void enableOrDisableRemoveMountSpecButton(); void enableOrDisableRemoveMountSpecButton();
void handleRemoteMountsChanged(); void handleRemoteMountsChanged();
void updateMountWarning(); void updateMountWarning();
void runConfigurationEnabledChange(bool enabled); void runConfigurationEnabledChange();
private: private:
void addMountWidgets(QVBoxLayout *mainLayout); void addMountWidgets(QVBoxLayout *mainLayout);
......
...@@ -2206,14 +2206,14 @@ void ProjectExplorerPlugin::activeRunConfigurationChanged() ...@@ -2206,14 +2206,14 @@ void ProjectExplorerPlugin::activeRunConfigurationChanged()
if (rc == previousRunConfiguration) if (rc == previousRunConfiguration)
return; return;
if (previousRunConfiguration) { if (previousRunConfiguration) {
disconnect(previousRunConfiguration, SIGNAL(isEnabledChanged(bool)), disconnect(previousRunConfiguration, SIGNAL(enabledChanged()),
this, SIGNAL(updateRunActions())); this, SIGNAL(updateRunActions()));
disconnect(previousRunConfiguration->debuggerAspect(), SIGNAL(debuggersChanged()), disconnect(previousRunConfiguration->debuggerAspect(), SIGNAL(debuggersChanged()),
this, SIGNAL(updateRunActions())); this, SIGNAL(updateRunActions()));
} }
previousRunConfiguration = rc; previousRunConfiguration = rc;
if (rc) { if (rc) {
connect(rc, SIGNAL(isEnabledChanged(bool)), connect(rc, SIGNAL(enabledChanged()),
this, SIGNAL(updateRunActions())); this, SIGNAL(updateRunActions()));
connect(rc->debuggerAspect(), SIGNAL(debuggersChanged()), connect(rc->debuggerAspect(), SIGNAL(debuggersChanged()),
this, SIGNAL(updateRunActions())); this, SIGNAL(updateRunActions()));
......
...@@ -178,7 +178,7 @@ public: ...@@ -178,7 +178,7 @@ public:
virtual ProjectExplorer::Abi abi() const; virtual ProjectExplorer::Abi abi() const;
signals: signals:
void isEnabledChanged(bool value); void enabledChanged();
protected: protected:
RunConfiguration(Target *parent, const QString &id); RunConfiguration(Target *parent, const QString &id);
......
...@@ -364,7 +364,7 @@ void QmlProjectRunConfiguration::updateEnabled() ...@@ -364,7 +364,7 @@ void QmlProjectRunConfiguration::updateEnabled()
// Always emit change signal to force reevaluation of run/debug buttons // Always emit change signal to force reevaluation of run/debug buttons
m_isEnabled = newValue; m_isEnabled = newValue;
emit isEnabledChanged(m_isEnabled); emit enabledChanged();
} }
void QmlProjectRunConfiguration::updateQtVersions() void QmlProjectRunConfiguration::updateQtVersions()
......
...@@ -165,7 +165,7 @@ void Qt4RunConfiguration::proFileUpdated(Qt4ProjectManager::Qt4ProFileNode *pro, ...@@ -165,7 +165,7 @@ void Qt4RunConfiguration::proFileUpdated(Qt4ProjectManager::Qt4ProFileNode *pro,
m_parseSuccess = success; m_parseSuccess = success;
m_parseInProgress = parseInProgress; m_parseInProgress = parseInProgress;
if (enabled != isEnabled()) if (enabled != isEnabled())
emit isEnabledChanged(!enabled); emit enabledChanged();
if (!parseInProgress) { if (!parseInProgress) {
emit effectiveTargetInformationChanged(); emit effectiveTargetInformationChanged();
...@@ -287,7 +287,7 @@ Qt4RunConfigurationWidget::Qt4RunConfigurationWidget(Qt4RunConfiguration *qt4Run ...@@ -287,7 +287,7 @@ Qt4RunConfigurationWidget::Qt4RunConfigurationWidget(Qt4RunConfiguration *qt4Run
m_environmentWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); m_environmentWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
vboxTopLayout->addWidget(m_environmentWidget); vboxTopLayout->addWidget(m_environmentWidget);
runConfigurationEnabledChange(m_qt4RunConfiguration->isEnabled()); runConfigurationEnabledChange();
connect(m_workingDirectoryEdit, SIGNAL(changed(QString)), connect(m_workingDirectoryEdit, SIGNAL(changed(QString)),
this, SLOT(workDirectoryEdited())); this, SLOT(workDirectoryEdited()));
...@@ -321,8 +321,8 @@ Qt4RunConfigurationWidget::Qt4RunConfigurationWidget(Qt4RunConfiguration *qt4Run ...@@ -321,8 +321,8 @@ Qt4RunConfigurationWidget::Qt4RunConfigurationWidget(Qt4RunConfiguration *qt4Run
connect(qt4RunConfiguration, SIGNAL(baseEnvironmentChanged()), connect(qt4RunConfiguration, SIGNAL(baseEnvironmentChanged()),
this, SLOT(baseEnvironmentChanged())); this, SLOT(baseEnvironmentChanged()));
connect(qt4RunConfiguration, SIGNAL(isEnabledChanged(bool)), connect(qt4RunConfiguration, SIGNAL(enabledChanged()),
this, SLOT(runConfigurationEnabledChange(bool))); this, SLOT(runConfigurationEnabledChange()));
} }
Qt4RunConfigurationWidget::~Qt4RunConfigurationWidget() Qt4RunConfigurationWidget::~Qt4RunConfigurationWidget()
...@@ -363,8 +363,9 @@ void Qt4RunConfigurationWidget::userChangesEdited() ...@@ -363,8 +363,9 @@ void Qt4RunConfigurationWidget::userChangesEdited()
m_ignoreChange = false; m_ignoreChange = false;
} }
void Qt4RunConfigurationWidget::runConfigurationEnabledChange(bool enabled) void Qt4RunConfigurationWidget::runConfigurationEnabledChange()
{ {
bool enabled = m_qt4RunConfiguration->isEnabled();
m_detailsContainer->setEnabled(enabled); m_detailsContainer->setEnabled(enabled);
m_environmentWidget->setEnabled(enabled); m_environmentWidget->setEnabled(enabled);
m_disabledIcon->setVisible(!enabled); m_disabledIcon->setVisible(!enabled);
......
...@@ -169,7 +169,7 @@ protected: ...@@ -169,7 +169,7 @@ protected:
void hideEvent(QHideEvent *event); void hideEvent(QHideEvent *event);
private slots: private slots:
void runConfigurationEnabledChange(bool); void runConfigurationEnabledChange();
void workDirectoryEdited(); void workDirectoryEdited();
void workingDirectoryReseted(); void workingDirectoryReseted();
void argumentsEdited(const QString &arguments); void argumentsEdited(const QString &arguments);
......
...@@ -113,7 +113,7 @@ void S60DeviceRunConfiguration::proFileUpdate(Qt4ProjectManager::Qt4ProFileNode ...@@ -113,7 +113,7 @@ void S60DeviceRunConfiguration::proFileUpdate(Qt4ProjectManager::Qt4ProFileNode
m_validParse = success; m_validParse = success;
m_parseInProgress = parseInProgress; m_parseInProgress = parseInProgress;
if (enabled != isEnabled()) if (enabled != isEnabled())
emit isEnabledChanged(!enabled); emit enabledChanged();
if (!parseInProgress) if (!parseInProgress)
emit targetInformationChanged(); emit targetInformationChanged();
} }
......
...@@ -86,10 +86,10 @@ S60DeviceRunConfigurationWidget::S60DeviceRunConfigurationWidget( ...@@ -86,10 +86,10 @@ S60DeviceRunConfigurationWidget::S60DeviceRunConfigurationWidget(
connect(m_argumentsLineEdit, SIGNAL(textEdited(QString)), connect(m_argumentsLineEdit, SIGNAL(textEdited(QString)),
this, SLOT(argumentsEdited(QString))); this, SLOT(argumentsEdited(QString)));
connect(m_runConfiguration, SIGNAL(isEnabledChanged(bool)), connect(m_runConfiguration, SIGNAL(enabledChanged()),
this, SLOT(runConfigurationEnabledChange(bool))); this, SLOT(runConfigurationEnabledChange()));
runConfigurationEnabledChange(m_runConfiguration->isEnabled()); runConfigurationEnabledChange();
} }
void S60DeviceRunConfigurationWidget::argumentsEdited(const QString &text) void S60DeviceRunConfigurationWidget::argumentsEdited(const QString &text)
...@@ -97,8 +97,9 @@ void S60DeviceRunConfigurationWidget::argumentsEdited(const QString &text) ...@@ -97,8 +97,9 @@ void S60DeviceRunConfigurationWidget::argumentsEdited(const QString &text)
m_runConfiguration->setCommandLineArguments(text.trimmed()); m_runConfiguration->setCommandLineArguments(text.trimmed());
} }
void S60DeviceRunConfigurationWidget::runConfigurationEnabledChange(bool enabled) void S60DeviceRunConfigurationWidget::runConfigurationEnabledChange()
{ {
bool enabled = m_runConfiguration->isEnabled();
m_detailsWidget->setEnabled(enabled); m_detailsWidget->setEnabled(enabled);
m_disabledIcon->setVisible(!enabled); m_disabledIcon->setVisible(!enabled);
m_disabledReason->setVisible(!enabled); m_disabledReason->setVisible(!enabled);
......
...@@ -56,7 +56,7 @@ public: ...@@ -56,7 +56,7 @@ public:
QWidget *parent = 0); QWidget *parent = 0);
private slots: private slots:
void argumentsEdited(const QString &text); void argumentsEdited(const QString &text);
void runConfigurationEnabledChange(bool enabled); void runConfigurationEnabledChange();
private: private:
S60DeviceRunConfiguration *m_runConfiguration; S60DeviceRunConfiguration *m_runConfiguration;
......
...@@ -116,7 +116,7 @@ void S60EmulatorRunConfiguration::proFileUpdate(Qt4ProjectManager::Qt4ProFileNod ...@@ -116,7 +116,7 @@ void S60EmulatorRunConfiguration::proFileUpdate(Qt4ProjectManager::Qt4ProFileNod
m_validParse = success; m_validParse = success;
m_parseInProgress = parseInProgress; m_parseInProgress = parseInProgress;
if (enabled != isEnabled()) { if (enabled != isEnabled()) {
emit isEnabledChanged(!enabled); emit enabledChanged();
} }
if (parseInProgress) if (parseInProgress)
emit targetInformationChanged(); emit targetInformationChanged();
...@@ -244,10 +244,10 @@ S60EmulatorRunConfigurationWidget::S60EmulatorRunConfigurationWidget(S60Emulator ...@@ -244,10 +244,10 @@ S60EmulatorRunConfigurationWidget::S60EmulatorRunConfigurationWidget(S60Emulator
connect(m_runConfiguration, SIGNAL(targetInformationChanged()), connect(m_runConfiguration, SIGNAL(targetInformationChanged()),
this, SLOT(updateTargetInformation())); this, SLOT(updateTargetInformation()));
connect(m_runConfiguration, SIGNAL(isEnabledChanged(bool)), connect(m_runConfiguration, SIGNAL(enabledChanged()),
this, SLOT(runConfigurationEnabledChange(bool))); this, SLOT(runConfigurationEnabledChange()));
runConfigurationEnabledChange(m_runConfiguration->isEnabled()); runConfigurationEnabledChange();
} }
void S60EmulatorRunConfigurationWidget::updateTargetInformation() void S60EmulatorRunConfigurationWidget::updateTargetInformation()
...@@ -255,8 +255,9 @@ void S60EmulatorRunConfigurationWidget::updateTargetInformation() ...@@ -255,8 +255,9 @@ void S60EmulatorRunConfigurationWidget::updateTargetInformation()
m_executableLabel->setText(m_runConfiguration->executable()); m_executableLabel->setText(m_runConfiguration->executable());
} }
void S60EmulatorRunConfigurationWidget::runConfigurationEnabledChange(bool enabled) void S60EmulatorRunConfigurationWidget::runConfigurationEnabledChange()
{ {
bool enabled = m_runConfiguration->isEnabled();
m_detailsWidget->setEnabled(enabled); m_detailsWidget->setEnabled(enabled);
m_disabledIcon->setVisible(!enabled); m_disabledIcon->setVisible(!enabled);
m_disabledReason->setVisible(!enabled); m_disabledReason->setVisible(!enabled);
......
...@@ -108,7 +108,7 @@ public: ...@@ -108,7 +108,7 @@ public:
private slots: private slots:
void updateTargetInformation(); void updateTargetInformation();
void runConfigurationEnabledChange(bool enabled); void runConfigurationEnabledChange();
private: private:
S60EmulatorRunConfiguration *m_runConfiguration; S60EmulatorRunConfiguration *m_runConfiguration;
......
...@@ -134,7 +134,9 @@ protected: ...@@ -134,7 +134,9 @@ protected:
QString defaultDisplayName(); QString defaultDisplayName();
void setDisabledReason(const QString &reason) const; void setDisabledReason(const QString &reason) const;
QString userEnvironmentChangesAsString() const; QString userEnvironmentChangesAsString() const;
Q_SLOT void updateEnabledState() { emit isEnabledChanged(isEnabled()); }
protected slots:
void updateEnabledState() { emit enabledChanged(); }
private slots: private slots:
void proFileUpdate(Qt4ProjectManager::Qt4ProFileNode *pro, bool success, bool parseInProgress); void proFileUpdate(Qt4ProjectManager::Qt4ProFileNode *pro, bool success, bool parseInProgress);
......
...@@ -114,9 +114,9 @@ RemoteLinuxRunConfigurationWidget::RemoteLinuxRunConfigurationWidget(RemoteLinux ...@@ -114,9 +114,9 @@ RemoteLinuxRunConfigurationWidget::RemoteLinuxRunConfigurationWidget(RemoteLinux
connect(d->runConfiguration, SIGNAL(deviceConfigurationChanged(ProjectExplorer::Target*)), connect(d->runConfiguration, SIGNAL(deviceConfigurationChanged(ProjectExplorer::Target*)),
SLOT(handleCurrentDeviceConfigChanged())); SLOT(handleCurrentDeviceConfigChanged()));
handleCurrentDeviceConfigChanged(); handleCurrentDeviceConfigChanged();
connect(d->runConfiguration, SIGNAL(isEnabledChanged(bool)), connect(d->runConfiguration, SIGNAL(enabledChanged()),
SLOT(runConfigurationEnabledChange(bool))); SLOT(runConfigurationEnabledChange()));
runConfigurationEnabledChange(d->runConfiguration->isEnabled()); runConfigurationEnabledChange();
} }
RemoteLinuxRunConfigurationWidget::~RemoteLinuxRunConfigurationWidget() RemoteLinuxRunConfigurationWidget::~RemoteLinuxRunConfigurationWidget()
...@@ -141,8 +141,9 @@ void RemoteLinuxRunConfigurationWidget::addDisabledLabel(QVBoxLayout *topLayout) ...@@ -141,8 +141,9 @@ void RemoteLinuxRunConfigurationWidget::addDisabledLabel(QVBoxLayout *topLayout)
topLayout->addLayout(hl); topLayout->addLayout(hl);
} }
void RemoteLinuxRunConfigurationWidget::runConfigurationEnabledChange(bool enabled) void RemoteLinuxRunConfigurationWidget::runConfigurationEnabledChange()
{ {
bool enabled = d->runConfiguration->isEnabled();
d->topWidget.setEnabled(enabled); d->topWidget.setEnabled(enabled);
d->disabledIcon.setVisible(!enabled); d->disabledIcon.setVisible(!enabled);
d->disabledReason.setVisible(!enabled); d->disabledReason.setVisible(!enabled);
......
...@@ -60,7 +60,7 @@ public: ...@@ -60,7 +60,7 @@ public:
void addFormLayoutRow(QWidget *label, QWidget *field); void addFormLayoutRow(QWidget *label, QWidget *field);
void addDisabledLabel(QVBoxLayout *topLayout); void addDisabledLabel(QVBoxLayout *topLayout);
Q_SLOT void runConfigurationEnabledChange(bool enabled); Q_SLOT void runConfigurationEnabledChange();
private slots: private slots:
void argumentsEdited(const QString &args); void argumentsEdited(const QString &args);
......
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