From ed7fbf19a6c666c40d0fd8deb306ed51dffb2549 Mon Sep 17 00:00:00 2001 From: Kai Koehne <kai.koehne@nokia.com> Date: Wed, 8 Jun 2011 17:00:46 +0200 Subject: [PATCH] Debugger: Allow users to disable warning about unsupported breakpoints QErrorMessage has by default a 'don't show the message again' checkbox. Change-Id: I4bbb2172298db848870ed1abf9f7d6195bdfe49d Reviewed-on: http://codereview.qt.nokia.com/400 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kai Koehne <kai.koehne@nokia.com> --- src/plugins/debugger/debuggerrunner.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/plugins/debugger/debuggerrunner.cpp b/src/plugins/debugger/debuggerrunner.cpp index cf83be4186d..e35d91604de 100644 --- a/src/plugins/debugger/debuggerrunner.cpp +++ b/src/plugins/debugger/debuggerrunner.cpp @@ -70,6 +70,7 @@ #include <QtCore/QDir> #include <QtCore/QDebug> #include <QtGui/QMessageBox> +#include <QtGui/QErrorMessage> using namespace ProjectExplorer; using namespace Debugger::Internal; @@ -249,19 +250,15 @@ void DebuggerRunControl::start() } foreach (const BreakpointId &id, debuggerCore()->breakHandler()->allBreakpointIds()) { - if (!d->m_engine->acceptsBreakpoint(id)) { - debuggerCore()->showMessage(DebuggerPlugin::tr("Some breakpoints cannot be handled by the current debugger, and will be ignored."), LogWarning); + if (d->m_engine->breakHandler()->breakpointData(id).enabled + && !d->m_engine->acceptsBreakpoint(id)) { - int result = QMessageBox::warning(debuggerCore()->mainWindow(), - DebuggerPlugin::tr("Warning"), DebuggerPlugin::tr("Some breakpoints cannot be handled by the debugger, and will be ignored. Do you want to continue?"), - QMessageBox::Yes | QMessageBox::No); + QString warningMessage = + DebuggerPlugin::tr("Some breakpoints cannot be handled by the debugger " + "languages currently active, and will be ignored."); - if (result == QMessageBox::Cancel) { - emit started(); - emit finished(); - return; - } - break; + debuggerCore()->showMessage(warningMessage, LogWarning); + QErrorMessage::qtHandler()->showMessage(warningMessage); } } -- GitLab