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>
This commit is contained in:
Daniel Teske
2014-07-30 17:31:49 +02:00
parent 42bbae26a3
commit 5751f7117c
8 changed files with 85 additions and 37 deletions

View File

@@ -273,13 +273,13 @@ bool RunConfiguration::isConfigured() const
return true;
}
bool RunConfiguration::ensureConfigured(QString *errorMessage)
RunConfiguration::ConfigurationState RunConfiguration::ensureConfigured(QString *errorMessage)
{
if (isConfigured())
return true;
return Configured;
if (errorMessage)
*errorMessage = tr("Unknown error.");
return false;
return UnConfigured;
}