diff options
author | Daniel Teske <daniel.teske@digia.com> | 2014-07-30 17:31:49 +0200 |
---|---|---|
committer | Daniel Teske <daniel.teske@digia.com> | 2014-08-04 10:35:10 +0200 |
commit | 5751f7117cbe9e11c2e089349fbc97045ec50f32 (patch) | |
tree | 1e22678f55a2d3092a0dbca58b188473321bbd1a /src/plugins/remotelinux/remotelinuxcustomrunconfiguration.cpp | |
parent | 42bbae26a3e179e5a75684a8ca52f0c30f078a8e (diff) |
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/remotelinuxcustomrunconfiguration.cpp')
-rw-r--r-- | src/plugins/remotelinux/remotelinuxcustomrunconfiguration.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/remotelinux/remotelinuxcustomrunconfiguration.cpp b/src/plugins/remotelinux/remotelinuxcustomrunconfiguration.cpp index e046be19861..2d49f4f36bd 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() |