AutoTest: Do not duplicate member in derived class

Change-Id: Ia88a484f30b2c5d51fca4a2da8464a01007a0d47
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2017-12-05 07:50:26 +01:00
parent dc1e6519a6
commit 81fd3f7a30
2 changed files with 2 additions and 4 deletions

View File

@@ -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;