summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/itemmodels
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/itemmodels')
-rw-r--r--tests/auto/corelib/itemmodels/itemmodels.pro10
-rw-r--r--tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp6
2 files changed, 10 insertions, 6 deletions
diff --git a/tests/auto/corelib/itemmodels/itemmodels.pro b/tests/auto/corelib/itemmodels/itemmodels.pro
index 7e0e3a0944..c1d75cc2cb 100644
--- a/tests/auto/corelib/itemmodels/itemmodels.pro
+++ b/tests/auto/corelib/itemmodels/itemmodels.pro
@@ -8,6 +8,10 @@ qtHaveModule(gui): SUBDIRS += \
qidentityproxymodel \
qitemselectionmodel \
-qtHaveModule(widgets): SUBDIRS += \
- qitemmodel \
- qsortfilterproxymodel \
+qtHaveModule(widgets) {
+ SUBDIRS += \
+ qsortfilterproxymodel
+
+ qtHaveModule(sql): SUBDIRS += \
+ qitemmodel
+}
diff --git a/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
index 7b6c470dc4..bc8f0c1c51 100644
--- a/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
+++ b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
@@ -3994,21 +3994,21 @@ class DropOnOddRows : public QAbstractListModel
public:
DropOnOddRows(QObject *parent = 0) : QAbstractListModel(parent) {}
- QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override
{
if (role == Qt::DisplayRole)
return (index.row() % 2 == 0) ? "A" : "B";
return QVariant();
}
- int rowCount(const QModelIndex &parent = QModelIndex()) const
+ int rowCount(const QModelIndex &parent = QModelIndex()) const override
{
Q_UNUSED(parent);
return 10;
}
bool canDropMimeData(const QMimeData *, Qt::DropAction,
- int row, int column, const QModelIndex &parent) const Q_DECL_OVERRIDE
+ int row, int column, const QModelIndex &parent) const override
{
Q_UNUSED(row);
Q_UNUSED(column);