diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-02-15 07:23:17 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-02-15 07:23:17 (GMT) |
commit | a14b8805945c5e00be26092406a468fd8b8acc14 (patch) | |
tree | 56a7c90ffdcbbab0fd8a034130b75ae7e7f43af2 | |
parent | af36be2c7257870e1ad094ec7b2cc37ae4ca2176 (diff) | |
parent | 988c69de1a16080bf9646f9698ff62cc5541e0b8 (diff) | |
download | Qt-a14b8805945c5e00be26092406a468fd8b8acc14.zip Qt-a14b8805945c5e00be26092406a468fd8b8acc14.tar.gz Qt-a14b8805945c5e00be26092406a468fd8b8acc14.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt-qml
18 files changed, 45 insertions, 17 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicsitem.h b/src/declarative/graphicsitems/qmlgraphicsitem.h index 8ae2d5c..e0f33c7 100644 --- a/src/declarative/graphicsitems/qmlgraphicsitem.h +++ b/src/declarative/graphicsitems/qmlgraphicsitem.h @@ -50,6 +50,7 @@ #include <QtGui/qgraphicsitem.h> #include <QtGui/qgraphicstransform.h> #include <QtGui/qfont.h> +#include <QtGui/qaction.h> QT_BEGIN_HEADER @@ -233,6 +234,7 @@ QML_DECLARE_TYPE(QmlGraphicsItem) QML_DECLARE_TYPE(QGraphicsTransform) QML_DECLARE_TYPE(QGraphicsScale) QML_DECLARE_TYPE(QGraphicsRotation) +QML_DECLARE_TYPE(QAction) QT_END_HEADER diff --git a/src/declarative/graphicsitems/qmlgraphicsitemsmodule.cpp b/src/declarative/graphicsitems/qmlgraphicsitemsmodule.cpp index d2cfb1a..127aec8 100644 --- a/src/declarative/graphicsitems/qmlgraphicsitemsmodule.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsitemsmodule.cpp @@ -74,8 +74,10 @@ #include "qmlgraphicstextedit_p.h" #include "qmlgraphicstextinput_p.h" #include "qmlgraphicsvisualitemmodel_p.h" +#ifdef QT_WEBKIT_LIB #include "qmlgraphicswebview_p.h" #include "qmlgraphicswebview_p_p.h" +#endif #include "qmlgraphicsanchors_p.h" #define QML_REGISTER_TYPE(URI,VMAJ,VMIN,TYPE,CLASS) \ @@ -140,7 +142,9 @@ void QmlGraphicsItemModule::defineModule() QML_REGISTER_TYPE(Qt,4,6,VisibleArea,QmlGraphicsFlickableVisibleArea); QML_REGISTER_TYPE(Qt,4,6,VisualDataModel,QmlGraphicsVisualDataModel); QML_REGISTER_TYPE(Qt,4,6,VisualItemModel,QmlGraphicsVisualItemModel); +#ifdef QT_WEBKIT_LIB QML_REGISTER_TYPE(Qt,4,6,WebView,QmlGraphicsWebView); +#endif QML_REGISTER_NOCREATE_TYPE(QmlGraphicsAnchors); QML_REGISTER_NOCREATE_TYPE(QGraphicsEffect); @@ -154,5 +158,7 @@ void QmlGraphicsItemModule::defineModule() QML_REGISTER_NOCREATE_TYPE(QValidator); QML_REGISTER_NOCREATE_TYPE(QmlGraphicsVisualModel); QML_REGISTER_NOCREATE_TYPE(QAction); +#ifdef QT_WEBKIT_LIB QML_REGISTER_NOCREATE_TYPE(QmlGraphicsWebSettings); +#endif } diff --git a/src/declarative/graphicsitems/qmlgraphicswebview_p.h b/src/declarative/graphicsitems/qmlgraphicswebview_p.h index c370c59..0aaf895 100644 --- a/src/declarative/graphicsitems/qmlgraphicswebview_p.h +++ b/src/declarative/graphicsitems/qmlgraphicswebview_p.h @@ -275,7 +275,6 @@ QT_END_NAMESPACE QML_DECLARE_TYPE(QmlGraphicsWebView) QML_DECLARE_TYPEINFO(QmlGraphicsWebView, QML_HAS_ATTACHED_PROPERTIES) -QML_DECLARE_TYPE(QAction) QT_END_HEADER 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)); diff --git a/tests/auto/declarative/qmlxmlhttprequest/data/abort.reply b/tests/auto/declarative/qmlxmlhttprequest/data/abort.reply index 35b11f4..7ae6951 100644 --- a/tests/auto/declarative/qmlxmlhttprequest/data/abort.reply +++ b/tests/auto/declarative/qmlxmlhttprequest/data/abort.reply @@ -1,2 +1,3 @@ HTTP/1.0 200 OK +Connection: close Content-type: text/html; charset=UTF-8 diff --git a/tests/auto/declarative/qmlxmlhttprequest/data/getResponseHeader.reply b/tests/auto/declarative/qmlxmlhttprequest/data/getResponseHeader.reply index 62ec67b..c4b4bb2 100644 --- a/tests/auto/declarative/qmlxmlhttprequest/data/getResponseHeader.reply +++ b/tests/auto/declarative/qmlxmlhttprequest/data/getResponseHeader.reply @@ -1,4 +1,5 @@ HTTP/1.0 200 OK +Connection: close Content-type: text/html; charset=UTF-8 Test-Header: TestValue MultiTest-Header: TestValue diff --git a/tests/auto/declarative/qmlxmlhttprequest/data/open_network.reply b/tests/auto/declarative/qmlxmlhttprequest/data/open_network.reply index 35b11f4..7ae6951 100644 --- a/tests/auto/declarative/qmlxmlhttprequest/data/open_network.reply +++ b/tests/auto/declarative/qmlxmlhttprequest/data/open_network.reply @@ -1,2 +1,3 @@ HTTP/1.0 200 OK +Connection: close Content-type: text/html; charset=UTF-8 diff --git a/tests/auto/declarative/qmlxmlhttprequest/data/send_data.reply b/tests/auto/declarative/qmlxmlhttprequest/data/send_data.reply index 35b11f4..7ae6951 100644 --- a/tests/auto/declarative/qmlxmlhttprequest/data/send_data.reply +++ b/tests/auto/declarative/qmlxmlhttprequest/data/send_data.reply @@ -1,2 +1,3 @@ HTTP/1.0 200 OK +Connection: close Content-type: text/html; charset=UTF-8 diff --git a/tests/auto/declarative/qmlxmlhttprequest/data/send_ignoreData.reply b/tests/auto/declarative/qmlxmlhttprequest/data/send_ignoreData.reply index 35b11f4..7ae6951 100644 --- a/tests/auto/declarative/qmlxmlhttprequest/data/send_ignoreData.reply +++ b/tests/auto/declarative/qmlxmlhttprequest/data/send_ignoreData.reply @@ -1,2 +1,3 @@ HTTP/1.0 200 OK +Connection: close Content-type: text/html; charset=UTF-8 diff --git a/tests/auto/declarative/qmlxmlhttprequest/data/setRequestHeader.reply b/tests/auto/declarative/qmlxmlhttprequest/data/setRequestHeader.reply index 35b11f4..7ae6951 100644 --- a/tests/auto/declarative/qmlxmlhttprequest/data/setRequestHeader.reply +++ b/tests/auto/declarative/qmlxmlhttprequest/data/setRequestHeader.reply @@ -1,2 +1,3 @@ HTTP/1.0 200 OK +Connection: close Content-type: text/html; charset=UTF-8 diff --git a/tests/auto/declarative/qmlxmlhttprequest/data/setRequestHeader_illegalName.qml b/tests/auto/declarative/qmlxmlhttprequest/data/setRequestHeader_illegalName.qml index bf31eca..e9535d5 100644 --- a/tests/auto/declarative/qmlxmlhttprequest/data/setRequestHeader_illegalName.qml +++ b/tests/auto/declarative/qmlxmlhttprequest/data/setRequestHeader_illegalName.qml @@ -46,6 +46,7 @@ QtObject { x.onreadystatechange = function() { if (x.readyState == XMLHttpRequest.DONE) { dataOK = (x.responseText == "QML Rocks!\n"); + print("DATA:" + x.responseText); } } diff --git a/tests/auto/declarative/qmlxmlhttprequest/data/status.200.reply b/tests/auto/declarative/qmlxmlhttprequest/data/status.200.reply index 35b11f4..7ae6951 100644 --- a/tests/auto/declarative/qmlxmlhttprequest/data/status.200.reply +++ b/tests/auto/declarative/qmlxmlhttprequest/data/status.200.reply @@ -1,2 +1,3 @@ HTTP/1.0 200 OK +Connection: close Content-type: text/html; charset=UTF-8 diff --git a/tests/auto/declarative/qmlxmlhttprequest/data/status.404.reply b/tests/auto/declarative/qmlxmlhttprequest/data/status.404.reply index 964a7a8..2e29f56 100644 --- a/tests/auto/declarative/qmlxmlhttprequest/data/status.404.reply +++ b/tests/auto/declarative/qmlxmlhttprequest/data/status.404.reply @@ -1,2 +1,3 @@ HTTP/1.0 404 Document not found +Connection: close Content-type: text/html; charset=UTF-8 diff --git a/tests/auto/declarative/runall.sh b/tests/auto/declarative/runall.sh index 33087a1..d9eddf9 100755 --- a/tests/auto/declarative/runall.sh +++ b/tests/auto/declarative/runall.sh @@ -5,13 +5,19 @@ sleep 1 trap "kill $!" EXIT export DISPLAY=:7 -make -k -j1 install 2>&1 | +( make -k -j1 install 2>&1; + for exe in $(make install | sed -n 's/^install .* "\([^"]*qt4\/tst_[^"]*\)".*/\1/p') + do + $exe + done +) | while read line do case "$line" in make*Error) echo "$line";; make*Stop) echo "$line";; make*) ;; + install*) ;; */qmake*) ;; */bin/moc*) ;; *targ.debug*) ;; diff --git a/tests/auto/declarative/shared/testhttpserver.cpp b/tests/auto/declarative/shared/testhttpserver.cpp index 490fc95..5740925 100644 --- a/tests/auto/declarative/shared/testhttpserver.cpp +++ b/tests/auto/declarative/shared/testhttpserver.cpp @@ -190,13 +190,14 @@ void TestHTTPServer::disconnected() --ii; } } + socket->disconnect(); socket->deleteLater(); } void TestHTTPServer::readyRead() { QTcpSocket *socket = qobject_cast<QTcpSocket *>(sender()); - if (!socket) return; + if (!socket || socket->state() == QTcpSocket::ClosingState) return; QByteArray ba = socket->readAll(); @@ -222,14 +223,14 @@ void TestHTTPServer::readyRead() QByteArray data = ba.mid(ii); qWarning() << "TestHTTPServer: Unexpected data" << data << "\nExpected: " << waitData; m_hasFailed = true; - socket->disconnect(); + socket->disconnectFromHost(); return; } } if (waitData.isEmpty()) { socket->write(replyData); - socket->disconnect(); + socket->disconnectFromHost(); } } @@ -316,8 +317,8 @@ void TestHTTPServer::serveGET(QTcpSocket *socket, const QByteArray &data) } dataCache.remove(socket); - if (close) - socket->close(); + if (close) + socket->disconnectFromHost(); } } |