diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2011-08-31 13:24:37 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2011-08-31 13:26:27 +0200 |
commit | c5ea7fd39a737ee16e82a6ef49a3149758b96e2b (patch) | |
tree | f14c1b1c25661bbd78f8ffb1de9a3c64a5319232 /tests/auto/corelib | |
parent | 94355ca15a4d451f4a4b858240e2c1a96e26537b (diff) |
Fix autotests to build on Windows.
Basically breakage by <windows.h> being included from the OpenGL
parts of <QtGui/QtGui> included from <QtTest/QtTest>.
Change-Id: Id285fb89c64bf77e2408faac5688acd085579351
Reviewed-on: http://codereview.qt.nokia.com/3952
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'tests/auto/corelib')
7 files changed, 18 insertions, 11 deletions
diff --git a/tests/auto/corelib/concurrent/qfuture/tst_qfuture.cpp b/tests/auto/corelib/concurrent/qfuture/tst_qfuture.cpp index 2178489bd9..d81df0d863 100644 --- a/tests/auto/corelib/concurrent/qfuture/tst_qfuture.cpp +++ b/tests/auto/corelib/concurrent/qfuture/tst_qfuture.cpp @@ -55,6 +55,11 @@ using namespace QtConcurrent; +// COM interface macro. +#if defined(Q_OS_WIN) && defined(interface) +# undef interface +#endif + //TESTED_CLASS= //TESTED_FILES= diff --git a/tests/auto/corelib/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp b/tests/auto/corelib/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp index 33611d7331..970784c5d3 100644 --- a/tests/auto/corelib/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp +++ b/tests/auto/corelib/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp @@ -1499,8 +1499,10 @@ void tst_QtConcurrentFilter::noDetatch() void tst_QtConcurrentFilter::stlContainers() { -#ifdef QT_NO_STL +#if defined(QT_NO_STL) QSKIP("Qt compiled without STL support", SkipAll); +#elif defined(_MSC_VER) && _MSC_VER >= 1600 + QSKIP("Test does not compile with MSVC 2010 (see QTBUG-18996)", SkipAll); #else std::vector<int> vector; vector.push_back(1); diff --git a/tests/auto/corelib/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp b/tests/auto/corelib/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp index 74a254cbf4..8ec49accdf 100644 --- a/tests/auto/corelib/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp +++ b/tests/auto/corelib/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp @@ -2231,7 +2231,7 @@ void tst_QtConcurrentMap::exceptions() try { QList<int> list = QList<int>() << 1 << 2 << 3; QtConcurrent::map(list, throwMapper).waitForFinished(); - } catch (Exception &e) { + } catch (const Exception &) { caught = true; } if (!caught) diff --git a/tests/auto/corelib/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp b/tests/auto/corelib/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp index 772c749711..f22a2ed64b 100644 --- a/tests/auto/corelib/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp +++ b/tests/auto/corelib/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp @@ -445,7 +445,7 @@ void tst_QtConcurrentThreadEngine::exceptions() QtConcurrentExceptionThrower *e = new QtConcurrentExceptionThrower(); QFuture<void> f = e->startAsynchronously(); f.waitForFinished(); - } catch (Exception &e) { + } catch (const Exception &) { caught = true; } if (!caught) @@ -459,7 +459,7 @@ void tst_QtConcurrentThreadEngine::exceptions() try { QtConcurrentExceptionThrower e(QThread::currentThread()); e.startBlocking(); - } catch (Exception &e) { + } catch (const Exception &) { caught = true; } @@ -473,7 +473,7 @@ void tst_QtConcurrentThreadEngine::exceptions() try { QtConcurrentExceptionThrower e(0); e.startBlocking(); - } catch (Exception &e) { + } catch (const Exception &) { caught = true; } @@ -488,7 +488,7 @@ void tst_QtConcurrentThreadEngine::exceptions() UnrelatedExceptionThrower *e = new UnrelatedExceptionThrower(); QFuture<void> f = e->startAsynchronously(); f.waitForFinished(); - } catch (QtConcurrent::UnhandledException &e) { + } catch (const QtConcurrent::UnhandledException &) { caught = true; } if (!caught) @@ -502,7 +502,7 @@ void tst_QtConcurrentThreadEngine::exceptions() try { UnrelatedExceptionThrower e(QThread::currentThread()); e.startBlocking(); - } catch (QtConcurrent::UnhandledException &e) { + } catch (const QtConcurrent::UnhandledException &) { caught = true; } @@ -516,7 +516,7 @@ void tst_QtConcurrentThreadEngine::exceptions() try { UnrelatedExceptionThrower e(0); e.startBlocking(); - } catch (QtConcurrent::UnhandledException &e) { + } catch (const QtConcurrent::UnhandledException &) { caught = true; } diff --git a/tests/auto/corelib/io/qdatastream/qdatastream.pro b/tests/auto/corelib/io/qdatastream/qdatastream.pro index 5e503aea78..51c342c350 100644 --- a/tests/auto/corelib/io/qdatastream/qdatastream.pro +++ b/tests/auto/corelib/io/qdatastream/qdatastream.pro @@ -1,6 +1,6 @@ load(qttest_p4) SOURCES += tst_qdatastream.cpp - +QT += gui widgets wince*: { addFiles.files = datastream.q42 addFiles.path = . diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp index c3d106d2fd..9c9c9ec282 100644 --- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp +++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp @@ -1388,7 +1388,7 @@ void tst_QFileInfo::ntfsJunctionPointsAndSymlinks_data() wchar_t errstr[0x100]; DWORD count = FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM, 0, err, 0, errstr, 0x100, 0); - QString error(QString::fromUtf16(errstr, count)); + QString error(QString::fromWCharArray(errstr, count)); qWarning() << error; //we need at least one data set for the test not to assert fail when skipping _data function QDir target("target"); diff --git a/tests/auto/corelib/io/qprocess/testSoftExit/main_win.cpp b/tests/auto/corelib/io/qprocess/testSoftExit/main_win.cpp index 29dbc46bcf..7bdf796926 100644 --- a/tests/auto/corelib/io/qprocess/testSoftExit/main_win.cpp +++ b/tests/auto/corelib/io/qprocess/testSoftExit/main_win.cpp @@ -54,5 +54,5 @@ int main() PostQuitMessage(0); } - return msg.wParam; + return int(msg.wParam); } |