summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorDaniel Teske <daniel.teske@nokia.com>2012-05-08 12:02:51 +0200
committerDaniel Teske <daniel.teske@nokia.com>2012-05-08 14:06:17 +0200
commitcc3dd6532995c88a2435528867c8566ba904ce41 (patch)
tree8e1de2e199530b60b496279d5e4d4da832a822dc /src/plugins
parente8ee898864dee2b7e7fef7656ea030ab9d85332b (diff)
downloadqt-creator-cc3dd6532995c88a2435528867c8566ba904ce41.tar.gz
Qt run configurations: emit enabledChanged if the disable reason changed
Otherwise a misparse might get reported as .pro parsing still in progress. Change-Id: I0958032c7692faa4672410f395ededf6f1a2e379 Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.cpp7
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp9
-rw-r--r--src/plugins/remotelinux/remotelinuxrunconfiguration.cpp9
3 files changed, 16 insertions, 9 deletions
diff --git a/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.cpp b/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.cpp
index 2c9e9512b4..7c1d217c32 100644
--- a/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.cpp
+++ b/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.cpp
@@ -146,9 +146,9 @@ bool Qt4RunConfiguration::isEnabled() const
QString Qt4RunConfiguration::disabledReason() const
{
if (m_parseInProgress)
- return tr("The .pro file is currently being parsed.");
+ return tr("The .pro file '%1' is currently being parsed.").arg(QFileInfo(m_proFilePath).fileName());
if (!m_parseSuccess)
- return tr("The .pro file could not be parsed.");
+ return tr("The .pro file '%1' could not be parsed.").arg(QFileInfo(m_proFilePath).fileName());
return QString();
}
@@ -164,9 +164,10 @@ void Qt4RunConfiguration::proFileUpdated(Qt4ProjectManager::Qt4ProFileNode *pro,
}
bool enabled = isEnabled();
+ QString reason = disabledReason();
m_parseSuccess = success;
m_parseInProgress = parseInProgress;
- if (enabled != isEnabled())
+ if (enabled != isEnabled() || reason != disabledReason())
emit enabledChanged();
if (!parseInProgress) {
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp
index b16e57390e..79469a3045 100644
--- a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp
@@ -113,9 +113,10 @@ void S60DeviceRunConfiguration::proFileUpdate(Qt4ProjectManager::Qt4ProFileNode
if (m_proFilePath != pro->path())
return;
bool enabled = isEnabled();
+ QString reason = disabledReason();
m_validParse = success;
m_parseInProgress = parseInProgress;
- if (enabled != isEnabled())
+ if (enabled != isEnabled() || reason != disabledReason())
emit enabledChanged();
if (!parseInProgress)
emit targetInformationChanged();
@@ -138,9 +139,11 @@ bool S60DeviceRunConfiguration::isEnabled() const
QString S60DeviceRunConfiguration::disabledReason() const
{
if (m_parseInProgress)
- return tr("The .pro file is currently being parsed.");
+ return tr("The .pro file '%1' is currently being parsed.")
+ .arg(QFileInfo(m_proFilePath).fileName());
if (!m_validParse)
- return tr("The .pro file could not be parsed.");
+ return tr("The .pro file '%1' could not be parsed.")
+ .arg(QFileInfo(m_proFilePath).fileName());
return QString();
}
diff --git a/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp b/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp
index cd624e2dc1..ca58efef24 100644
--- a/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp
+++ b/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp
@@ -157,11 +157,13 @@ Qt4BuildConfiguration *RemoteLinuxRunConfiguration::activeQt4BuildConfiguration(
bool RemoteLinuxRunConfiguration::isEnabled() const
{
if (d->parseInProgress) {
- d->disabledReason = tr("The .pro file is being parsed.");
+ d->disabledReason = tr("The .pro file '%1' is being parsed.")
+ .arg(QFileInfo(d->proFilePath).fileName());
return false;
}
if (!d->validParse) {
- d->disabledReason = tr("The .pro file could not be parsed.");
+ d->disabledReason = tr("The .pro file '%1' could not be parsed.")
+ .arg(QFileInfo(d->proFilePath).fileName());
return false;
}
if (!activeQt4BuildConfiguration()) {
@@ -195,9 +197,10 @@ void RemoteLinuxRunConfiguration::proFileUpdate(Qt4ProjectManager::Qt4ProFileNod
{
if (d->proFilePath == pro->path()) {
bool enabled = isEnabled();
+ QString reason = disabledReason();
d->validParse = success;
d->parseInProgress = parseInProgress;
- if (enabled != isEnabled())
+ if (enabled != isEnabled() || reason != disabledReason())
updateEnabledState();
if (!parseInProgress)
emit targetInformationChanged();