summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorToby Tomkins <toby.tomkins@nokia.com>2011-06-08 12:38:22 (GMT)
committerToby Tomkins <toby.tomkins@nokia.com>2011-06-08 12:38:22 (GMT)
commitbe25f9e17eac2b99d83951dbc0bd1b6e09d91e57 (patch)
treee10e3bade3973f66907e3152daeb4fc6cfe247a8 /tests
parent33db4e2533b3e4e07d37b651b65491195be403ab (diff)
parentf6909d47b981720cb87cb96454cdf9ea493383ee (diff)
downloadQt-be25f9e17eac2b99d83951dbc0bd1b6e09d91e57.zip
Qt-be25f9e17eac2b99d83951dbc0bd1b6e09d91e57.tar.gz
Qt-be25f9e17eac2b99d83951dbc0bd1b6e09d91e57.tar.bz2
Merge remote branch 'upstream/4.8' into qt-4.8-from-4.7
Conflicts: src/gui/styles/qs60style.cpp
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qdatetime/qdatetime.pro4
-rw-r--r--tests/auto/qdatetime/tst_qdatetime.cpp7
-rw-r--r--tests/auto/qeventloop/tst_qeventloop.cpp11
-rw-r--r--tests/auto/qscriptextensionplugin/staticplugin/staticplugin.pro1
-rw-r--r--tests/auto/qstring/tst_qstring.cpp2
-rw-r--r--tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp5
-rw-r--r--tests/auto/qurl/tst_qurl.cpp4
-rw-r--r--tests/benchmarks/gui/kernel/qguimetatype/tst_qguimetatype.cpp6
-rw-r--r--tests/benchmarks/gui/kernel/qguivariant/tst_qguivariant.cpp6
9 files changed, 35 insertions, 11 deletions
diff --git a/tests/auto/qdatetime/qdatetime.pro b/tests/auto/qdatetime/qdatetime.pro
index 08a321e..a3f3091 100644
--- a/tests/auto/qdatetime/qdatetime.pro
+++ b/tests/auto/qdatetime/qdatetime.pro
@@ -1,5 +1,4 @@
load(qttest_p4)
-
SOURCES += tst_qdatetime.cpp
QT = core
@@ -10,6 +9,5 @@ win32-msvc|win32-msvc9x {
QMAKE_CFLAGS_RELEASE -= -O1
QMAKE_CXXFLAGS_RELEASE -= -O1
}
-
-
CONFIG += parallel_test
+HEADERS = tst_qdatetime.loc
diff --git a/tests/auto/qdatetime/tst_qdatetime.cpp b/tests/auto/qdatetime/tst_qdatetime.cpp
index 95995e8..5462250 100644
--- a/tests/auto/qdatetime/tst_qdatetime.cpp
+++ b/tests/auto/qdatetime/tst_qdatetime.cpp
@@ -155,9 +155,16 @@ Q_DECLARE_METATYPE(QTime)
tst_QDateTime::tst_QDateTime()
{
+#ifdef Q_OS_SYMBIAN
+ // Symbian's timezone server cannot handle DST correctly for dates before year 1997
+ uint x1 = QDateTime(QDate(2000, 1, 1), QTime()).toTime_t();
+ uint x2 = QDateTime(QDate(2000, 6, 1), QTime()).toTime_t();
+ europeanTimeZone = (x1 == 946681200 && x2 == 959810400);
+#else
uint x1 = QDateTime(QDate(1990, 1, 1), QTime()).toTime_t();
uint x2 = QDateTime(QDate(1990, 6, 1), QTime()).toTime_t();
europeanTimeZone = (x1 == 631148400 && x2 == 644191200);
+#endif
}
tst_QDateTime::~tst_QDateTime()
diff --git a/tests/auto/qeventloop/tst_qeventloop.cpp b/tests/auto/qeventloop/tst_qeventloop.cpp
index b31f8cd..7a8c441 100644
--- a/tests/auto/qeventloop/tst_qeventloop.cpp
+++ b/tests/auto/qeventloop/tst_qeventloop.cpp
@@ -602,10 +602,12 @@ public slots:
QTcpSocket *serverSocket = server->nextPendingConnection();
serverSocket->write(data, size);
serverSocket->flush();
- QTest::qSleep(200); //allow the TCP/IP stack time to loopback the data, so our socket is ready to read
- QCoreApplication::processEvents(QEventLoop::ExcludeSocketNotifiers);
+ QEventLoop loop;
+ QTimer::singleShot(200, &loop, SLOT(quit())); //allow the TCP/IP stack time to loopback the data, so our socket is ready to read
+ loop.exec(QEventLoop::ExcludeSocketNotifiers);
testResult = dataArrived;
- QCoreApplication::processEvents(); //check the deferred event is processed
+ QTimer::singleShot(200, &loop, SLOT(quit()));
+ loop.exec(); //check the deferred event is processed
serverSocket->close();
QThread::currentThread()->exit(0);
}
@@ -631,6 +633,9 @@ public:
void tst_QEventLoop::processEventsExcludeSocket()
{
+#if defined(Q_WS_QWS)
+ QSKIP("Socket message seems to be leaking through QEventLoop::exec(ExcludeSocketNotifiers) on qws (QTBUG-19699)", SkipAll);
+#endif
SocketTestThread thread;
thread.start();
QVERIFY(thread.wait());
diff --git a/tests/auto/qscriptextensionplugin/staticplugin/staticplugin.pro b/tests/auto/qscriptextensionplugin/staticplugin/staticplugin.pro
index a003338..65c4e8f 100644
--- a/tests/auto/qscriptextensionplugin/staticplugin/staticplugin.pro
+++ b/tests/auto/qscriptextensionplugin/staticplugin/staticplugin.pro
@@ -1,5 +1,6 @@
TEMPLATE = lib
CONFIG += static plugin
+CONFIG -= create_prl # not needed, and complicates debug/release
SOURCES = staticplugin.cpp
RESOURCES = staticplugin.qrc
QT = core script
diff --git a/tests/auto/qstring/tst_qstring.cpp b/tests/auto/qstring/tst_qstring.cpp
index 11fd986..c19b168 100644
--- a/tests/auto/qstring/tst_qstring.cpp
+++ b/tests/auto/qstring/tst_qstring.cpp
@@ -4334,7 +4334,7 @@ void tst_QString::localeAwareCompare_data()
void tst_QString::localeAwareCompare()
{
#ifdef Q_OS_SYMBIAN
- QSKIP("QTBUG-16921: There is no way to set up the system locale, so this test is not reliable in Symbian.");
+ QSKIP("QTBUG-16921: There is no way to set up the system locale, so this test is not reliable in Symbian.", SkipSingle);
#else
#ifdef Q_OS_WIN
# ifndef Q_OS_WINCE
diff --git a/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp b/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp
index 1799019..a4fc1a9 100644
--- a/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp
+++ b/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp
@@ -1608,7 +1608,12 @@ class ChangeEventWidget : public QWidget
static bool recurse = false;
if (!recurse) {
recurse = true;
+
+#ifdef Q_OS_SYMBIAN
+ QStyle *style = new QWindowsStyle();
+#else
QStyle *style = new QMotifStyle;
+#endif
style->setParent(this);
setStyle(style);
recurse = false;
diff --git a/tests/auto/qurl/tst_qurl.cpp b/tests/auto/qurl/tst_qurl.cpp
index ae27c4a..b78679b 100644
--- a/tests/auto/qurl/tst_qurl.cpp
+++ b/tests/auto/qurl/tst_qurl.cpp
@@ -3170,8 +3170,8 @@ void tst_QUrl::nameprep_testsuite_data()
#ifdef QT_BUILD_INTERNAL
QT_BEGIN_NAMESPACE
-extern void qt_nameprep(QString *source, int from);
-extern bool qt_check_std3rules(const QChar *, int);
+Q_CORE_EXPORT extern void qt_nameprep(QString *source, int from);
+Q_CORE_EXPORT extern bool qt_check_std3rules(const QChar *, int);
QT_END_NAMESPACE
#endif
diff --git a/tests/benchmarks/gui/kernel/qguimetatype/tst_qguimetatype.cpp b/tests/benchmarks/gui/kernel/qguimetatype/tst_qguimetatype.cpp
index 17eb5a3..941522f 100644
--- a/tests/benchmarks/gui/kernel/qguimetatype/tst_qguimetatype.cpp
+++ b/tests/benchmarks/gui/kernel/qguimetatype/tst_qguimetatype.cpp
@@ -68,8 +68,12 @@ tst_QGuiMetaType::~tst_QGuiMetaType()
void tst_QGuiMetaType::constructGuiType_data()
{
QTest::addColumn<int>("typeId");
- for (int i = QMetaType::FirstGuiType; i <= QMetaType::LastGuiType; ++i)
+ for (int i = QMetaType::FirstGuiType; i <= QMetaType::LastGuiType; ++i) {
+#ifndef QT3_SUPPORT
+ if (i != 63) // QMetaType::QColorGroup (63) requires QT3_SUPPORT
+#endif
QTest::newRow(QMetaType::typeName(i)) << i;
+ }
}
// Tests how fast QMetaType can default-construct and destroy a Qt GUI
diff --git a/tests/benchmarks/gui/kernel/qguivariant/tst_qguivariant.cpp b/tests/benchmarks/gui/kernel/qguivariant/tst_qguivariant.cpp
index 30da548..70467bc 100644
--- a/tests/benchmarks/gui/kernel/qguivariant/tst_qguivariant.cpp
+++ b/tests/benchmarks/gui/kernel/qguivariant/tst_qguivariant.cpp
@@ -70,8 +70,12 @@ tst_QGuiVariant::~tst_QGuiVariant()
void tst_QGuiVariant::createGuiType_data()
{
QTest::addColumn<int>("typeId");
- for (int i = QMetaType::FirstGuiType; i <= QMetaType::LastGuiType; ++i)
+ for (int i = QMetaType::FirstGuiType; i <= QMetaType::LastGuiType; ++i) {
+#ifndef QT3_SUPPORT
+ if (i != 63) // QMetaType::QColorGroup (63) requires QT3_SUPPORT
+#endif
QTest::newRow(QMetaType::typeName(i)) << i;
+ }
}
// Tests how fast a Qt GUI type can be default-constructed by a