aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger/breakwindow.cpp
diff options
context:
space:
mode:
authorhjk <[email protected]>2009-10-01 11:22:44 +0200
committerhjk <[email protected]>2009-10-01 11:42:04 +0200
commitccd37a6655ed1d840a553902120cdcf3e2119518 (patch)
tree860615fade6d7a8868e84704a82e27dc3b2b1daf /src/plugins/debugger/breakwindow.cpp
parentd9d39ab218a51dc036f842e2a93bf4ade68924c8 (diff)
debugger: make 'address column' in stack and breakpoint view optional
Diffstat (limited to 'src/plugins/debugger/breakwindow.cpp')
-rw-r--r--src/plugins/debugger/breakwindow.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/plugins/debugger/breakwindow.cpp b/src/plugins/debugger/breakwindow.cpp
index d26e6ed01f9..46dc6faac71 100644
--- a/src/plugins/debugger/breakwindow.cpp
+++ b/src/plugins/debugger/breakwindow.cpp
@@ -93,6 +93,13 @@ BreakWindow::BreakWindow(QWidget *parent)
this, SLOT(rowActivated(QModelIndex)));
connect(act, SIGNAL(toggled(bool)),
this, SLOT(setAlternatingRowColorsHelper(bool)));
+ connect(theDebuggerAction(UseAddressInBreakpointsView), SIGNAL(toggled(bool)),
+ this, SLOT(showAddressColumn(bool)));
+}
+
+void BreakWindow::showAddressColumn(bool on)
+{
+ setColumnHidden(6, !on);
}
static QModelIndexList normalizeIndexes(const QModelIndexList &list)
@@ -201,6 +208,8 @@ void BreakWindow::contextMenuEvent(QContextMenuEvent *ev)
menu.addAction(breakAtFunctionAction);
menu.addAction(breakAtMainAction);
menu.addSeparator();
+ menu.addAction(theDebuggerAction(UseToolTipsInBreakpointsView));
+ menu.addAction(theDebuggerAction(UseAddressInBreakpointsView));
menu.addAction(adjustColumnAction);
menu.addAction(alwaysAdjustAction);
menu.addSeparator();
@@ -300,10 +309,8 @@ void BreakWindow::editConditions(const QModelIndexList &list)
void BreakWindow::resizeColumnsToContents()
{
- resizeColumnToContents(0);
- resizeColumnToContents(1);
- resizeColumnToContents(2);
- resizeColumnToContents(3);
+ for (int i = model()->columnCount(); --i >= 0; )
+ resizeColumnToContents(i);
}
void BreakWindow::setAlwaysResizeColumnsToContents(bool on)
@@ -311,10 +318,8 @@ void BreakWindow::setAlwaysResizeColumnsToContents(bool on)
m_alwaysResizeColumnsToContents = on;
QHeaderView::ResizeMode mode = on
? QHeaderView::ResizeToContents : QHeaderView::Interactive;
- header()->setResizeMode(0, mode);
- header()->setResizeMode(1, mode);
- header()->setResizeMode(2, mode);
- header()->setResizeMode(3, mode);
+ for (int i = model()->columnCount(); --i >= 0; )
+ header()->setResizeMode(i, mode);
}
void BreakWindow::rowActivated(const QModelIndex &idx)