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:
@@ -29,6 +29,8 @@
|
||||
|
||||
#include <QAbstractItemModel>
|
||||
|
||||
namespace Utils { class ItemViewEvent; }
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
@@ -77,20 +79,25 @@ signals:
|
||||
void currentIndexChanged();
|
||||
|
||||
private:
|
||||
// QAbstractTableModel
|
||||
int rowCount(const QModelIndex &parent) const;
|
||||
int columnCount(const QModelIndex &parent) const;
|
||||
QVariant data(const QModelIndex &index, int role) const;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
QVariant data(const QModelIndex &index, int role) const override;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const override;
|
||||
bool setData(const QModelIndex &idx, const QVariant &data, int role) override;
|
||||
|
||||
bool contextMenuEvent(const Utils::ItemViewEvent &event);
|
||||
void resetModel() { beginResetModel(); endResetModel(); }
|
||||
void reloadFullStack();
|
||||
void copyContentsToClipboard();
|
||||
void saveTaskFile();
|
||||
|
||||
DebuggerEngine *m_engine;
|
||||
StackFrames m_stackFrames;
|
||||
int m_currentIndex;
|
||||
bool m_canExpand;
|
||||
bool m_resetLocationScheduled;
|
||||
bool m_contentsValid;
|
||||
int m_currentIndex = -1;
|
||||
bool m_canExpand = false;
|
||||
bool m_resetLocationScheduled = false;
|
||||
bool m_contentsValid = false;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user