From 4e84be2876543c1bfcab3b854c92a7edade4144b Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Mon, 1 Aug 2011 14:21:56 +1000 Subject: test: fixed tst_qfilesystemmodel and removed insignificant_test tst_qfilesystemmodel::sort uses some internal API to affect the sorting behavior. This means that part of the test must be disabled when private symbols aren't available. Change-Id: I2e7b9d7a33cb3e7032bc5380c03fa29ecc84e12c Reviewed-on: http://codereview.qt.nokia.com/2413 Reviewed-by: Sergio Ahumada Reviewed-by: Qt Sanity Bot --- tests/auto/qfilesystemmodel/qfilesystemmodel.pro | 2 -- tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/auto/qfilesystemmodel/qfilesystemmodel.pro b/tests/auto/qfilesystemmodel/qfilesystemmodel.pro index 88ff56cebf..ab121306e3 100644 --- a/tests/auto/qfilesystemmodel/qfilesystemmodel.pro +++ b/tests/auto/qfilesystemmodel/qfilesystemmodel.pro @@ -14,5 +14,3 @@ symbian: { DEPLOYMENT += dummyDeploy LIBS += -lefsrv } - -CONFIG+=insignificant_test diff --git a/tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp b/tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp index 5f610945ab..5afcf40800 100644 --- a/tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp +++ b/tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp @@ -909,12 +909,16 @@ void tst_QFileSystemModel::sort() expectedOrder << tempFile2.fileName() << tempFile.fileName() << dirPath + QChar('/') + "." << dirPath + QChar('/') + ".."; //File dialog Mode means sub trees are not sorted, only the current root if (fileDialogMode) { + // FIXME: we were only able to disableRecursiveSort in developer builds, so we can only + // stably perform this test for developer builds +#ifdef QT_BUILD_INTERNAL QList actualRows; for(int i = 0; i < myModel->rowCount(parent); ++i) { actualRows << dirPath + QChar('/') + myModel->index(i, 1, parent).data(QFileSystemModel::FileNameRole).toString(); } QVERIFY(actualRows != expectedOrder); +#endif } else { for(int i = 0; i < myModel->rowCount(parent); ++i) { -- cgit v1.2.3