diff --git a/src/plugins/debugger/watchwindow.cpp b/src/plugins/debugger/watchwindow.cpp index e87e8dda4b5..4a7d51ee9db 100644 --- a/src/plugins/debugger/watchwindow.cpp +++ b/src/plugins/debugger/watchwindow.cpp @@ -90,8 +90,8 @@ const char CurrentIndex[] = "CurrentIndex"; class WatchDelegate : public QItemDelegate { public: - explicit WatchDelegate(WatchTreeView *parent) - : QItemDelegate(parent), m_watchWindow(parent) + explicit WatchDelegate(QObject *parent) + : QItemDelegate(parent) {} QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &, @@ -141,7 +141,7 @@ public: return; WatchHandler *handler = currentEngine()->watchHandler(); handler->removeData(index.data(LocalsINameRole).toByteArray()); - m_watchWindow->watchExpression(value); + handler->watchExpression(value); } void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, @@ -149,9 +149,6 @@ public: { editor->setGeometry(option.rect); } - -private: - WatchTreeView *m_watchWindow; }; // Watch model query helpers.