Fix break point warning dialog

QMessageBox apparently only saves the state in the actual
QMessageBox instance ... anyhow, it's the only place in
QtCreator where we use QMessageBox, which makes it look
somewhat alien. Instead, use CheckableMessageBox and
extend it for an information dialog.

Task-number: QTCREATORBUG-9876

Change-Id: I8014e972943dd4a336952325ebb9f6cbc5dd0902
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
Kai Koehne
2013-09-13 16:12:04 +02:00
committed by hjk
parent f29ce3d9b9
commit 3bdc50d1b1
3 changed files with 40 additions and 4 deletions

View File

@@ -54,11 +54,11 @@
#include <projectexplorer/target.h>
#include <projectexplorer/taskhub.h>
#include <utils/checkablemessagebox.h>
#include <utils/qtcassert.h>
#include <utils/qtcprocess.h>
#include <coreplugin/icore.h>
#include <QErrorMessage>
#include <QTcpServer>
using namespace Debugger::Internal;
@@ -209,9 +209,14 @@ void DebuggerRunControl::start()
debuggerCore()->showMessage(warningMessage, LogWarning);
QErrorMessage *msgBox = new QErrorMessage(debuggerCore()->mainWindow());
msgBox->setAttribute(Qt::WA_DeleteOnClose);
msgBox->showMessage(warningMessage);
static bool checked = true;
if (!checked)
break;
CheckableMessageBox::information(debuggerCore()->mainWindow(),
tr("Debugger"),
warningMessage,
tr("&Show this message again."),
&checked, QDialogButtonBox::Ok);
break;
}
}