forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user