Fix error handling for custom executables.

Prevent dialog showing "No executable" when canceling the
prompt for the executable when pressing 'Run' / 'Debug'
on a library project. Introduce new
LocalApplicationRunControl::ensureConfigured() to ensure
the configuration is complete and detect cancel via
empty/non-null strings.

Change-Id: I9bd4a296e7c995d26d6ad265519e7ebd3f98d6fe
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
Friedemann Kleint
2012-09-13 11:27:15 +02:00
committed by Daniel Teske
parent 1035224774
commit fe2dd584fc
7 changed files with 127 additions and 49 deletions

View File

@@ -322,6 +322,16 @@ bool RunConfiguration::isConfigured() const
return true;
}
bool RunConfiguration::ensureConfigured(QString *errorMessage)
{
if (isConfigured())
return true;
if (errorMessage)
*errorMessage = tr("Unknown error.");
return false;
}
/*!
\fn virtual QWidget *ProjectExplorer::RunConfiguration::createConfigurationWidget()