forked from qt-creator/qt-creator
Add "never ask again" option to dialog asking about killing applications
The option is used for the stop button in the application output. Closing tabs will still ask unconditionally, also if applications would be killed as a side-effect, e.g. of closing Qt Creator. The Symbian controls also always ask, with a more descriptive text, because killing applications might have negative effect on the device in some cases. Reviewed-by: Friedemann Kleint Task-number: QTCREATORBUG-3119
This commit is contained in:
@@ -469,20 +469,19 @@ void DebuggerRunControl::showMessage(const QString &msg, int channel)
|
||||
}
|
||||
}
|
||||
|
||||
bool DebuggerRunControl::aboutToStop() const
|
||||
bool DebuggerRunControl::promptToStop(bool *optionalPrompt) const
|
||||
{
|
||||
QTC_ASSERT(isRunning(), return true;)
|
||||
|
||||
if (optionalPrompt && !*optionalPrompt)
|
||||
return true;
|
||||
|
||||
const QString question = tr("A debugging session is still in progress. "
|
||||
"Terminating the session in the current"
|
||||
" state can leave the target in an inconsistent state."
|
||||
" Would you still like to terminate it?");
|
||||
|
||||
const QMessageBox::StandardButton answer =
|
||||
QMessageBox::question(debuggerCore()->mainWindow(),
|
||||
tr("Close Debugging Session"), question,
|
||||
QMessageBox::Yes|QMessageBox::No);
|
||||
return answer == QMessageBox::Yes;
|
||||
return showPromptToStopDialog(tr("Close Debugging Session"), question,
|
||||
QString(), QString(), optionalPrompt);
|
||||
}
|
||||
|
||||
RunControl::StopResult DebuggerRunControl::stop()
|
||||
|
Reference in New Issue
Block a user