summaryrefslogtreecommitdiffstats
path: root/tests/auto/qfiledialog/tst_qfiledialog.cpp
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2009-04-16 08:24:47 (GMT)
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-04-16 08:24:47 (GMT)
commitee1e6222114028c2ff181f972e32f15011723b5f (patch)
treecac3620d648f1a7c6668c7bb3795cb0f4295baf9 /tests/auto/qfiledialog/tst_qfiledialog.cpp
parentcbec6d9481bf8f55834eafac4eca53f85206b240 (diff)
parentd43d33eb3121519d0025ad433d5c186365c47ef6 (diff)
downloadQt-ee1e6222114028c2ff181f972e32f15011723b5f.zip
Qt-ee1e6222114028c2ff181f972e32f15011723b5f.tar.gz
Qt-ee1e6222114028c2ff181f972e32f15011723b5f.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into windows-7-multitouch
Diffstat (limited to 'tests/auto/qfiledialog/tst_qfiledialog.cpp')
-rw-r--r--tests/auto/qfiledialog/tst_qfiledialog.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/qfiledialog/tst_qfiledialog.cpp b/tests/auto/qfiledialog/tst_qfiledialog.cpp
index bade586..695bfe7 100644
--- a/tests/auto/qfiledialog/tst_qfiledialog.cpp
+++ b/tests/auto/qfiledialog/tst_qfiledialog.cpp
@@ -681,6 +681,22 @@ void tst_QFiledialog::filters()
for (int i = views.at(0)->currentIndex(); i < views.at(0)->count(); ++i)
views.at(0)->setCurrentIndex(i);
QCOMPARE(spyFilterSelected.count(), 0);
+
+ //Let check if filters with whitespaces
+ QNonNativeFileDialog fd2;
+ QStringList expected;
+ expected << "C++ Source Files(*.cpp)";
+ expected << "Any(*.*)";
+ fd2.setFilter("C++ Source Files(*.cpp);;Any(*.*)");
+ QCOMPARE(expected, fd2.filters());
+ fd2.setFilter("C++ Source Files(*.cpp) ;;Any(*.*)");
+ QCOMPARE(expected, fd2.filters());
+ fd2.setFilter("C++ Source Files(*.cpp);; Any(*.*)");
+ QCOMPARE(expected, fd2.filters());
+ fd2.setFilter(" C++ Source Files(*.cpp);; Any(*.*)");
+ QCOMPARE(expected, fd2.filters());
+ fd2.setFilter("C++ Source Files(*.cpp) ;; Any(*.*)");
+ QCOMPARE(expected, fd2.filters());
}
void tst_QFiledialog::selectFilter()