diff options
author | Christian Stenger <[email protected]> | 2017-12-05 07:50:26 +0100 |
---|---|---|
committer | Christian Stenger <[email protected]> | 2017-12-19 08:57:37 +0000 |
commit | 81fd3f7a307f3dc7de6bfd9018ac6f5025b34dfe (patch) | |
tree | e9da398489a34e8799f6f59a88abd21015948a4c | |
parent | dc1e6519a613b2759d6ef54a9c1d1dd6579e34aa (diff) |
AutoTest: Do not duplicate member in derived class
Change-Id: Ia88a484f30b2c5d51fca4a2da8464a01007a0d47
Reviewed-by: David Schulz <[email protected]>
-rw-r--r-- | src/plugins/autotest/testtreemodel.cpp | 5 | ||||
-rw-r--r-- | src/plugins/autotest/testtreemodel.h | 1 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/plugins/autotest/testtreemodel.cpp b/src/plugins/autotest/testtreemodel.cpp index 8e11a1b45c7..8afa753ec05 100644 --- a/src/plugins/autotest/testtreemodel.cpp +++ b/src/plugins/autotest/testtreemodel.cpp @@ -400,8 +400,7 @@ QMultiMap<QString, int> TestTreeModel::gtestNamesAndSets() const /***************************** Sort/Filter Model **********************************/ TestTreeSortFilterModel::TestTreeSortFilterModel(TestTreeModel *sourceModel, QObject *parent) - : QSortFilterProxyModel(parent), - m_sourceModel(sourceModel) + : QSortFilterProxyModel(parent) { setSourceModel(sourceModel); } @@ -451,7 +450,7 @@ bool TestTreeSortFilterModel::lessThan(const QModelIndex &left, const QModelInde bool TestTreeSortFilterModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const { - QModelIndex index = m_sourceModel->index(sourceRow, 0,sourceParent); + const QModelIndex index = sourceModel()->index(sourceRow, 0,sourceParent); if (!index.isValid()) return false; diff --git a/src/plugins/autotest/testtreemodel.h b/src/plugins/autotest/testtreemodel.h index 57099204e37..ff74a0c2f96 100644 --- a/src/plugins/autotest/testtreemodel.h +++ b/src/plugins/autotest/testtreemodel.h @@ -116,7 +116,6 @@ protected: bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const; private: - TestTreeModel *m_sourceModel; TestTreeItem::SortMode m_sortMode = TestTreeItem::Alphabetically; FilterMode m_filterMode = Basic; |