forked from qt-creator/qt-creator
Debugger: Nag user before removing all breakpoints
Change-Id: Idf68cbfee070a107be8f8daf9d6624339864dd2c Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -46,6 +46,7 @@
|
|||||||
#include <QKeyEvent>
|
#include <QKeyEvent>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QLineEdit>
|
#include <QLineEdit>
|
||||||
|
#include <QMessageBox>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QSpinBox>
|
#include <QSpinBox>
|
||||||
#include <QTextEdit>
|
#include <QTextEdit>
|
||||||
@@ -833,7 +834,7 @@ void BreakTreeView::contextMenuEvent(QContextMenuEvent *ev)
|
|||||||
if (act == deleteAction)
|
if (act == deleteAction)
|
||||||
deleteBreakpoints(selectedIds);
|
deleteBreakpoints(selectedIds);
|
||||||
else if (act == deleteAllAction)
|
else if (act == deleteAllAction)
|
||||||
deleteBreakpoints(handler->allBreakpointIds());
|
deleteAllBreakpoints();
|
||||||
else if (act == deleteByFileAction)
|
else if (act == deleteByFileAction)
|
||||||
deleteBreakpoints(breakpointsInFile);
|
deleteBreakpoints(breakpointsInFile);
|
||||||
else if (act == adjustColumnAction)
|
else if (act == adjustColumnAction)
|
||||||
@@ -859,6 +860,16 @@ void BreakTreeView::setBreakpointsEnabled(const BreakpointModelIds &ids, bool en
|
|||||||
handler->setEnabled(id, enabled);
|
handler->setEnabled(id, enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BreakTreeView::deleteAllBreakpoints()
|
||||||
|
{
|
||||||
|
if (QMessageBox::warning(debuggerCore()->mainWindow(),
|
||||||
|
tr("Remove All Breakpoints"),
|
||||||
|
tr("Are you sure you want to remove all breakpoints\n"
|
||||||
|
"from all files in the current session?"),
|
||||||
|
QMessageBox::Yes|QMessageBox::No) == QMessageBox::Yes)
|
||||||
|
deleteBreakpoints(breakHandler()->allBreakpointIds());
|
||||||
|
}
|
||||||
|
|
||||||
void BreakTreeView::deleteBreakpoints(const BreakpointModelIds &ids)
|
void BreakTreeView::deleteBreakpoints(const BreakpointModelIds &ids)
|
||||||
{
|
{
|
||||||
BreakHandler *handler = breakHandler();
|
BreakHandler *handler = breakHandler();
|
||||||
|
@@ -56,6 +56,7 @@ private:
|
|||||||
void mouseDoubleClickEvent(QMouseEvent *ev);
|
void mouseDoubleClickEvent(QMouseEvent *ev);
|
||||||
|
|
||||||
void deleteBreakpoints(const BreakpointModelIds &ids);
|
void deleteBreakpoints(const BreakpointModelIds &ids);
|
||||||
|
void deleteAllBreakpoints();
|
||||||
void addBreakpoint();
|
void addBreakpoint();
|
||||||
void editBreakpoints(const BreakpointModelIds &ids);
|
void editBreakpoints(const BreakpointModelIds &ids);
|
||||||
void associateBreakpoint(const BreakpointModelIds &ids, int thread);
|
void associateBreakpoint(const BreakpointModelIds &ids, int thread);
|
||||||
|
Reference in New Issue
Block a user