diff options
author | hjk <hjk@theqtcompany.com> | 2016-07-18 12:36:31 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2016-07-18 11:17:53 +0000 |
commit | 2d79bdc29c242a04aad3519858ad64712be4de8e (patch) | |
tree | a910e2daeaeca5ce943f33d569f2e88b8a477ad4 /src/plugins/debugger/sourcefileshandler.h | |
parent | 84f1466b01e9098ae983c1f53e376e977921dad9 (diff) |
Debugger: Remove some uses of semi-global currentEngine()
Make use of recent TreeModel improvements in various
tool views, push more operations into the engine-
owned data models, specifically context menu creation.
Change-Id: I479c97102b9fb81611c6461c6df1cec59295179a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/debugger/sourcefileshandler.h')
-rw-r--r-- | src/plugins/debugger/sourcefileshandler.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/debugger/sourcefileshandler.h b/src/plugins/debugger/sourcefileshandler.h index a859880d1e..477175904c 100644 --- a/src/plugins/debugger/sourcefileshandler.h +++ b/src/plugins/debugger/sourcefileshandler.h @@ -31,12 +31,14 @@ namespace Debugger { namespace Internal { +class DebuggerEngine; + class SourceFilesHandler : public QAbstractItemModel { Q_OBJECT public: - SourceFilesHandler(); + explicit SourceFilesHandler(DebuggerEngine *engine); int columnCount(const QModelIndex &parent) const { return parent.isValid() ? 0 : 2; } @@ -47,6 +49,7 @@ public: { return createIndex(row, column); } QVariant headerData(int section, Qt::Orientation orientation, int role) const; QVariant data(const QModelIndex &index, int role) const; + bool setData(const QModelIndex &idx, const QVariant &data, int role) override; Qt::ItemFlags flags(const QModelIndex &index) const; void clearModel(); @@ -57,6 +60,7 @@ public: QAbstractItemModel *model() { return m_proxyModel; } private: + DebuggerEngine *m_engine; QStringList m_shortNames; QStringList m_fullNames; QAbstractItemModel *m_proxyModel; |