aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger/breakwindow.cpp
diff options
context:
space:
mode:
authorhjk <[email protected]>2009-05-11 13:21:59 +0200
committerhjk <[email protected]>2009-05-11 13:22:21 +0200
commitfc78ae272ba38e4374b775fa9fa608e09d41ae0a (patch)
tree82563f30c4661dc0b5ea6bef548b3cf54a1c7755 /src/plugins/debugger/breakwindow.cpp
parent643d4b94f41030781dd6e0f4c09464bc7c8557ff (diff)
debugger: use short paths by default for setting breakpoints
Diffstat (limited to 'src/plugins/debugger/breakwindow.cpp')
-rw-r--r--src/plugins/debugger/breakwindow.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/debugger/breakwindow.cpp b/src/plugins/debugger/breakwindow.cpp
index 0f4fe90d6d2..6e5f3a6226d 100644
--- a/src/plugins/debugger/breakwindow.cpp
+++ b/src/plugins/debugger/breakwindow.cpp
@@ -82,6 +82,7 @@ void BreakWindow::contextMenuEvent(QContextMenuEvent *ev)
const QModelIndex index = indexAt(ev->pos());
const bool indexIsValid = index.isValid();
const QModelIndex index0 = index.sibling(index.row(), 0);
+ const QModelIndex index2 = index.sibling(index.row(), 2);
QAction *act0 = new QAction(tr("Delete breakpoint"), &menu);
act0->setEnabled(indexIsValid);
QAction *act1 = new QAction(tr("Adjust column widths to contents"), &menu);
@@ -94,10 +95,14 @@ void BreakWindow::contextMenuEvent(QContextMenuEvent *ev)
bool enabled = indexIsValid && model()->data(index0, Qt::UserRole).toBool();
QString str = enabled ? tr("Disable breakpoint") : tr("Enable breakpoint");
QAction *act5 = new QAction(str, &menu);
+ bool fullpath = indexIsValid && model()->data(index2, Qt::UserRole).toBool();
+ QString str1 = fullpath ? tr("Use short path") : tr("Use full path");
+ QAction *act6 = new QAction(str1, &menu);
menu.addAction(act0);
menu.addAction(act3);
menu.addAction(act5);
+ menu.addAction(act6);
menu.addSeparator();
menu.addAction(act1);
menu.addAction(act2);
@@ -120,6 +125,9 @@ void BreakWindow::contextMenuEvent(QContextMenuEvent *ev)
else if (act == act5) {
model()->setData(index0, !enabled);
emit breakpointSynchronizationRequested();
+ } else if (act == act6) {
+ model()->setData(index2, !fullpath);
+ emit breakpointSynchronizationRequested();
}
}