forked from qt-creator/qt-creator
Gerrit: Refactor preparing the introduction of a hierarchical model.
Change model and dialog methods to use QModelIndex and remove obsolete methods. Split out method to populate a list of standard items from a change. Change GerritModel::itemForId() to recurse over the tree. Change-Id: I9393f498ffbdf63ba3ad78146d041bcda3835527 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -115,8 +115,8 @@ public:
|
||||
GerritModel(const QSharedPointer<GerritParameters> &, QObject *parent = 0);
|
||||
~GerritModel();
|
||||
|
||||
GerritChangePtr change(int row) const;
|
||||
QString toHtml(int row) const;
|
||||
GerritChangePtr change(const QModelIndex &index) const;
|
||||
QString toHtml(const QModelIndex &index) const;
|
||||
|
||||
QStandardItem *itemForId(const QString &id) const;
|
||||
|
||||
@@ -133,9 +133,9 @@ private slots:
|
||||
void clearData();
|
||||
|
||||
private:
|
||||
inline bool evaluateQuery(QString *errorMessage);
|
||||
QString dependencyHtml(const QString &header, const QString &changeId,
|
||||
const QString &serverPrefix) const;
|
||||
QList<QStandardItem *> changeToRow(const GerritChangePtr &c) const;
|
||||
|
||||
const QSharedPointer<GerritParameters> m_parameters;
|
||||
QueryContext *m_query;
|
||||
|
||||
Reference in New Issue
Block a user