diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-11-16 04:48:50 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-11-16 04:48:50 (GMT) |
commit | ee6c7d5cdc7707a5eb50a46ba8056a6b43348159 (patch) | |
tree | 52e0f748fa82a2f9afa77f2f378e67b87a907ad4 | |
parent | 5c87831d2d87925e0593afedd450715c15063a6c (diff) | |
parent | 341d12b9cbe7d516d32b8409def7193058aef33c (diff) | |
download | Qt-ee6c7d5cdc7707a5eb50a46ba8056a6b43348159.zip Qt-ee6c7d5cdc7707a5eb50a46ba8056a6b43348159.tar.gz Qt-ee6c7d5cdc7707a5eb50a46ba8056a6b43348159.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
-rw-r--r-- | src/declarative/qml/qml.pri | 3 | ||||
-rw-r--r-- | src/declarative/qml/qmlengine.cpp | 16 | ||||
-rw-r--r-- | src/declarative/qml/qmlengine_p.h | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qmlgraphicslistview/tst_qmlgraphicslistview.cpp | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qmlqt/data/darker.qml | 3 | ||||
-rw-r--r-- | tests/auto/declarative/qmlqt/data/lighter.qml | 3 | ||||
-rw-r--r-- | tests/auto/declarative/qmlqt/tst_qmlqt.cpp | 6 |
7 files changed, 16 insertions, 23 deletions
diff --git a/src/declarative/qml/qml.pri b/src/declarative/qml/qml.pri index ee13437..ca78797 100644 --- a/src/declarative/qml/qml.pri +++ b/src/declarative/qml/qml.pri @@ -111,9 +111,6 @@ HEADERS += qml/qmlparser_p.h \ qml/qmltypenamescriptclass_p.h \ qml/qmllistscriptclass_p.h -# for qtscript debugger -contains(QT_CONFIG, scripttools):QT += scripttools - QT += sql include(parser/parser.pri) diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp index 66d4990..1483c8c 100644 --- a/src/declarative/qml/qmlengine.cpp +++ b/src/declarative/qml/qmlengine.cpp @@ -47,10 +47,6 @@ #include <private/qscriptdeclarativeclass_p.h> #include <private/qmlglobalscriptclass_p.h> -#ifdef QT_SCRIPTTOOLS_LIB -#include <QScriptEngineDebugger> -#endif - #include <QScriptClass> #include <QNetworkReply> #include <QNetworkRequest> @@ -101,7 +97,6 @@ Q_DECLARE_METATYPE(QList<QObject *>); QT_BEGIN_NAMESPACE -DEFINE_BOOL_CONFIG_OPTION(qmlDebugger, QML_DEBUGGER) DEFINE_BOOL_CONFIG_OPTION(qmlImportTrace, QML_IMPORT_TRACE) QML_DEFINE_TYPE(Qt,4,6,Object,QObject) @@ -232,12 +227,6 @@ void QmlEnginePrivate::init() typeNameClass = new QmlTypeNameScriptClass(q); listClass = new QmlListScriptClass(q); rootContext = new QmlContext(q,true); -#ifdef QT_SCRIPTTOOLS_LIB - if (qmlDebugger()){ - debugger = new QScriptEngineDebugger(q); - debugger->attachTo(&scriptEngine); - } -#endif if (QCoreApplication::instance()->thread() == q->thread() && QmlEngineDebugServer::isDebuggingEnabled()) { @@ -249,11 +238,6 @@ void QmlEnginePrivate::init() } } -QmlEnginePrivate::CapturedProperty::CapturedProperty(const QmlMetaProperty &p) -: object(p.object()), coreIndex(p.coreIndex()), notifyIndex(p.property().notifySignalIndex()) -{ -} - /*! \class QmlEngine \brief The QmlEngine class provides an environment for instantiating QML components. diff --git a/src/declarative/qml/qmlengine_p.h b/src/declarative/qml/qmlengine_p.h index 2e880bb..2f41651 100644 --- a/src/declarative/qml/qmlengine_p.h +++ b/src/declarative/qml/qmlengine_p.h @@ -112,7 +112,6 @@ public: struct CapturedProperty { CapturedProperty(QObject *o, int c, int n) : object(o), coreIndex(c), notifyIndex(n) {} - CapturedProperty(const QmlMetaProperty &); QObject *object; int coreIndex; @@ -123,9 +122,6 @@ public: QmlContext *rootContext; QmlExpression *currentExpression; bool isDebugging; -#ifdef QT_SCRIPTTOOLS_LIB - QScriptEngineDebugger *debugger; -#endif struct ImportedNamespace; QmlContextScriptClass *contextClass; diff --git a/tests/auto/declarative/qmlgraphicslistview/tst_qmlgraphicslistview.cpp b/tests/auto/declarative/qmlgraphicslistview/tst_qmlgraphicslistview.cpp index f7a2d9e..7e6dc0d 100644 --- a/tests/auto/declarative/qmlgraphicslistview/tst_qmlgraphicslistview.cpp +++ b/tests/auto/declarative/qmlgraphicslistview/tst_qmlgraphicslistview.cpp @@ -1004,6 +1004,9 @@ void tst_QmlGraphicsListView::cacheBuffer() QmlGraphicsItem *viewport = listview->viewport(); QVERIFY(viewport != 0); + QVERIFY(listview->delegate() != 0); + QVERIFY(listview->model() != 0); + QVERIFY(listview->highlight() == 0); // Confirm items positioned correctly int itemCount = findItems<QmlGraphicsItem>(viewport, "wrapper").count(); @@ -1015,6 +1018,7 @@ void tst_QmlGraphicsListView::cacheBuffer() } listview->setCacheBuffer(400); + QVERIFY(listview->cacheBuffer() == 400); int newItemCount = findItems<QmlGraphicsItem>(viewport, "wrapper").count(); QVERIFY(newItemCount > itemCount); diff --git a/tests/auto/declarative/qmlqt/data/darker.qml b/tests/auto/declarative/qmlqt/data/darker.qml index 6369e8f..96ffa77 100644 --- a/tests/auto/declarative/qmlqt/data/darker.qml +++ b/tests/auto/declarative/qmlqt/data/darker.qml @@ -4,5 +4,8 @@ Object { property var test1: Qt.darker(Qt.rgba(1, 0.8, 0.3)) property var test2: Qt.darker() property var test3: Qt.darker(Qt.rgba(1, 0.8, 0.3), 10) + property var test4: Qt.darker("red"); + property var test5: Qt.darker("perfectred"); // Non-existant color + property var test6: Qt.darker(10); } diff --git a/tests/auto/declarative/qmlqt/data/lighter.qml b/tests/auto/declarative/qmlqt/data/lighter.qml index 6c888e7..2e9fdc8 100644 --- a/tests/auto/declarative/qmlqt/data/lighter.qml +++ b/tests/auto/declarative/qmlqt/data/lighter.qml @@ -4,4 +4,7 @@ Object { property var test1: Qt.lighter(Qt.rgba(1, 0.8, 0.3)) property var test2: Qt.lighter() property var test3: Qt.lighter(Qt.rgba(1, 0.8, 0.3), 10) + property var test4: Qt.lighter("red"); + property var test5: Qt.lighter("perfectred"); // Non-existant color + property var test6: Qt.lighter(10); } diff --git a/tests/auto/declarative/qmlqt/tst_qmlqt.cpp b/tests/auto/declarative/qmlqt/tst_qmlqt.cpp index 13f4904..4d09aee 100644 --- a/tests/auto/declarative/qmlqt/tst_qmlqt.cpp +++ b/tests/auto/declarative/qmlqt/tst_qmlqt.cpp @@ -213,6 +213,9 @@ void tst_qmlqt::lighter() QCOMPARE(qvariant_cast<QColor>(object->property("test1")), QColor::fromRgbF(1, 0.8, 0.3).lighter()); QCOMPARE(qvariant_cast<QColor>(object->property("test2")), QColor()); QCOMPARE(qvariant_cast<QColor>(object->property("test3")), QColor()); + QCOMPARE(qvariant_cast<QColor>(object->property("test4")), QColor("red").lighter()); + QCOMPARE(qvariant_cast<QColor>(object->property("test5")), QColor()); + QCOMPARE(qvariant_cast<QColor>(object->property("test6")), QColor()); delete object; } @@ -226,6 +229,9 @@ void tst_qmlqt::darker() QCOMPARE(qvariant_cast<QColor>(object->property("test1")), QColor::fromRgbF(1, 0.8, 0.3).darker()); QCOMPARE(qvariant_cast<QColor>(object->property("test2")), QColor()); QCOMPARE(qvariant_cast<QColor>(object->property("test3")), QColor()); + QCOMPARE(qvariant_cast<QColor>(object->property("test4")), QColor("red").darker()); + QCOMPARE(qvariant_cast<QColor>(object->property("test5")), QColor()); + QCOMPARE(qvariant_cast<QColor>(object->property("test6")), QColor()); delete object; } |