diff options
Diffstat (limited to 'tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp')
-rw-r--r-- | tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp | 8 |
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 e29a715617..2c0b3f2bcb 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; @@ -1054,7 +1054,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"); @@ -1071,8 +1071,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) |