summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-04-27 16:13:02 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-04-27 14:24:30 +0000
commit8e98b175fa9fc896b0372ec814ee6600116a027b (patch)
tree644578968bd1325293bb5efa908c390c30bd397b
parent8f031fe77673a023c0a9d6ed38eca2d06267f259 (diff)
Tests: Silence Clang warnings
./stringmodel.h(63,9): warning: 'rowCount' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] int rowCount(const QModelIndex &) const ^ ./stringmodel.h(73,17): warning: 'columnCount' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] virtual int columnCount(const QModelIndex &) const ^ ./stringmodel.h(83,25): warning: 'index' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] virtual QModelIndex index(int row, int column, const QModelIndex &parent) const ./stringmodel.h(92,25): warning: 'parent' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] virtual QModelIndex parent(const QModelIndex &) const ^ ./stringmodel.h(97,14): warning: 'data' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] QVariant data (const QModelIndex & index, int role) const ^ tst_qquicklistview.cpp(8695,18): warning: unused variable 'ctxt' [-Wunused-variable] QQmlContext *ctxt = window->rootContext(); Task-number: QTBUG-63512 Change-Id: Ie928981a601d0462cfadd093815d110f6971d7f5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r--tests/auto/qml/qqmlinstantiator/stringmodel.h10
-rw-r--r--tests/auto/quick/qquicklistview/tst_qquicklistview.cpp2
2 files changed, 5 insertions, 7 deletions
diff --git a/tests/auto/qml/qqmlinstantiator/stringmodel.h b/tests/auto/qml/qqmlinstantiator/stringmodel.h
index b01817375a..6ae3cbb6ee 100644
--- a/tests/auto/qml/qqmlinstantiator/stringmodel.h
+++ b/tests/auto/qml/qqmlinstantiator/stringmodel.h
@@ -60,7 +60,7 @@ public:
endInsertRows();
}
- int rowCount(const QModelIndex &) const
+ int rowCount(const QModelIndex &) const override
{
return items.count();
}
@@ -70,7 +70,7 @@ public:
return roles;
}
- virtual int columnCount(const QModelIndex &) const
+ int columnCount(const QModelIndex &) const override
{
return 1;
}
@@ -80,7 +80,7 @@ public:
return rowCount(QModelIndex()) > 0;
}
- virtual QModelIndex index(int row, int column, const QModelIndex &parent) const
+ QModelIndex index(int row, int column, const QModelIndex &parent) const override
{
Q_UNUSED(column);
if (row>=0 && row<rowCount(parent))
@@ -89,12 +89,12 @@ public:
return QModelIndex();
}
- virtual QModelIndex parent(const QModelIndex &) const
+ QModelIndex parent(const QModelIndex &) const override
{
return QModelIndex();
}
- QVariant data (const QModelIndex & index, int role) const
+ QVariant data (const QModelIndex & index, int role) const override
{
int row = index.row();
if ((row<0) || (row>=items.count()))
diff --git a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
index 4d3a665255..c1daddb561 100644
--- a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
+++ b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
@@ -8692,8 +8692,6 @@ void tst_QQuickListView::QTBUG_34576_velocityZero()
QQuickView *window = new QQuickView(nullptr);
window->setGeometry(0,0,240,320);
- QQmlContext *ctxt = window->rootContext();
-
QString filename(testFile("qtbug34576.qml"));
window->setSource(QUrl::fromLocalFile(filename));
window->show();