From 7cea395d1f4b1e875cc14930e56a6ea2dea0c9a7 Mon Sep 17 00:00:00 2001 From: Kevin Funk Date: Tue, 28 Aug 2012 17:13:42 +0200 Subject: [PATCH] Make tests/auto/corelib compile on Windows CE Change-Id: I71987d40ae69d95f645c4c7d26d50add4c799327 Reviewed-by: Friedemann Kleint --- tests/auto/corelib/io/qfileinfo/qfileinfo.pro | 2 +- tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp | 2 ++ tests/auto/corelib/io/qipaddress/tst_qipaddress.cpp | 2 +- tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp | 4 ++++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/auto/corelib/io/qfileinfo/qfileinfo.pro b/tests/auto/corelib/io/qfileinfo/qfileinfo.pro index 8819cbafff..c4b37a8847 100644 --- a/tests/auto/corelib/io/qfileinfo/qfileinfo.pro +++ b/tests/auto/corelib/io/qfileinfo/qfileinfo.pro @@ -6,5 +6,5 @@ RESOURCES += qfileinfo.qrc TESTDATA += qfileinfo.qrc qfileinfo.pro tst_qfileinfo.cpp resources/file1 resources/file1.ext1 resources/file1.ext1.ext2 -win32*:LIBS += -ladvapi32 -lnetapi32 +win32*:!wince*:LIBS += -ladvapi32 -lnetapi32 DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp index ab5f9486c3..06f93f646e 100644 --- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp +++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp @@ -60,8 +60,10 @@ #define _WIN32_WINNT 0x500 #include #include +#if !defined(Q_OS_WINCE) #include #endif +#endif #include #include #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) diff --git a/tests/auto/corelib/io/qipaddress/tst_qipaddress.cpp b/tests/auto/corelib/io/qipaddress/tst_qipaddress.cpp index bad18fabef..536c8fb1a6 100644 --- a/tests/auto/corelib/io/qipaddress/tst_qipaddress.cpp +++ b/tests/auto/corelib/io/qipaddress/tst_qipaddress.cpp @@ -115,7 +115,7 @@ namespace QTest { ip6.u8[10] << 8 | ip6.u8[11], ip6.u8[12] << 8 | ip6.u8[13], ip6.u8[14] << 8 | ip6.u8[15]); - return strdup(buf); + return qstrdup(buf); } } QT_END_NAMESPACE diff --git a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp index 0c018d7cce..dce2562b54 100644 --- a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp +++ b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp @@ -106,8 +106,10 @@ private slots: void msecsTo(); void operator_eqeq_data(); void operator_eqeq(); +#ifndef Q_OS_WINCE void operator_insert_extract_data(); void operator_insert_extract(); +#endif void currentDateTime(); void currentDateTimeUtc(); void currentDateTimeUtc2(); @@ -1231,6 +1233,7 @@ void tst_QDateTime::operator_eqeq() } } +#ifndef Q_OS_WINCE void tst_QDateTime::operator_insert_extract_data() { QTest::addColumn("dateTime"); @@ -1304,6 +1307,7 @@ void tst_QDateTime::operator_insert_extract() qputenv("TZ", previousTimeZone.toLocal8Bit().constData()); tzset(); } +#endif void tst_QDateTime::toString_strformat_data() {