Commit 5b804630 authored by hjk's avatar hjk

Debugger: Fix 'Show Address' stack window context menu action

Change-Id: I59784fbb304882f88538800c4094b8680cb379f8
Reviewed-by: default avatarChristian Stenger <christian.stenger@theqtcompany.com>
parent 623de07a
......@@ -45,7 +45,7 @@ enum StackColumns
StackFileNameColumn,
StackLineNumberColumn,
StackAddressColumn,
StackColumnCount = StackAddressColumn,
StackColumnCount
};
////////////////////////////////////////////////////////////////////////
......
......@@ -60,18 +60,21 @@ StackTreeView::StackTreeView()
{
setWindowTitle(tr("Stack"));
connect(action(UseAddressInStackView), SIGNAL(toggled(bool)),
SLOT(showAddressColumn(bool)));
connect(action(ExpandStack), SIGNAL(triggered()),
SLOT(reloadFullStack()));
connect(action(MaximalStackDepth), SIGNAL(triggered()),
SLOT(reloadFullStack()));
connect(action(UseAddressInStackView), &QAction::toggled,
this, &StackTreeView::showAddressColumn);
connect(action(ExpandStack), &QAction::triggered,
this, &StackTreeView::reloadFullStack);
connect(action(MaximalStackDepth), &QAction::triggered,
this, &StackTreeView::reloadFullStack);
showAddressColumn(false);
}
void StackTreeView::showAddressColumn(bool on)
{
setColumnHidden(StackAddressColumn, !on);
resizeColumnToContents(StackLevelColumn);
resizeColumnToContents(StackLineNumberColumn);
resizeColumnToContents(StackAddressColumn);
}
void StackTreeView::rowActivated(const QModelIndex &index)
......
......@@ -38,19 +38,16 @@ namespace Internal {
class StackTreeView : public Utils::BaseTreeView
{
Q_OBJECT
public:
StackTreeView();
private slots:
void showAddressColumn(bool on);
void reloadFullStack();
private:
void rowActivated(const QModelIndex &index);
void setModel(QAbstractItemModel *model);
void contextMenuEvent(QContextMenuEvent *ev);
void showAddressColumn(bool on);
void reloadFullStack();
void copyContentsToClipboard();
};
......
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