diff --git a/src/plugins/debugger/breakwindow.cpp b/src/plugins/debugger/breakwindow.cpp index 362ba6bc5b257d1c4ae6c6cfbc6a29e89a7681a5..d26e6ed01f9394d71776d23f2b4e22c8eab5ed97 100644 --- a/src/plugins/debugger/breakwindow.cpp +++ b/src/plugins/debugger/breakwindow.cpp @@ -196,13 +196,14 @@ void BreakWindow::contextMenuEvent(QContextMenuEvent *ev) menu.addAction(deleteAllAction); menu.addAction(deleteByFileAction); menu.addSeparator(); - menu.addAction(adjustColumnAction); - menu.addAction(alwaysAdjustAction); menu.addAction(synchronizeAction); menu.addSeparator(); menu.addAction(breakAtFunctionAction); menu.addAction(breakAtMainAction); menu.addSeparator(); + menu.addAction(adjustColumnAction); + menu.addAction(alwaysAdjustAction); + menu.addSeparator(); menu.addAction(theDebuggerAction(SettingsDialog)); QAction *act = menu.exec(ev->globalPos()); diff --git a/src/plugins/debugger/moduleswindow.cpp b/src/plugins/debugger/moduleswindow.cpp index 927698421d0af0e24b1ed7e2b1c1fe690daa38ef..330634beea5fb7743a0d5743bb5088e7a6c61c7b 100644 --- a/src/plugins/debugger/moduleswindow.cpp +++ b/src/plugins/debugger/moduleswindow.cpp @@ -136,16 +136,20 @@ void ModulesWindow::contextMenuEvent(QContextMenuEvent *ev) menu.addAction(act6); menu.addAction(act7); menu.addSeparator(); - menu.addAction(act1); - menu.addAction(act2); + QAction *actAdjustColumnWidths = + menu.addAction(tr("Adjust column widths to contents")); + QAction *actAlwaysAdjustColumnWidth = + menu.addAction(tr("Always adjust column widths to contents")); + menu.addSeparator(); + menu.addAction(theDebuggerAction(SettingsDialog)); QAction *act = menu.exec(ev->globalPos()); if (act == act0) emit reloadModulesRequested(); - else if (act == act1) + else if (act == actAdjustColumnWidths) resizeColumnsToContents(); - else if (act == act2) + else if (act == actAlwaysAdjustColumnWidth) setAlwaysResizeColumnsToContents(!m_alwaysResizeColumnsToContents); else if (act == act3) emit displaySourceRequested(name); diff --git a/src/plugins/debugger/registerwindow.cpp b/src/plugins/debugger/registerwindow.cpp index baf9ff0802cf36a0c0a97435829e2cb0dc1962ac..356556a48fba2bbd299e436fb01d2c9547b85bba 100644 --- a/src/plugins/debugger/registerwindow.cpp +++ b/src/plugins/debugger/registerwindow.cpp @@ -161,12 +161,6 @@ void RegisterWindow::contextMenuEvent(QContextMenuEvent *ev) { QMenu menu; - QAction *actAdjust = menu.addAction(tr("Adjust column widths to contents")); - QAction *actAlwaysAdjust = - menu.addAction(tr("Always adjust column widths to contents")); - actAlwaysAdjust->setCheckable(true); - actAlwaysAdjust->setChecked(m_alwaysResizeColumnsToContents); - QAction *actReload = menu.addAction(tr("Reload register listing")); QAction *actAlwaysReload = menu.addAction(tr("Always reload register listing")); actAlwaysReload->setCheckable(true); @@ -199,6 +193,13 @@ void RegisterWindow::contextMenuEvent(QContextMenuEvent *ev) act2->setChecked(base == 2); menu.addSeparator(); + QAction *actAdjust = menu.addAction(tr("Adjust column widths to contents")); + QAction *actAlwaysAdjust = + menu.addAction(tr("Always adjust column widths to contents")); + actAlwaysAdjust->setCheckable(true); + actAlwaysAdjust->setChecked(m_alwaysResizeColumnsToContents); + menu.addSeparator(); + menu.addAction(theDebuggerAction(SettingsDialog)); QAction *act = menu.exec(ev->globalPos()); diff --git a/src/plugins/debugger/stackwindow.cpp b/src/plugins/debugger/stackwindow.cpp index 1f397b5114f03308d304cabb5e8265bef3ac854c..5450e20f5d7b33dfa353b8535bb2ee1ba00a98f8 100644 --- a/src/plugins/debugger/stackwindow.cpp +++ b/src/plugins/debugger/stackwindow.cpp @@ -99,19 +99,8 @@ void StackWindow::contextMenuEvent(QContextMenuEvent *ev) StackFrame frame = model()->data(idx, Qt::UserRole).value<StackFrame>(); QString address = frame.address; - qDebug() << "RECV: " << frame.toToolTip(); - QMenu menu; - QAction *actAdjust = menu.addAction(tr("Adjust column widths to contents")); - - QAction *actAlwaysAdjust = - menu.addAction(tr("Always adjust column widths to contents")); - actAlwaysAdjust->setCheckable(true); - actAlwaysAdjust->setChecked(m_alwaysResizeColumnsToContents); - - menu.addSeparator(); - menu.addAction(theDebuggerAction(ExpandStack)); QAction *actCopyContents = menu.addAction(tr("Copy contents to clipboard")); @@ -135,6 +124,15 @@ void StackWindow::contextMenuEvent(QContextMenuEvent *ev) menu.addSeparator(); + QAction *actAdjust = menu.addAction(tr("Adjust column widths to contents")); + + QAction *actAlwaysAdjust = + menu.addAction(tr("Always adjust column widths to contents")); + actAlwaysAdjust->setCheckable(true); + actAlwaysAdjust->setChecked(m_alwaysResizeColumnsToContents); + + menu.addSeparator(); + menu.addAction(theDebuggerAction(SettingsDialog)); QAction *act = menu.exec(ev->globalPos()); diff --git a/src/plugins/debugger/threadswindow.cpp b/src/plugins/debugger/threadswindow.cpp index fe8f93bad1f308f3e685797c2d8f725e78442f94..5e19966895336f90e59530de6807b8dc5f1e5f12 100644 --- a/src/plugins/debugger/threadswindow.cpp +++ b/src/plugins/debugger/threadswindow.cpp @@ -82,12 +82,14 @@ void ThreadsWindow::rowActivated(const QModelIndex &index) void ThreadsWindow::contextMenuEvent(QContextMenuEvent *ev) { QMenu menu; - QAction *act1 = new QAction(tr("Adjust column widths to contents"), &menu); - QAction *act2 = new QAction(tr("Always adjust column widths to contents"), &menu); + QAction *act1 = menu.addAction(tr("Adjust column widths to contents")); + QAction *act2 = menu.addAction(tr("Always adjust column widths to contents")); act2->setCheckable(true); act2->setChecked(m_alwaysResizeColumnsToContents); - menu.addAction(act1); - menu.addAction(act2); + + menu.addSeparator(); + + menu.addAction(theDebuggerAction(SettingsDialog)); QAction *act = menu.exec(ev->globalPos()); diff --git a/src/plugins/debugger/watchwindow.cpp b/src/plugins/debugger/watchwindow.cpp index a41c6721a9a218f0b6384d8c95f488e90a25425a..010308b9864075e4310f62369a831fb7e5121102 100644 --- a/src/plugins/debugger/watchwindow.cpp +++ b/src/plugins/debugger/watchwindow.cpp @@ -242,23 +242,12 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev) } QMenu menu; - QAction *actAdjustColumnWidths = - new QAction(tr("Adjust column widths to contents"), &menu); - - QAction *actAlwaysAdjustColumnWidth = - new QAction(tr("Always adjust column widths to contents"), &menu); - actAlwaysAdjustColumnWidth->setCheckable(true); - actAlwaysAdjustColumnWidth->setChecked(m_alwaysResizeColumnsToContents); - //QAction *actWatchExpressionInWindow // = theDebuggerAction(WatchExpressionInWindow); //menu.addAction(actWatchExpressionInWindow); - QAction *actInsertNewWatchItem = - new QAction(tr("Insert new watch item"), &menu); - - QAction *actSelectWidgetToWatch = - new QAction(tr("Select widget to watch"), &menu); + QAction *actInsertNewWatchItem = menu.addAction(tr("Insert new watch item")); + QAction *actSelectWidgetToWatch = menu.addAction(tr("Select widget to watch")); QString address = model()->data(mi0, AddressRole).toString(); QAction *actWatchKnownMemory = 0; @@ -268,10 +257,8 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev) else actWatchKnownMemory = new QAction(tr("Open memory editor at %1").arg(address), &menu); - - menu.addAction(actAdjustColumnWidths); - menu.addAction(actAlwaysAdjustColumnWidth); menu.addSeparator(); + int atype = (m_type == LocalsType) ? WatchExpression : RemoveWatchExpression; menu.addAction(theDebuggerAction(atype)->updatedAction(exp)); @@ -284,6 +271,15 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev) menu.addSeparator(); menu.addAction(theDebuggerAction(RecheckDebuggingHelpers)); menu.addAction(theDebuggerAction(UseDebuggingHelpers)); + + menu.addSeparator(); + QAction *actAdjustColumnWidths = + menu.addAction(tr("Adjust column widths to contents")); + QAction *actAlwaysAdjustColumnWidth = + menu.addAction(tr("Always adjust column widths to contents")); + actAlwaysAdjustColumnWidth->setCheckable(true); + actAlwaysAdjustColumnWidth->setChecked(m_alwaysResizeColumnsToContents); + menu.addSeparator(); menu.addAction(theDebuggerAction(SettingsDialog));