diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-02-23 06:49:07 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-02-23 06:49:07 (GMT) |
commit | 55fff3383b7fbac972a96c62345bc898c99eafc0 (patch) | |
tree | 8a05c62566f4129babaa63fd62c9855a2a7585be /tests | |
parent | c2988e5bc92c81e35e6b11092a2c4fa237cf9fdb (diff) | |
parent | 287a8757e348f56e2ae918d1aa5bf329c985f620 (diff) | |
download | Qt-55fff3383b7fbac972a96c62345bc898c99eafc0.zip Qt-55fff3383b7fbac972a96c62345bc898c99eafc0.tar.gz Qt-55fff3383b7fbac972a96c62345bc898c99eafc0.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-qml
Diffstat (limited to 'tests')
5 files changed, 9 insertions, 7 deletions
diff --git a/tests/auto/declarative/qmldebug/tst_qmldebug.cpp b/tests/auto/declarative/qmldebug/tst_qmldebug.cpp index ba07331..2f1a557 100644 --- a/tests/auto/declarative/qmldebug/tst_qmldebug.cpp +++ b/tests/auto/declarative/qmldebug/tst_qmldebug.cpp @@ -51,8 +51,8 @@ #include <QtDeclarative/qmlexpression.h> #include <QtDeclarative/qmlmetatype.h> #include <QtDeclarative/qmlmetaproperty.h> -#include <QtDeclarative/qmlbinding.h> +#include <private/qmlbinding_p.h> #include <private/qmldebug_p.h> #include <private/qmlenginedebug_p.h> #include <private/qmldebugclient_p.h> diff --git a/tests/auto/declarative/qmlecmascript/testtypes.h b/tests/auto/declarative/qmlecmascript/testtypes.h index 0af72cb..f511c29 100644 --- a/tests/auto/declarative/qmlecmascript/testtypes.h +++ b/tests/auto/declarative/qmlecmascript/testtypes.h @@ -173,17 +173,21 @@ QML_DECLARE_TYPE(MyQmlContainer); class MyExpression : public QmlExpression { + Q_OBJECT public: MyExpression(QmlContext *ctxt, const QString &expr) : QmlExpression(ctxt, expr, 0), changed(false) { + QObject::connect(this, SIGNAL(valueChanged()), this, SLOT(expressionValueChanged())); + setNotifyOnValueChanged(true); } - void emitValueChanged() { + bool changed; + +public slots: + void expressionValueChanged() { changed = true; - QmlExpression::emitValueChanged(); } - bool changed; }; diff --git a/tests/auto/declarative/qmlgraphicslistview/tst_qmlgraphicslistview.cpp b/tests/auto/declarative/qmlgraphicslistview/tst_qmlgraphicslistview.cpp index 13ed41d..0876520 100644 --- a/tests/auto/declarative/qmlgraphicslistview/tst_qmlgraphicslistview.cpp +++ b/tests/auto/declarative/qmlgraphicslistview/tst_qmlgraphicslistview.cpp @@ -1322,7 +1322,6 @@ T *tst_QmlGraphicsListView::findItem(QGraphicsObject *parent, const QString &obj if (mo.cast(item) && (objectName.isEmpty() || item->objectName() == objectName)) { if (index != -1) { QmlExpression e(qmlContext(item), "index", item); - e.setTrackChange(false); if (e.value().toInt() == index) return static_cast<T*>(item); } else { diff --git a/tests/auto/declarative/qmlgraphicspathview/tst_qmlgraphicspathview.cpp b/tests/auto/declarative/qmlgraphicspathview/tst_qmlgraphicspathview.cpp index b986a64..62b3cfc 100644 --- a/tests/auto/declarative/qmlgraphicspathview/tst_qmlgraphicspathview.cpp +++ b/tests/auto/declarative/qmlgraphicspathview/tst_qmlgraphicspathview.cpp @@ -452,7 +452,6 @@ T *tst_QmlGraphicsPathView::findItem(QGraphicsObject *parent, const QString &obj if (mo.cast(item) && (objectName.isEmpty() || item->objectName() == objectName)) { if (index != -1) { QmlExpression e(qmlContext(item), "index", item); - e.setTrackChange(false); if (e.value().toInt() == index) return static_cast<T*>(item); } else { diff --git a/tests/auto/declarative/qmlmetaproperty/tst_qmlmetaproperty.cpp b/tests/auto/declarative/qmlmetaproperty/tst_qmlmetaproperty.cpp index c289641..540d658 100644 --- a/tests/auto/declarative/qmlmetaproperty/tst_qmlmetaproperty.cpp +++ b/tests/auto/declarative/qmlmetaproperty/tst_qmlmetaproperty.cpp @@ -43,7 +43,7 @@ #include <QtDeclarative/qmlcomponent.h> #include <QtDeclarative/qmlmetaproperty.h> #include <private/qguard_p.h> -#include <QtDeclarative/qmlbinding.h> +#include <private/qmlbinding_p.h> #include <QtGui/QLineEdit> class MyQmlObject : public QObject |