Commit ed7fbf19 authored by Kai Koehne's avatar Kai Koehne
Browse files

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: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarKai Koehne <kai.koehne@nokia.com>
parent b4b955e1
......@@ -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);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment