forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user