summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/dialogs/qfilesystemmodel
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/dialogs/qfilesystemmodel')
-rw-r--r--tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp b/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
index 590b3502f1..7398cc103e 100644
--- a/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
+++ b/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
@@ -826,7 +826,7 @@ void tst_QFileSystemModel::sort()
tree.setModel(myModel.data());
tree.show();
tree.resize(800, 800);
- QVERIFY(QTest::qWaitForWindowActive(&tree));
+ QVERIFY(QTest::qWaitForWindowExposed(&tree));
tree.header()->setSortIndicator(1, Qt::DescendingOrder);
tree.header()->setSectionResizeMode(0, QHeaderView::ResizeToContents);
QStringList dirsToOpen;
@@ -1046,7 +1046,7 @@ void tst_QFileSystemModel::roleNames_data()
{
QTest::addColumn<int>("role");
QTest::addColumn<QByteArray>("roleName");
- QTest::newRow("decoration") << int(Qt::DecorationRole) << QByteArray("decoration");
+ QTest::newRow("decoration") << int(Qt::DecorationRole) << QByteArray("fileIcon");
QTest::newRow("display") << int(Qt::DisplayRole) << QByteArray("display");
QTest::newRow("fileIcon") << int(QFileSystemModel::FileIconRole) << QByteArray("fileIcon");
QTest::newRow("filePath") << int(QFileSystemModel::FilePathRole) << QByteArray("filePath");
@@ -1063,8 +1063,8 @@ void tst_QFileSystemModel::roleNames()
QVERIFY(roles.contains(role));
QFETCH(QByteArray, roleName);
- QList<QByteArray> values = roles.values(role);
- QVERIFY(values.contains(roleName));
+ QCOMPARE(roles.values(role).count(), 1);
+ QCOMPARE(roles.value(role), roleName);
}
static inline QByteArray permissionRowName(bool readOnly, int permission)