summaryrefslogtreecommitdiff
path: root/src/plugins/remotelinux
diff options
context:
space:
mode:
authorDaniel Teske <daniel.teske@digia.com>2014-07-30 17:31:49 +0200
committerDaniel Teske <daniel.teske@digia.com>2014-08-04 10:35:10 +0200
commit5751f7117cbe9e11c2e089349fbc97045ec50f32 (patch)
tree1e22678f55a2d3092a0dbca58b188473321bbd1a /src/plugins/remotelinux
parent42bbae26a3e179e5a75684a8ca52f0c30f078a8e (diff)
downloadqt-creator-5751f7117cbe9e11c2e089349fbc97045ec50f32.tar.gz
CustomExecutableRunConfiguration: Remove nested event loop
Nested event loops are dangerous and in this case lead to a crash. So change the api of ensureConfigured to not use a nested event loop. The CustomExecutableRunConfiguration then has to manage the dialog more explicitly. Also this makes the dialog non modal, since it should then cope with every situation. Task-number: QTCREATORBUG-11416 Change-Id: I2af782915c148f8dff1b0df54fdb64aa83f684d2 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Diffstat (limited to 'src/plugins/remotelinux')
-rw-r--r--src/plugins/remotelinux/remotelinuxcustomrunconfiguration.cpp7
-rw-r--r--src/plugins/remotelinux/remotelinuxcustomrunconfiguration.h2
2 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/remotelinux/remotelinuxcustomrunconfiguration.cpp b/src/plugins/remotelinux/remotelinuxcustomrunconfiguration.cpp
index e046be1986..2d49f4f36b 100644
--- a/src/plugins/remotelinux/remotelinuxcustomrunconfiguration.cpp
+++ b/src/plugins/remotelinux/remotelinuxcustomrunconfiguration.cpp
@@ -119,16 +119,17 @@ bool RemoteLinuxCustomRunConfiguration::isConfigured() const
return !m_remoteExecutable.isEmpty();
}
-bool RemoteLinuxCustomRunConfiguration::ensureConfigured(QString *errorMessage)
+ProjectExplorer::RunConfiguration::ConfigurationState
+RemoteLinuxCustomRunConfiguration::ensureConfigured(QString *errorMessage)
{
if (!isConfigured()) {
if (errorMessage) {
*errorMessage = tr("The remote executable must be set "
"in order to run a custom remote run configuration.");
}
- return false;
+ return UnConfigured;
}
- return true;
+ return Configured;
}
QWidget *RemoteLinuxCustomRunConfiguration::createConfigurationWidget()
diff --git a/src/plugins/remotelinux/remotelinuxcustomrunconfiguration.h b/src/plugins/remotelinux/remotelinuxcustomrunconfiguration.h
index 97867ad871..87c18b0026 100644
--- a/src/plugins/remotelinux/remotelinuxcustomrunconfiguration.h
+++ b/src/plugins/remotelinux/remotelinuxcustomrunconfiguration.h
@@ -48,7 +48,7 @@ public:
bool isEnabled() const { return true; }
bool isConfigured() const;
- bool ensureConfigured(QString *errorMessage);
+ ConfigurationState ensureConfigured(QString *errorMessage);
QWidget *createConfigurationWidget();
Utils::OutputFormatter *createOutputFormatter() const;