summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-07-17 06:57:24 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-07-17 06:57:24 (GMT)
commit065d6dcc16d5b48b875ebe9bd755b1c605f86d89 (patch)
tree24afc499f4183bf3246cf305933a14d651b910ea /src/declarative
parentfe66eaeed64402a7b22a43a85cd92c938a534b71 (diff)
parent43a497cac00a93f015ec62339529f36ba3f19ece (diff)
downloadQt-065d6dcc16d5b48b875ebe9bd755b1c605f86d89.zip
Qt-065d6dcc16d5b48b875ebe9bd755b1c605f86d89.tar.gz
Qt-065d6dcc16d5b48b875ebe9bd755b1c605f86d89.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Conflicts: src/declarative/fx/qfximage.h
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/extra/qfxparticles.cpp44
-rw-r--r--src/declarative/fx/fx.pri4
-rw-r--r--src/declarative/fx/qfxgraphicsobjectcontainer.cpp (renamed from src/declarative/fx/qfxwidgetcontainer.cpp)47
-rw-r--r--src/declarative/fx/qfxgraphicsobjectcontainer.h (renamed from src/declarative/fx/qfxwidgetcontainer.h)28
-rw-r--r--src/declarative/fx/qfximage.cpp38
-rw-r--r--src/declarative/fx/qfximage.h4
-rw-r--r--src/declarative/fx/qfxitem.cpp5
-rw-r--r--src/declarative/fx/qfxitem.h5
-rw-r--r--src/declarative/fx/qfxkeyproxy.cpp46
-rw-r--r--src/declarative/fx/qfxkeyproxy.h1
-rw-r--r--src/declarative/fx/qfxlineedit.cpp28
-rw-r--r--src/declarative/fx/qfxlineedit.h7
-rw-r--r--src/declarative/fx/qfxlineedit_p.h6
-rw-r--r--src/declarative/util/qmltransitionmanager.cpp9
14 files changed, 108 insertions, 164 deletions
diff --git a/src/declarative/extra/qfxparticles.cpp b/src/declarative/extra/qfxparticles.cpp
index 3d59022..c31163c 100644
--- a/src/declarative/extra/qfxparticles.cpp
+++ b/src/declarative/extra/qfxparticles.cpp
@@ -410,7 +410,6 @@ public:
};
-//TODO: Stop the clock if no visible particles and not emitting (restart on emittingChanged)
void QFxParticlesPrivate::tick(int time)
{
Q_Q(QFxParticles);
@@ -465,12 +464,9 @@ void QFxParticlesPrivate::tick(int time)
}
lastAdvTime = time;
- if (oldCount || particles.count()) {
- if (q->itemParent())
- q->itemParent()->update();
- else
- q->update();
- } else if (!count) {
+ paintItem->updateSize();
+ paintItem->update();
+ if (!(oldCount || particles.count()) && (!count || !emitting)) {
lastAdvTime = 0;
clock.stop();
}
@@ -641,7 +637,8 @@ void QFxParticles::imageLoaded()
{
Q_D(QFxParticles);
d->image = QFxPixmap(d->url);
- update();
+ d->paintItem->updateSize();
+ d->paintItem->update();
}
void QFxParticles::setSource(const QUrl &name)
@@ -656,7 +653,8 @@ void QFxParticles::setSource(const QUrl &name)
if (name.isEmpty()) {
d->url = name;
d->image = QPixmap();
- update();
+ d->paintItem->updateSize();
+ d->paintItem->update();
} else {
d->url = name;
Q_ASSERT(!name.isRelative());
@@ -687,10 +685,11 @@ void QFxParticles::setCount(int cnt)
d->count = cnt;
d->addParticleTime = 0;
d->addParticleCount = d->particles.count();
- if (!oldCount && d->clock.state() != QAbstractAnimation::Running){
- d->clock.start(); // infinity??
+ if (!oldCount && d->clock.state() != QAbstractAnimation::Running) {
+ d->clock.start();
}
- update();
+ d->paintItem->updateSize();
+ d->paintItem->update();
}
}
@@ -1006,6 +1005,8 @@ void QFxParticles::setEmitting(bool r)
{
Q_D(QFxParticles);
d->emitting = r;
+ if (d->count && r)
+ d->clock.start();
}
/*!
\qmlproperty ParticleMotion Particles::motion
@@ -1046,17 +1047,10 @@ QString QFxParticles::propertyInfo() const
return d->url.toString();
}
-void QFxParticlesPainter::updateSize(){
- setX(-500);
- setY(-500);
- setWidth(1000);
- setHeight(1000);
- return ;
+void QFxParticlesPainter::updateSize()
+{
const int parentX = parentItem()->x();
const int parentY = parentItem()->y();
- //Have to use statistical approach to needed size as arbitrary particle
- //motions make it impossible to calculate.
- //max/min vars stored to give a never shrinking rect
for (int i = 0; i < d->particles.count(); ++i) {
const QFxParticle &particle = d->particles.at(i);
if(particle.x > maxX)
@@ -1090,7 +1084,6 @@ void QFxParticlesPainter::paintContents(QPainter &p)
if (d->image.isNull())
return;
- updateSize();
const int myX = x() + parentItem()->x();
const int myY = y() + parentItem()->y();
@@ -1099,15 +1092,16 @@ void QFxParticlesPainter::paintContents(QPainter &p)
p.setOpacity(particle.opacity);
p.drawPixmap(particle.x - myX, particle.y - myY, d->image);
}
- update();//Should I need this? (GV does)
}
void QFxParticles::componentComplete()
{
Q_D(QFxParticles);
QFxItem::componentComplete();
- if (d->count)
- d->clock.start(); // infinity??
+ if (d->count) {
+ d->paintItem->updateSize();
+ d->clock.start();
+ }
if (d->lifeSpanDev > d->lifeSpan)
d->lifeSpanDev = d->lifeSpan;
}
diff --git a/src/declarative/fx/fx.pri b/src/declarative/fx/fx.pri
index 413b8db..24c5536 100644
--- a/src/declarative/fx/fx.pri
+++ b/src/declarative/fx/fx.pri
@@ -40,7 +40,7 @@ HEADERS += \
fx/qfxpixmap.cpp \
fx/qfxvisualitemmodel.h \
fx/qfxlistview.h \
- fx/qfxwidgetcontainer.h \
+ fx/qfxgraphicsobjectcontainer.h \
SOURCES += \
fx/qfxanchors.cpp \
@@ -69,7 +69,7 @@ SOURCES += \
fx/qfxpixmap.cpp \
fx/qfxvisualitemmodel.cpp \
fx/qfxlistview.cpp \
- fx/qfxwidgetcontainer.cpp \
+ fx/qfxgraphicsobjectcontainer.cpp \
contains(QT_CONFIG, webkit) {
QT+=webkit
diff --git a/src/declarative/fx/qfxwidgetcontainer.cpp b/src/declarative/fx/qfxgraphicsobjectcontainer.cpp
index ea702db..479a21d 100644
--- a/src/declarative/fx/qfxwidgetcontainer.cpp
+++ b/src/declarative/fx/qfxgraphicsobjectcontainer.cpp
@@ -39,59 +39,60 @@
**
****************************************************************************/
-#include "qfxwidgetcontainer.h"
-#include <qgraphicswidget.h>
+#include "qfxgraphicsobjectcontainer.h"
+#include <QGraphicsObject>
QT_BEGIN_NAMESPACE
/*!
- \qmlclass WidgetContainer QFxWidgetContainer
- \brief The WidgetContainer element allows you to add QGraphicsWidgets into Fluid UI elements.
+ \qmlclass GraphicsObjectContainer QFxGraphicsObjectContainer
+ \brief The GraphicsObjectContainer element allows you to add QGraphicsObjects into Fluid UI elements.
*/
/*!
\internal
- \class QFxWidgetContainer
- \brief The QFxWidgetContainer class allows you to add QGraphicsWidgets into Fluid UI applications.
+ \class QFxGraphicsObjectContainer
+ \brief The QFxGraphicsObjectContainer class allows you to add QGraphicsObjects into Fluid UI applications.
*/
-QML_DEFINE_TYPE(QFxWidgetContainer, WidgetContainer)
+QML_DEFINE_TYPE(QFxGraphicsObjectContainer, GraphicsObjectContainer)
-QFxWidgetContainer::QFxWidgetContainer(QFxItem *parent)
-: QFxItem(parent), _graphicsWidget(0)
+QFxGraphicsObjectContainer::QFxGraphicsObjectContainer(QFxItem *parent)
+: QFxItem(parent), _graphicsObject(0)
{
}
-QFxWidgetContainer::~QFxWidgetContainer()
+QFxGraphicsObjectContainer::~QFxGraphicsObjectContainer()
{
}
-QGraphicsWidget *QFxWidgetContainer::graphicsWidget() const
+QGraphicsObject *QFxGraphicsObjectContainer::graphicsObject() const
{
- return _graphicsWidget;
+ return _graphicsObject;
}
/*!
- \qmlproperty QGraphicsWidget QFxWidgetContainer::graphicsWidget
- The QGraphicsWidget associated with this element.
+ \qmlproperty QGraphicsObject GraphicsObjectContainer::graphicsObject
+ The QGraphicsObject associated with this element.
*/
-void QFxWidgetContainer::setGraphicsWidget(QGraphicsWidget *widget)
+void QFxGraphicsObjectContainer::setGraphicsObject(QGraphicsObject *object)
{
- if (widget == _graphicsWidget)
+ if (object == _graphicsObject)
return;
- _graphicsWidget = widget;
+ _graphicsObject = object;
- _graphicsWidget->setParentItem(this);
+ _graphicsObject->setParentItem(this);
}
-void QFxWidgetContainer::canvasChanged()
+QVariant QFxGraphicsObjectContainer::itemChange(GraphicsItemChange change, const QVariant &value)
{
- if (_graphicsWidget) {
- QGraphicsWidget *w = _graphicsWidget;
- _graphicsWidget = 0;
- setGraphicsWidget(w);
+ if (change == ItemSceneHasChanged) {
+ QGraphicsObject *o = _graphicsObject;
+ _graphicsObject = 0;
+ setGraphicsObject(o);
}
+ return QFxItem::itemChange(change, value);
}
QT_END_NAMESPACE
diff --git a/src/declarative/fx/qfxwidgetcontainer.h b/src/declarative/fx/qfxgraphicsobjectcontainer.h
index 862a280..e118555 100644
--- a/src/declarative/fx/qfxwidgetcontainer.h
+++ b/src/declarative/fx/qfxgraphicsobjectcontainer.h
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#ifndef QFXWIDGETCONTAINER_H
-#define QFXWIDGETCONTAINER_H
+#ifndef QFXGRAPHICSOBJECTCONTAINER_H
+#define QFXGRAPHICSOBJECTCONTAINER_H
#include <QtDeclarative/qfxitem.h>
@@ -50,33 +50,33 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class QGraphicsWidget;
+class QGraphicsObject;
-class Q_DECLARATIVE_EXPORT QFxWidgetContainer : public QFxItem
+class Q_DECLARATIVE_EXPORT QFxGraphicsObjectContainer : public QFxItem
{
Q_OBJECT
- Q_CLASSINFO("DefaultProperty", "graphicsWidget")
- Q_PROPERTY(QGraphicsWidget *graphicsWidget READ graphicsWidget WRITE setGraphicsWidget)
+ Q_CLASSINFO("DefaultProperty", "graphicsObject")
+ Q_PROPERTY(QGraphicsObject *graphicsObject READ graphicsObject WRITE setGraphicsObject)
public:
- QFxWidgetContainer(QFxItem *parent = 0);
- ~QFxWidgetContainer();
+ QFxGraphicsObjectContainer(QFxItem *parent = 0);
+ ~QFxGraphicsObjectContainer();
- QGraphicsWidget *graphicsWidget() const;
- void setGraphicsWidget(QGraphicsWidget *);
+ QGraphicsObject *graphicsObject() const;
+ void setGraphicsObject(QGraphicsObject *);
protected:
- virtual void canvasChanged();
+ QVariant itemChange(GraphicsItemChange change, const QVariant &value);
private:
- QGraphicsWidget *_graphicsWidget;
+ QGraphicsObject *_graphicsObject;
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QFxWidgetContainer)
+QML_DECLARE_TYPE(QFxGraphicsObjectContainer)
QT_END_HEADER
-#endif // QFXGRAPHICSWIDGET_H
+#endif // QFXGRAPHICSOBJECTCONTAINER_H
diff --git a/src/declarative/fx/qfximage.cpp b/src/declarative/fx/qfximage.cpp
index 34ff157..d19d620 100644
--- a/src/declarative/fx/qfximage.cpp
+++ b/src/declarative/fx/qfximage.cpp
@@ -219,44 +219,6 @@ void QFxImage::setTiled(bool tile)
d->tiled = tile;
}
-/*!
- \qmlproperty bool Image::opaque
-
- Set this property if you know that the image is opaque to give your
- application a significant performance boost.
-
- \note
- This is a performance hint to Qt Declarative. Unfortunately whether or not an image
- is opaque is not automatically detected. Setting this property to true when
- the image is not opaque will lead to drawing artifacts. However, leaving it as
- false will always work correctly - although possibly not at maximum performance.
- */
-
-/*!
- \property QFxImage::opaque
- \brief whether the image is opaque (non-transparent).
-
- This property is provided purely for the purpose of optimization. An opaque
- image can be optimized more than a non-opaque one.
-*/
-bool QFxImage::isOpaque() const
-{
- Q_D(const QFxImage);
- return d->opaque;
-}
-
-void QFxImage::setOpaque(bool o)
-{
- Q_D(QFxImage);
- if (o == d->opaque)
- return;
- d->opaque = o;
-
- setOptions(IsOpaque, o);
-
- update();
-}
-
void QFxImage::componentComplete()
{
QFxItem::componentComplete();
diff --git a/src/declarative/fx/qfximage.h b/src/declarative/fx/qfximage.h
index bc63d7a..7b3445c 100644
--- a/src/declarative/fx/qfximage.h
+++ b/src/declarative/fx/qfximage.h
@@ -64,7 +64,6 @@ class Q_DECLARATIVE_EXPORT QFxImage : public QFxItem
Q_PROPERTY(QFxScaleGrid *scaleGrid READ scaleGrid)
Q_PROPERTY(bool tile READ isTiled WRITE setTiled)
Q_PROPERTY(QPixmap pixmap READ pixmap WRITE setPixmap DESIGNABLE false)
- Q_PROPERTY(bool opaque READ isOpaque WRITE setOpaque)
Q_PROPERTY(bool smooth READ smoothTransform WRITE setSmoothTransform)
Q_PROPERTY(bool preserveAspect READ preserveAspect WRITE setPreserveAspect);
public:
@@ -79,9 +78,6 @@ public:
QPixmap pixmap() const;
void setPixmap(const QPixmap &);
- bool isOpaque() const;
- void setOpaque(bool);
-
bool smoothTransform() const;
void setSmoothTransform(bool);
diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp
index 3386faf..481733b 100644
--- a/src/declarative/fx/qfxitem.cpp
+++ b/src/declarative/fx/qfxitem.cpp
@@ -2556,4 +2556,9 @@ QPixmap QFxItem::string(const QString &str, const QColor &c, const QFont &f)
return img;
}
+QVariant QFxItem::inputMethodQuery(Qt::InputMethodQuery query) const
+{
+ return QGraphicsItem::inputMethodQuery(query);
+}
+
QT_END_NAMESPACE
diff --git a/src/declarative/fx/qfxitem.h b/src/declarative/fx/qfxitem.h
index bfe8521..67b60c1 100644
--- a/src/declarative/fx/qfxitem.h
+++ b/src/declarative/fx/qfxitem.h
@@ -149,8 +149,7 @@ public:
SimpleItem = 0x00000020,
IsFocusPanel = 0x00000040,
IsFocusRealm = 0x00000080,
- AcceptsInputMethods = 0x00000100,
- IsOpaque = 0x00000200 };
+ AcceptsInputMethods = 0x00000100 };
Q_DECLARE_FLAGS(Options, Option)
enum TransformOrigin {
@@ -274,6 +273,8 @@ public:
static QPixmap string(const QString &, const QColor & = Qt::black, const QFont & = QFont());
+ QVariant inputMethodQuery(Qt::InputMethodQuery query) const; //### for KeyProxy
+
public Q_SLOTS:
void newChild(const QString &url);
diff --git a/src/declarative/fx/qfxkeyproxy.cpp b/src/declarative/fx/qfxkeyproxy.cpp
index f234a0f..e4b4269 100644
--- a/src/declarative/fx/qfxkeyproxy.cpp
+++ b/src/declarative/fx/qfxkeyproxy.cpp
@@ -82,13 +82,15 @@ QML_DEFINE_TYPE(QFxKeyProxy,KeyProxy)
class QFxKeyProxyPrivate
{
public:
- QFxKeyProxyPrivate() : inPress(false), inRelease(false), inIM(false) {}
+ QFxKeyProxyPrivate() : inPress(false), inRelease(false), inIM(false), imeItem(0) {}
QList<QFxItem *> targets;
//loop detection
bool inPress:1;
bool inRelease:1;
bool inIM:1;
+
+ QFxItem *imeItem;
};
QFxKeyProxy::QFxKeyProxy(QFxItem *parent)
@@ -124,11 +126,12 @@ void QFxKeyProxy::keyPressEvent(QKeyEvent *e)
d->inPress = true;
for (int ii = 0; ii < d->targets.count(); ++ii) {
QFxItem *i = qobject_cast<QFxItem *>(scene()->focusItem(d->targets.at(ii)));
- if (i)
+ if (i) {
scene()->sendEvent(i, e);
- if (e->isAccepted()) {
- d->inPress = false;
- return;
+ if (e->isAccepted()) {
+ d->inPress = false;
+ return;
+ }
}
}
d->inPress = false;
@@ -143,11 +146,12 @@ void QFxKeyProxy::keyReleaseEvent(QKeyEvent *e)
d->inRelease = true;
for (int ii = 0; ii < d->targets.count(); ++ii) {
QFxItem *i = qobject_cast<QFxItem *>(scene()->focusItem(d->targets.at(ii)));
- if (i)
+ if (i) {
scene()->sendEvent(i, e);
- if (e->isAccepted()) {
- d->inRelease = false;
- return;
+ if (e->isAccepted()) {
+ d->inRelease = false;
+ return;
+ }
}
}
d->inRelease = false;
@@ -162,15 +166,31 @@ void QFxKeyProxy::inputMethodEvent(QInputMethodEvent *e)
d->inIM = true;
for (int ii = 0; ii < d->targets.count(); ++ii) {
QFxItem *i = qobject_cast<QFxItem *>(scene()->focusItem(d->targets.at(ii)));
- if (i)
+ if (i && (i->options() & AcceptsInputMethods)) {
scene()->sendEvent(i, e);
- if (e->isAccepted()) {
- d->inIM = false;
- return;
+ if (e->isAccepted()) {
+ d->imeItem = i;
+ d->inIM = false;
+ return;
+ }
}
}
d->inIM = false;
}
}
+QVariant QFxKeyProxy::inputMethodQuery(Qt::InputMethodQuery query) const
+{
+ for (int ii = 0; ii < d->targets.count(); ++ii) {
+ QFxItem *i = qobject_cast<QFxItem *>(scene()->focusItem(d->targets.at(ii)));
+ if (i && (i->options() & AcceptsInputMethods) && i == d->imeItem) { //### how robust is i == d->imeItem check?
+ QVariant v = i->inputMethodQuery(query);
+ if (v.type() == QVariant::RectF)
+ v = mapRectFromItem(i, v.toRectF()); //### cost?
+ return v;
+ }
+ }
+ return QFxItem::inputMethodQuery(query);
+}
+
QT_END_NAMESPACE
diff --git a/src/declarative/fx/qfxkeyproxy.h b/src/declarative/fx/qfxkeyproxy.h
index 8bcdc26..e77ffac 100644
--- a/src/declarative/fx/qfxkeyproxy.h
+++ b/src/declarative/fx/qfxkeyproxy.h
@@ -65,6 +65,7 @@ protected:
virtual void keyPressEvent(QKeyEvent *);
virtual void keyReleaseEvent(QKeyEvent *);
virtual void inputMethodEvent(QInputMethodEvent *);
+ virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const;
private:
Q_DISABLE_COPY(QFxKeyProxy)
diff --git a/src/declarative/fx/qfxlineedit.cpp b/src/declarative/fx/qfxlineedit.cpp
index d23c325..24cf3fc 100644
--- a/src/declarative/fx/qfxlineedit.cpp
+++ b/src/declarative/fx/qfxlineedit.cpp
@@ -207,23 +207,6 @@ QString QFxLineEdit::selectedText() const
return d->control->selectedText();
}
-bool QFxLineEdit::isAwesome() const
-{
- Q_D(const QFxLineEdit);
- return d->awesome;
-}
-
-#include <QTimer> //Can be removed along wit the property
-void QFxLineEdit::setAwesome(bool a)
-{
- Q_D(QFxLineEdit);
- d->awesome = a;
- if(a){
- setColor(QColor(0,0,255));
- rainbowRedraw();
- }
-}
-
QObject* QFxLineEdit::validator() const
{
Q_D(const QFxLineEdit);
@@ -462,7 +445,7 @@ void QFxLineEditPrivate::init()
{
Q_Q(QFxLineEdit);
control->setCursorWidth(1);
- control->setPasswordCharacter('*');
+ control->setPasswordCharacter(QLatin1Char('*'));
control->setLayoutDirection(Qt::LeftToRight);
control->setSelection(0,0);
q->setSmooth(true);
@@ -530,14 +513,5 @@ void QFxLineEdit::updateSize()
setContentsSize(QSize(width(), height()));
}
-void QFxLineEdit::rainbowRedraw()
-{
- Q_D(QFxLineEdit);
- if(!d->awesome)
- return;
- setColor(QColor::fromHsv((d->color.hue() + 5)%360, d->color.saturation(), d->color.value()));
- updateAll();
- QTimer::singleShot(50, this, SLOT(rainbowRedraw()));
-}
QT_END_NAMESPACE
diff --git a/src/declarative/fx/qfxlineedit.h b/src/declarative/fx/qfxlineedit.h
index 5abb418..e053c54 100644
--- a/src/declarative/fx/qfxlineedit.h
+++ b/src/declarative/fx/qfxlineedit.h
@@ -84,8 +84,7 @@ class Q_DECLARATIVE_EXPORT QFxLineEdit : public QFxPaintedItem
/*
Q_PROPERTY(int scrollDuration READ scrollDuration SET setScrollDuration NOTIFY scrollDurationChanged);
*/
- //### Requested by Aaron K.(Remove before release?)
- Q_PROPERTY(bool awesome READ isAwesome WRITE setAwesome);
+
public:
QFxLineEdit(QFxItem* parent=0);
~QFxLineEdit();
@@ -148,9 +147,6 @@ public:
bool hasAcceptableInput() const;
- bool isAwesome() const;
- void setAwesome(bool a);
-
void drawContents(QPainter *p,const QRect &r);
Q_SIGNALS:
void textChanged();
@@ -178,7 +174,6 @@ private slots:
void updateAll();
void createCursor();
void moveCursor();
- void rainbowRedraw();
private:
Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr, QFxLineEdit);
diff --git a/src/declarative/fx/qfxlineedit_p.h b/src/declarative/fx/qfxlineedit_p.h
index 8ee5cca..a0ab19c 100644
--- a/src/declarative/fx/qfxlineedit_p.h
+++ b/src/declarative/fx/qfxlineedit_p.h
@@ -65,9 +65,9 @@ class QFxLineEditPrivate : public QFxPaintedItemPrivate
public:
QFxLineEditPrivate() : control(new QLineControl(QString())),
font(0), color((QRgb)0), style(QFxText::Normal),
+ styleColor((QRgb)0),
hAlign(QFxText::AlignLeft), vAlign(QFxText::AlignTop),
- styleColor((QRgb)0), oldScroll(0), hscroll(0),
- focused(false), awesome(false)
+ hscroll(0), oldScroll(0), focused(false)
{
}
@@ -96,8 +96,6 @@ public:
int hscroll;
int oldScroll;
bool focused;
- bool awesome;
-
};
QT_END_NAMESPACE
diff --git a/src/declarative/util/qmltransitionmanager.cpp b/src/declarative/util/qmltransitionmanager.cpp
index 5e86b73..ba4e160 100644
--- a/src/declarative/util/qmltransitionmanager.cpp
+++ b/src/declarative/util/qmltransitionmanager.cpp
@@ -109,13 +109,10 @@ void QmlTransitionManager::transition(const QList<Action> &list,
QmlStateOperation::ActionList applyList = list;
// Determine which actions are binding changes.
foreach(const Action &action, applyList) {
- if (action.toBinding) {
+ if (action.toBinding)
d->bindingsList << action;
- if (action.fromBinding)
- action.property.setBinding(0); // Disable current binding
- } else if (action.fromBinding) {
+ if (action.fromBinding)
action.property.setBinding(0); // Disable current binding
- }
}
// Animated transitions need both the start and the end value for
@@ -156,7 +153,7 @@ void QmlTransitionManager::transition(const QList<Action> &list,
continue;
if (action.toBinding)
- action.property.setBinding(0);
+ action.property.setBinding(0); // Make sure this is disabled during the transition
action.property.write(action.fromValue);
}