diff options
author | Liang Qi <liang.qi@qt.io> | 2017-11-09 11:05:03 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-11-09 11:47:57 +0100 |
commit | 88cf04458002d863750e9121af7dcd9bcbfaa169 (patch) | |
tree | caccae211eef1a27fa5caae3a8403830b615bd5e /tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp | |
parent | 19b0ce5daa31e2ffebfcf2701143742302f1deb4 (diff) | |
parent | 579d0cb2bed193ccb1901b121a360f85d1c57a54 (diff) |
Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
src/gui/kernel/qwindow.cpp
src/plugins/platforms/cocoa/qcocoawindow.mm
src/plugins/platforms/windows/qwindowssystemtrayicon.cpp
src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
tests/auto/widgets/kernel/qaction/tst_qaction.cpp
Change-Id: Ifa515dc0ece7eb1471b00c1214149629a7e6a233
Diffstat (limited to 'tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp')
-rw-r--r-- | tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp index 11c24ca86f..f3ce902bbd 100644 --- a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp +++ b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp @@ -38,6 +38,8 @@ #include <qset.h> #include <qtextcodec.h> +#include <QtTest/private/qtesthelpers_p.h> + #if defined(Q_OS_WIN) # include <windows.h> #endif @@ -143,16 +145,6 @@ void tst_QTemporaryFile::getSetCheck() QCOMPARE(true, obj1.autoRemove()); } -static inline bool canHandleUnicodeFileNames() -{ -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) - return true; -#else - // Check for UTF-8 by converting the Euro symbol (see tst_utf8) - return QFile::encodeName(QString(QChar(0x20AC))) == QByteArrayLiteral("\342\202\254"); -#endif -} - static QString hanTestText() { QString text; @@ -201,7 +193,7 @@ void tst_QTemporaryFile::fileTemplate_data() QTest::newRow("set template, with xxx") << "" << "qt_" << ".xxx" << "qt_XXXXXX.xxx"; QTest::newRow("set template, with >6 X's") << "" << "qt_" << ".xxx" << "qt_XXXXXXXXXXXXXX.xxx"; QTest::newRow("set template, with >6 X's, no suffix") << "" << "qt_" << "" << "qt_XXXXXXXXXXXXXX"; - if (canHandleUnicodeFileNames()) { + if (QTestPrivate::canHandleUnicodeFileNames()) { // Test Umlauts (contained in Latin1) QString prefix = "qt_" + umlautTestText(); QTest::newRow("Umlauts") << (prefix + "XXXXXX") << prefix << QString() << QString(); @@ -824,7 +816,7 @@ void tst_QTemporaryFile::QTBUG_4796_data() QTest::newRow("XXXXXXbla") << QString() << QString("bla") << true; QTest::newRow("does-not-exist/qt_temp.XXXXXX") << QString("does-not-exist/qt_temp") << QString() << false; - if (canHandleUnicodeFileNames()) { + if (QTestPrivate::canHandleUnicodeFileNames()) { QTest::newRow("XXXXXX<unicode>") << QString() << unicode << true; QTest::newRow("<unicode>XXXXXX") << unicode << QString() << true; QTest::newRow("<unicode>XXXXXX<unicode>") << unicode << unicode << true; |