summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-02-15 04:32:16 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-02-15 04:32:16 (GMT)
commitcebb18bbffeb16a951dbe16dde2811284f359840 (patch)
treef9d93f3fe813b2353911fc9a6f1e7dc24d478a5b /tests
parente1ffe40b36a69ba1b1e3bcd3619e5dc2a2fbe8ba (diff)
parent070208528ca9a532a926d7b38abf4b5df576c0d5 (diff)
downloadQt-cebb18bbffeb16a951dbe16dde2811284f359840.zip
Qt-cebb18bbffeb16a951dbe16dde2811284f359840.tar.gz
Qt-cebb18bbffeb16a951dbe16dde2811284f359840.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-qml
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/declarative.pro5
-rw-r--r--tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp9
-rw-r--r--tests/auto/declarative/qmlengine/qmlengine.pro2
-rw-r--r--tests/auto/declarative/qmlmetatype/tst_qmlmetatype.cpp9
4 files changed, 15 insertions, 10 deletions
diff --git a/tests/auto/declarative/declarative.pro b/tests/auto/declarative/declarative.pro
index 8773026..c0e807e 100644
--- a/tests/auto/declarative/declarative.pro
+++ b/tests/auto/declarative/declarative.pro
@@ -35,7 +35,6 @@ SUBDIRS += \
qmlgraphicstext \ # Cover
qmlgraphicstextedit \ # Cover
qmlgraphicstextinput \ # Cover
- qmlgraphicswebview \ # Cover
qmlinfo \ # Cover
qmlinstruction \ # Cover
qmllanguage \ # Cover
@@ -59,6 +58,10 @@ SUBDIRS += \
qmlxmlhttprequest \ # Cover
sql # Cover
+contains(QT_CONFIG, webkit) {
+ SUBDIRS += \
+ qmlgraphicswebview # Cover
+}
# Tests which should run in Pulse
PULSE_TESTS = $$SUBDIRS
diff --git a/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp b/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp
index e5472bb..4edca69 100644
--- a/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp
+++ b/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp
@@ -45,7 +45,7 @@
#include <QtDeclarative/qmlcontext.h>
#include <QtCore/qfileinfo.h>
#include <QtCore/qdebug.h>
-#include <QtCore/private/qguard_p.h>
+#include <QtDeclarative/private/qmlguard_p.h>
#include <QtCore/qdir.h>
#include <QtCore/qnumeric.h>
#include <private/qmlengine_p.h>
@@ -835,9 +835,9 @@ void tst_qmlecmascript::dynamicCreation()
void tst_qmlecmascript::dynamicDestruction()
{
QmlComponent component(&engine, TEST_FILE("dynamicDeletion.qml"));
- QGuard<MyQmlObject> object = qobject_cast<MyQmlObject*>(component.create());
+ QmlGuard<MyQmlObject> object = qobject_cast<MyQmlObject*>(component.create());
QVERIFY(object != 0);
- QGuard<QObject> createdQmlObject = 0;
+ QmlGuard<QObject> createdQmlObject = 0;
QMetaObject::invokeMethod(object, "create");
createdQmlObject = object->objectProperty();
@@ -846,10 +846,9 @@ void tst_qmlecmascript::dynamicDestruction()
QMetaObject::invokeMethod(object, "killOther");
QVERIFY(createdQmlObject);
- QTest::qWait(0);
QCoreApplication::instance()->processEvents(QEventLoop::DeferredDeletion);
QVERIFY(createdQmlObject);
- for (int ii = 0; createdQmlObject && ii < 10; ++ii) {
+ for (int ii = 0; createdQmlObject && ii < 50; ++ii) { // After 5 seconds we should give up
if (createdQmlObject) {
QTest::qWait(100);
QCoreApplication::instance()->processEvents(QEventLoop::DeferredDeletion);
diff --git a/tests/auto/declarative/qmlengine/qmlengine.pro b/tests/auto/declarative/qmlengine/qmlengine.pro
index 21d55a4..1a0e5f4 100644
--- a/tests/auto/declarative/qmlengine/qmlengine.pro
+++ b/tests/auto/declarative/qmlengine/qmlengine.pro
@@ -1,5 +1,5 @@
load(qttest_p4)
-contains(QT_CONFIG,declarative): QT += declarative webkit network
+contains(QT_CONFIG,declarative): QT += declarative network
macx:CONFIG -= app_bundle
SOURCES += tst_qmlengine.cpp
diff --git a/tests/auto/declarative/qmlmetatype/tst_qmlmetatype.cpp b/tests/auto/declarative/qmlmetatype/tst_qmlmetatype.cpp
index ccb8f30..c336226 100644
--- a/tests/auto/declarative/qmlmetatype/tst_qmlmetatype.cpp
+++ b/tests/auto/declarative/qmlmetatype/tst_qmlmetatype.cpp
@@ -157,9 +157,12 @@ void tst_qmlmetatype::copy()
QT_COPY_TEST(QStringList, QStringList() << "QML" << "Rocks");
QT_COPY_TEST(QByteArray, QByteArray("0x1102DDD"));
QT_COPY_TEST(QBitArray, QBitArray(102, true));
- QT_COPY_TEST(QDate, QDate::currentDate());
- QT_COPY_TEST(QTime, QTime::currentTime());
- QT_COPY_TEST(QDateTime, QDateTime::currentDateTime());
+ QDate cd = QDate::currentDate();
+ QT_COPY_TEST(QDate, cd);
+ QTime ct = QTime::currentTime();
+ QT_COPY_TEST(QTime, ct);
+ QDateTime cdt = QDateTime::currentDateTime();
+ QT_COPY_TEST(QDateTime, cdt);
QT_COPY_TEST(QUrl, QUrl("http://www.nokia.com"));
QT_COPY_TEST(QLocale, QLocale(QLocale::English, QLocale::Australia));
QT_COPY_TEST(QRect, QRect(-10, 10, 102, 99));