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:
@@ -625,6 +625,18 @@ bool S60DeviceRunControl::isRunning() const
|
||||
}
|
||||
}
|
||||
|
||||
bool S60DeviceRunControl::promptToStop(bool *) const
|
||||
{
|
||||
// We override the settings prompt
|
||||
QTC_ASSERT(isRunning(), return true;)
|
||||
|
||||
const QString question = tr("<html><head/><body><center><i>%1</i> is still running on the device.<center/>"
|
||||
"<center>Terminating it can leave the target in an inconsistent state.</center>"
|
||||
"<center>Would you still like to terminate it?</center></body></html>").arg(displayName());
|
||||
return showPromptToStopDialog(tr("Application Still Running"), question,
|
||||
tr("Force Quit"), tr("Keep Running"));
|
||||
}
|
||||
|
||||
void S60DeviceRunControl::startLaunching()
|
||||
{
|
||||
QString errorMessage;
|
||||
@@ -1085,3 +1097,9 @@ void S60DeviceDebugRunControl::start()
|
||||
appendMessage(tr("Launching debugger..."), NormalMessageFormat);
|
||||
Debugger::DebuggerRunControl::start();
|
||||
}
|
||||
|
||||
bool S60DeviceDebugRunControl::promptToStop(bool *) const
|
||||
{
|
||||
// We override the settings prompt
|
||||
return Debugger::DebuggerRunControl::promptToStop(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user