summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-02-09 09:01:01 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-02-09 09:01:01 (GMT)
commit6165ab0203fa80d31f3488ead7e7f7c088c8668c (patch)
treef860c58e85bf4ef5115535728319acb272326b09 /tests
parentd80c2837a41903f66159617fbd0b8b69e4a8da75 (diff)
parent11d9e81b3b1a7f3463edb98fa2303a44f8499462 (diff)
downloadQt-6165ab0203fa80d31f3488ead7e7f7c088c8668c.zip
Qt-6165ab0203fa80d31f3488ead7e7f7c088c8668c.tar.gz
Qt-6165ab0203fa80d31f3488ead7e7f7c088c8668c.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/berlin-staging-1 into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/berlin-staging-1: Assistant: Add missing license header. Compile fixes. S60 style: Compile fix. A few trivial optimizations Rewrote bookmark handling, the previous code was just plain awful. Small style cleanup. Fix some warnings. Designer: Emit QDesignerPropertyEditorInterface::propertyChanged(). Designer: Support the 'windowOpacity'-property for forms. Expanded tst_QFileSystemModel::rootPath() to check directories ending in "." or ".." Assistant: Treat "unfiltered" filter in a apecial way. Assistant: Give meaningful context to translations. Fixed handling of paths containing ".." in QFileSystemModel on Windows. QAbstractItemModel docs: Fix typo. Assistant: Eliminate private tr contexts.
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp b/tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp
index 287f472..9f67a5e 100644
--- a/tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp
+++ b/tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp
@@ -236,6 +236,26 @@ void tst_QFileSystemModel::rootPath()
QCOMPARE(model->rootPath(), QString(QDir::homePath()));
QCOMPARE(rootChanged.count(), oldRootPath == model->rootPath() ? 0 : 1);
QCOMPARE(model->rootDirectory().absolutePath(), QDir::homePath());
+
+ model->setRootPath(QDir::rootPath());
+ int oldCount = rootChanged.count();
+ oldRootPath = model->rootPath();
+ root = model->setRootPath(QDir::homePath() + QLatin1String("/."));
+ QTRY_VERIFY(model->rowCount(root) >= 0);
+ QCOMPARE(model->rootPath(), QDir::homePath());
+ QCOMPARE(rootChanged.count(), oldRootPath == model->rootPath() ? oldCount : oldCount + 1);
+ QCOMPARE(model->rootDirectory().absolutePath(), QDir::homePath());
+
+ QDir newdir = QDir::home();
+ if (newdir.cdUp()) {
+ oldCount = rootChanged.count();
+ oldRootPath = model->rootPath();
+ root = model->setRootPath(QDir::homePath() + QLatin1String("/.."));
+ QTRY_VERIFY(model->rowCount(root) >= 0);
+ QCOMPARE(model->rootPath(), newdir.path());
+ QCOMPARE(rootChanged.count(), oldCount + 1);
+ QCOMPARE(model->rootDirectory().absolutePath(), newdir.path());
+ }
}
void tst_QFileSystemModel::naturalCompare_data()