Debugger: Improve adapter error handling

Correctly reset state on missing Symbian gdb.
Provide "settings" options.
Reviewed-by: hjk <qtc-committer@nokia.com>
This commit is contained in:
Friedemann Kleint
2009-10-08 11:43:26 +02:00
parent 09e72eaa81
commit 81a8f2f927
10 changed files with 71 additions and 30 deletions

View File

@@ -1001,17 +1001,9 @@ void DebuggerManager::startNewDebugger(const DebuggerStartParametersPtr &sp)
if (!d->m_engine) {
emit debuggingFinished();
// Create Message box with possibility to go to settings
QAbstractButton *settingsButton = 0;
QMessageBox msgBox(QMessageBox::Warning, tr("Warning"),
tr("Cannot debug '%1' (tool chain: '%2'): %3").
arg(d->m_startParameters->executable, toolChainName, errorMessage),
QMessageBox::Ok);
if (!settingsIdHint.isEmpty())
settingsButton = msgBox.addButton(tr("Settings..."), QMessageBox::AcceptRole);
msgBox.exec();
if (msgBox.clickedButton() == settingsButton)
Core::ICore::instance()->showOptionsDialog(
_(Debugger::Constants::DEBUGGER_SETTINGS_CATEGORY), settingsIdHint);
const QString msg = tr("Cannot debug '%1' (tool chain: '%2'): %3").
arg(d->m_startParameters->executable, toolChainName, errorMessage);
warningWithSettings(tr("Warning"), msg, QString(), settingsIdHint);
return;
}