forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user