diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-08-27 01:05:19 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-08-27 01:05:19 (GMT) |
commit | 7d33c015c9f936eaf5836230a199eab9399b3f58 (patch) | |
tree | 56de67b7d512d70291591e61c30bf9c72d34789e /src/declarative/extra | |
parent | a488a04e5a5af4255d560d5dfa6423caa48ed5f3 (diff) | |
parent | baeb25062194c9ddc36c4536662de46b6b09cd68 (diff) | |
download | Qt-7d33c015c9f936eaf5836230a199eab9399b3f58.zip Qt-7d33c015c9f936eaf5836230a199eab9399b3f58.tar.gz Qt-7d33c015c9f936eaf5836230a199eab9399b3f58.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Conflicts:
doc/src/declarative/anchor-layout.qdoc
Diffstat (limited to 'src/declarative/extra')
-rw-r--r-- | src/declarative/extra/qfxanimatedimageitem.h | 2 | ||||
-rw-r--r-- | src/declarative/extra/qfxflowview.cpp | 2 | ||||
-rw-r--r-- | src/declarative/extra/qfxparticles.cpp | 16 | ||||
-rw-r--r-- | src/declarative/extra/qfxparticles.h | 2 | ||||
-rw-r--r-- | src/declarative/extra/qmlsqlquery.h | 4 | ||||
-rw-r--r-- | src/declarative/extra/qmlxmllistmodel.cpp | 2 |
6 files changed, 17 insertions, 11 deletions
diff --git a/src/declarative/extra/qfxanimatedimageitem.h b/src/declarative/extra/qfxanimatedimageitem.h index 2d531ee..4002a3f 100644 --- a/src/declarative/extra/qfxanimatedimageitem.h +++ b/src/declarative/extra/qfxanimatedimageitem.h @@ -94,7 +94,7 @@ protected: private: Q_DISABLE_COPY(QFxAnimatedImageItem) - Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr, QFxAnimatedImageItem) + Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QFxAnimatedImageItem) }; QT_END_NAMESPACE diff --git a/src/declarative/extra/qfxflowview.cpp b/src/declarative/extra/qfxflowview.cpp index 4af8af9..b2470ba 100644 --- a/src/declarative/extra/qfxflowview.cpp +++ b/src/declarative/extra/qfxflowview.cpp @@ -57,7 +57,7 @@ public: int row() const; int column() const; -signals: +Q_SIGNALS: void posChanged(); private: diff --git a/src/declarative/extra/qfxparticles.cpp b/src/declarative/extra/qfxparticles.cpp index ec15099..7855f3e 100644 --- a/src/declarative/extra/qfxparticles.cpp +++ b/src/declarative/extra/qfxparticles.cpp @@ -368,7 +368,7 @@ public: : count(1), lifeSpan(1000), lifeSpanDev(1000), fadeInDur(200), fadeOutDur(300) , angle(0), angleDev(0), velocity(0), velocityDev(0) , addParticleTime(0), addParticleCount(0), lastAdvTime(0), stream(false), streamDelay(0) - , emitting(true), motion(0), clock(this) + , emitting(true), motion(0), pendingPixmapCache(false), clock(this) { } @@ -406,6 +406,8 @@ public: QFxParticleMotion *motion; QFxParticlesPainter *paintItem; + bool pendingPixmapCache; + QList<QFxParticle> particles; QTickAnimationProxy<QFxParticlesPrivate, &QFxParticlesPrivate::tick> clock; @@ -615,7 +617,7 @@ QFxParticles::QFxParticles(QFxParticlesPrivate &dd, QFxItem *parent) QFxParticles::~QFxParticles() { Q_D(QFxParticles); - if (!d->url.isEmpty()) + if (d->pendingPixmapCache) QFxPixmapCache::cancelGet(d->url, this); } @@ -637,6 +639,7 @@ QUrl QFxParticles::source() const void QFxParticles::imageLoaded() { Q_D(QFxParticles); + d->pendingPixmapCache = false; QFxPixmapCache::find(d->url, &d->image); d->paintItem->updateSize(); d->paintItem->update(); @@ -649,8 +652,10 @@ void QFxParticles::setSource(const QUrl &name) if ((d->url.isEmpty() == name.isEmpty()) && name == d->url) return; - if (!d->url.isEmpty()) + if (d->pendingPixmapCache) { QFxPixmapCache::cancelGet(d->url, this); + d->pendingPixmapCache = false; + } if (name.isEmpty()) { d->url = name; d->image = QPixmap(); @@ -660,9 +665,10 @@ void QFxParticles::setSource(const QUrl &name) d->url = name; Q_ASSERT(!name.isRelative()); QNetworkReply *reply = QFxPixmapCache::get(qmlEngine(this), d->url, &d->image); - if (reply) + if (reply) { connect(reply, SIGNAL(finished()), this, SLOT(imageLoaded())); - else { + d->pendingPixmapCache = true; + } else { //### unify with imageLoaded d->paintItem->updateSize(); d->paintItem->update(); diff --git a/src/declarative/extra/qfxparticles.h b/src/declarative/extra/qfxparticles.h index bde6ec6..959c518 100644 --- a/src/declarative/extra/qfxparticles.h +++ b/src/declarative/extra/qfxparticles.h @@ -214,7 +214,7 @@ private Q_SLOTS: private: Q_DISABLE_COPY(QFxParticles) - Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr, QFxParticles) + Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QFxParticles) }; QT_END_NAMESPACE diff --git a/src/declarative/extra/qmlsqlquery.h b/src/declarative/extra/qmlsqlquery.h index 55e16ac..0f27709 100644 --- a/src/declarative/extra/qmlsqlquery.h +++ b/src/declarative/extra/qmlsqlquery.h @@ -115,13 +115,13 @@ public: QmlList<QmlSqlBind *> *bindings(); const QmlList<QmlSqlBind *> *bindings() const; -public slots: +public Q_SLOTS: void exec(); protected: void timerEvent(QTimerEvent *); -private slots: +private Q_SLOTS: void resetBinds(); void resetQuery(); diff --git a/src/declarative/extra/qmlxmllistmodel.cpp b/src/declarative/extra/qmlxmllistmodel.cpp index 9b74799..816c3fd 100644 --- a/src/declarative/extra/qmlxmllistmodel.cpp +++ b/src/declarative/extra/qmlxmllistmodel.cpp @@ -123,7 +123,7 @@ public: return m_modelData; } -signals: +Q_SIGNALS: void queryCompleted(int queryId, int size); protected: |