diff --git a/src/plugins/debugger/debuggeractions.cpp b/src/plugins/debugger/debuggeractions.cpp index 47a72dc0a9b32a07b51eff19ca7e5d6bdc5924dc..d79795cbd28845f17f739392751520ba6dcbd1bb 100644 --- a/src/plugins/debugger/debuggeractions.cpp +++ b/src/plugins/debugger/debuggeractions.cpp @@ -339,6 +339,7 @@ DebuggerSettings *theDebuggerSettings() item = new DebuggerAction(instance); instance->insertItem(WatchExpressionInWindow, item); item->setTextPattern(QObject::tr("Watch expression \"%1\" in separate window")); + //item->setCheckable(true); item = new DebuggerAction(instance); instance->insertItem(AssignValue, item); diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp index 9dcec117d3b488596011ecd21a5cd7c70238e9fe..ab96217b1e8f51ee9f5f4bc8b6cae0b4f6dc8576 100644 --- a/src/plugins/debugger/watchhandler.cpp +++ b/src/plugins/debugger/watchhandler.cpp @@ -499,9 +499,6 @@ QVariant WatchHandler::data(const QModelIndex &idx, int role) const case INameRole: return data.iname; - case VisualRole: - return m_displayedINames.contains(data.iname); - case ExpandedRole: //qDebug() << " FETCHING: " << data.iname // << m_expandedINames.contains(data.iname) diff --git a/src/plugins/debugger/watchhandler.h b/src/plugins/debugger/watchhandler.h index 4cac4a87f9942e4331882ce59cbba550524366ae..a41920381568e8c08c0fc5836566b4a6b7b8abd8 100644 --- a/src/plugins/debugger/watchhandler.h +++ b/src/plugins/debugger/watchhandler.h @@ -132,7 +132,7 @@ public: bool changed; }; -enum { INameRole = Qt::UserRole, ExpressionRole, VisualRole, ExpandedRole }; +enum { INameRole = Qt::UserRole, ExpressionRole, ExpandedRole }; class WatchHandler : public QAbstractItemModel diff --git a/src/plugins/debugger/watchwindow.cpp b/src/plugins/debugger/watchwindow.cpp index ceef4bc1f8ab271e47961200203de0c34786e748..de30e8f38065c5ca265f9acb38850821f1923bd6 100644 --- a/src/plugins/debugger/watchwindow.cpp +++ b/src/plugins/debugger/watchwindow.cpp @@ -54,7 +54,7 @@ using namespace Debugger::Internal; // ///////////////////////////////////////////////////////////////////// -enum { INameRole = Qt::UserRole, ExpressionRole, VisualRole, ExpandedRole }; +enum { INameRole = Qt::UserRole, ExpressionRole, ExpandedRole }; class WatchDelegate : public QItemDelegate { @@ -158,8 +158,6 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev) QAction *act2 = new QAction("Always adjust column widths to contents", &menu); act2->setCheckable(true); act2->setChecked(m_alwaysResizeColumnsToContents); - //QAction *act3 = 0; - QAction *act4 = 0; menu.addAction(act1); menu.addAction(act2); @@ -169,20 +167,16 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev) QString exp = model()->data(mi0).toString(); QModelIndex mi1 = idx.sibling(idx.row(), 0); QString value = model()->data(mi1).toString(); - bool visual = false; menu.addSeparator(); int type = (m_type == LocalsType) ? WatchExpression : RemoveWatchExpression; menu.addAction(theDebuggerAction(type)->updatedAction(exp)); - visual = model()->data(mi0, VisualRole).toBool(); - //act4 = theDebuggerAction(WatchExpressionInWindow)->action(); - //act4->setCheckable(true); - //act4->setChecked(visual); + //QAction *act4 = theDebuggerAction(WatchExpressionInWindow); //menu.addAction(act4); - //act3 = new QAction(tr("Add to watch window..."), &menu); - //menu.addAction(act3); + QAction *act3 = new QAction(tr("Insert new watch item"), &menu); + menu.addAction(act3); menu.addSeparator(); menu.addAction(theDebuggerAction(RecheckDumpers)); @@ -196,10 +190,8 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev) resizeColumnsToContents(); else if (act == act2) setAlwaysResizeColumnsToContents(!m_alwaysResizeColumnsToContents); - else if (act == act4) - model()->setData(mi0, !visual, VisualRole); - else if (act == act4) - model()->setData(mi0, !visual, VisualRole); + else if (act == act3) + theDebuggerAction(WatchExpression)->trigger("<Edit>"); } void WatchWindow::resizeColumnsToContents()