diff options
author | Bea Lam <bea.lam@nokia.com> | 2009-10-02 02:21:12 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2009-10-02 02:21:40 (GMT) |
commit | d535797f7fd5eebbc5d0128a477c57f71632a377 (patch) | |
tree | 4a126440ad3fb5b038bd9937a4ee66a2097a72c5 | |
parent | 297dcaaef5741dac5e10c886db1755829e4ed082 (diff) | |
download | Qt-d535797f7fd5eebbc5d0128a477c57f71632a377.zip Qt-d535797f7fd5eebbc5d0128a477c57f71632a377.tar.gz Qt-d535797f7fd5eebbc5d0128a477c57f71632a377.tar.bz2 |
Make compile since QmlValuePropertySource is no longer a Qobject.
-rw-r--r-- | examples/declarative/extending/binding/happybirthday.cpp | 2 | ||||
-rw-r--r-- | examples/declarative/extending/binding/happybirthday.h | 6 | ||||
-rw-r--r-- | examples/declarative/extending/valuesource/happybirthday.cpp | 2 | ||||
-rw-r--r-- | examples/declarative/extending/valuesource/happybirthday.h | 5 | ||||
-rw-r--r-- | examples/declarative/flowview/FlickrView.qml (renamed from examples/declarative/flowview/flickr.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/flowview/RoundedRect.qml (renamed from examples/declarative/flowview/rect.qml) | 0 | ||||
-rw-r--r-- | src/declarative/util/qmlview.cpp | 6 |
7 files changed, 16 insertions, 5 deletions
diff --git a/examples/declarative/extending/binding/happybirthday.cpp b/examples/declarative/extending/binding/happybirthday.cpp index d1f485e..dd1247f 100644 --- a/examples/declarative/extending/binding/happybirthday.cpp +++ b/examples/declarative/extending/binding/happybirthday.cpp @@ -2,7 +2,7 @@ #include <QTimer> HappyBirthday::HappyBirthday(QObject *parent) -: QmlPropertyValueSource(parent), m_line(-1) +: QObject(parent), m_line(-1) { setName(QString()); QTimer *timer = new QTimer(this); diff --git a/examples/declarative/extending/binding/happybirthday.h b/examples/declarative/extending/binding/happybirthday.h index 3039db2..fff2df0 100644 --- a/examples/declarative/extending/binding/happybirthday.h +++ b/examples/declarative/extending/binding/happybirthday.h @@ -2,8 +2,12 @@ #define HAPPYBIRTHDAY_H #include <QmlPropertyValueSource> +#include <QmlMetaProperty> +#include <qml.h> -class HappyBirthday : public QmlPropertyValueSource +#include <QStringList> + +class HappyBirthday : public QObject, public QmlPropertyValueSource { Q_OBJECT Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) diff --git a/examples/declarative/extending/valuesource/happybirthday.cpp b/examples/declarative/extending/valuesource/happybirthday.cpp index 905dc51..4862aa9 100644 --- a/examples/declarative/extending/valuesource/happybirthday.cpp +++ b/examples/declarative/extending/valuesource/happybirthday.cpp @@ -2,7 +2,7 @@ #include <QTimer> HappyBirthday::HappyBirthday(QObject *parent) -: QmlPropertyValueSource(parent), m_line(-1) +: QObject(parent), m_line(-1) { setName(QString()); QTimer *timer = new QTimer(this); diff --git a/examples/declarative/extending/valuesource/happybirthday.h b/examples/declarative/extending/valuesource/happybirthday.h index e0d4912..18ac1f4 100644 --- a/examples/declarative/extending/valuesource/happybirthday.h +++ b/examples/declarative/extending/valuesource/happybirthday.h @@ -2,9 +2,12 @@ #define HAPPYBIRTHDAY_H #include <QmlPropertyValueSource> +#include <qml.h> + +#include <QStringList> // ![0] -class HappyBirthday : public QmlPropertyValueSource +class HappyBirthday : public QObject, public QmlPropertyValueSource { Q_OBJECT // ![0] diff --git a/examples/declarative/flowview/flickr.qml b/examples/declarative/flowview/FlickrView.qml index 1cdb132..1cdb132 100644 --- a/examples/declarative/flowview/flickr.qml +++ b/examples/declarative/flowview/FlickrView.qml diff --git a/examples/declarative/flowview/rect.qml b/examples/declarative/flowview/RoundedRect.qml index 7d2b58b..7d2b58b 100644 --- a/examples/declarative/flowview/rect.qml +++ b/examples/declarative/flowview/RoundedRect.qml diff --git a/src/declarative/util/qmlview.cpp b/src/declarative/util/qmlview.cpp index 98642e9..f932e4a 100644 --- a/src/declarative/util/qmlview.cpp +++ b/src/declarative/util/qmlview.cpp @@ -538,7 +538,11 @@ void QmlView::resizeEvent(QResizeEvent *e) d->root->setWidth(width()); d->root->setHeight(height()); } - setSceneRect(QRectF(0, 0, d->root->width(), d->root->height())); + if (d->root) { + setSceneRect(QRectF(0, 0, d->root->width(), d->root->height())); + } else { + setSceneRect(rect()); + } QGraphicsView::resizeEvent(e); } |