Trk: Do not show additional message box when canceled.

This commit is contained in:
Friedemann Kleint
2010-02-25 16:05:45 +01:00
parent 486f40ee25
commit a8098cff93
2 changed files with 10 additions and 8 deletions

View File

@@ -4075,13 +4075,15 @@ void GdbEngine::handleAdapterStartFailed(const QString &msg, const QString &sett
{ {
setState(AdapterStartFailed); setState(AdapterStartFailed);
debugMessage(_("ADAPTER START FAILED")); debugMessage(_("ADAPTER START FAILED"));
const QString title = tr("Adapter start failed"); if (!msg.isEmpty()) {
if (settingsIdHint.isEmpty()) { const QString title = tr("Adapter start failed");
Core::ICore::instance()->showWarningWithOptions(title, msg); if (settingsIdHint.isEmpty()) {
} else { Core::ICore::instance()->showWarningWithOptions(title, msg);
Core::ICore::instance()->showWarningWithOptions(title, msg, QString(), } else {
_(Debugger::Constants::DEBUGGER_SETTINGS_CATEGORY), Core::ICore::instance()->showWarningWithOptions(title, msg, QString(),
settingsIdHint); _(Debugger::Constants::DEBUGGER_SETTINGS_CATEGORY),
settingsIdHint);
}
} }
shutdown(); shutdown();
} }

View File

@@ -1749,7 +1749,7 @@ bool TrkGdbAdapter::initializeDevice(const QString &remoteChannel, QString *erro
case trk::PromptStartCommunicationConnected: case trk::PromptStartCommunicationConnected:
break; break;
case trk::PromptStartCommunicationCanceled: case trk::PromptStartCommunicationCanceled:
*errorMessage = tr("Canceled"); errorMessage->clear();
return false; return false;
case trk::PromptStartCommunicationError: case trk::PromptStartCommunicationError:
return false; return false;