diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-03-05 13:42:11 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-03-05 13:42:11 +0100 |
commit | 5e8ae03578ecd0538a774505f2f7e2fc626b0ab7 (patch) | |
tree | 3b6f704df4d55d0ed2a5a706acf785541a74a45e /tests/auto/corelib/io | |
parent | 7a5fea113ec6088135b0b6a0fc4297e0ef362bc5 (diff) | |
parent | be3fb9afe50361e4b35d02d28ef30851335b17b6 (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
configure
qmake/generators/mac/pbuilder_pbx.cpp
src/corelib/kernel/qtimerinfo_unix.cpp
src/plugins/platforms/cocoa/qcocoabackingstore.mm
src/plugins/platforms/cocoa/qcocoawindow.mm
src/plugins/platforms/windows/qwindowswindow.cpp
src/plugins/platforms/xcb/qglxintegration.cpp
Change-Id: I8d125fe498f5304874e6976b53f588d3e98a66ac
Diffstat (limited to 'tests/auto/corelib/io')
-rw-r--r-- | tests/auto/corelib/io/qfile/tst_qfile.cpp | 6 | ||||
-rw-r--r-- | tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp | 14 |
2 files changed, 20 insertions, 0 deletions
diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp index ef7c810a90..c0afb83cb1 100644 --- a/tests/auto/corelib/io/qfile/tst_qfile.cpp +++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp @@ -88,6 +88,12 @@ QT_END_NAMESPACE #endif #endif +#ifdef Q_OS_QNX +#ifdef open +#undef open +#endif +#endif + #include <stdio.h> #include <errno.h> diff --git a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp index c4453fd5f2..f94c8eac4f 100644 --- a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp +++ b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp @@ -45,6 +45,7 @@ #include <qstandardpaths.h> #include <qfileinfo.h> #include <qsysinfo.h> +#include <qregexp.h> #ifdef Q_OS_UNIX #include <unistd.h> @@ -72,6 +73,7 @@ private slots: void testCustomRuntimeDirectory(); void testAllWritableLocations_data(); void testAllWritableLocations(); + void testCleanPath(); private: #ifdef Q_XDG_PLATFORM @@ -430,6 +432,18 @@ void tst_qstandardpaths::testAllWritableLocations() QCOMPARE(loc.endsWith(QLatin1Char('/')), false); } +void tst_qstandardpaths::testCleanPath() +{ + const QRegExp filter(QStringLiteral("\\\\")); + QVERIFY(filter.isValid()); + for (int i = 0; i <= QStandardPaths::GenericCacheLocation; ++i) { + const QStringList paths = QStandardPaths::standardLocations(QStandardPaths::StandardLocation(i)); + QVERIFY2(paths.filter(filter).isEmpty(), + qPrintable(QString::fromLatin1("Backslash found in %1 %2") + .arg(i).arg(paths.join(QLatin1Char(','))))); + } +} + QTEST_MAIN(tst_qstandardpaths) #include "tst_qstandardpaths.moc" |