From 61f2b450560887651b3350e63bdd75609e3b6752 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Mon, 30 Nov 2009 11:40:27 +0100 Subject: Fixed build on S60 and WinCE Since qreal is a float on these targets, it was having trouble picking the right version of qMax. --- src/gui/painting/qpainter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index fc1863f..443c9c5 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -5918,7 +5918,7 @@ static QPixmap generateWavyPixmap(qreal maxRadius, const QPen &pen) if (QPixmapCache::find(key, pixmap)) return pixmap; - const qreal halfPeriod = qMax(qreal(2), radiusBase * 1.61803399); // the golden ratio + const qreal halfPeriod = qMax(qreal(2), qreal(radiusBase * 1.61803399)); // the golden ratio const int width = qCeil(100 / (2 * halfPeriod)) * (2 * halfPeriod); const int radius = qFloor(radiusBase); -- cgit v0.12 From c20ff1f36b8f5ba47e0358c4d63eed408c97b993 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Tue, 1 Dec 2009 08:42:33 +1000 Subject: Fix PropertyAction crash. It is possible for the animation to stop while in doAction(), which would then delete the animations we were running. --- src/declarative/util/qmlanimation_p_p.h | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/declarative/util/qmlanimation_p_p.h b/src/declarative/util/qmlanimation_p_p.h index cb1c642..326e1c6 100644 --- a/src/declarative/util/qmlanimation_p_p.h +++ b/src/declarative/util/qmlanimation_p_p.h @@ -64,6 +64,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE @@ -94,9 +95,9 @@ class QActionAnimation : public QAbstractAnimation { Q_OBJECT public: - QActionAnimation(QObject *parent = 0) : QAbstractAnimation(parent), animAction(0), policy(KeepWhenStopped) {} + QActionAnimation(QObject *parent = 0) : QAbstractAnimation(parent), animAction(0), policy(KeepWhenStopped), running(false) {} QActionAnimation(QAbstractAnimationAction *action, QObject *parent = 0) - : QAbstractAnimation(parent), animAction(action), policy(KeepWhenStopped) {} + : QAbstractAnimation(parent), animAction(action), policy(KeepWhenStopped), running(false) {} virtual int duration() const { return 0; } void setAnimAction(QAbstractAnimationAction *action, DeletionPolicy p) { @@ -111,17 +112,27 @@ protected: virtual void updateState(State newState, State /*oldState*/) { if (newState == Running) { - if (animAction) + if (animAction) { + running = true; animAction->doAction(); + running = false; + if (state() == Stopped && policy == DeleteWhenStopped) { + delete animAction; + animAction = 0; + } + } } else if (newState == Stopped && policy == DeleteWhenStopped) { - delete animAction; - animAction = 0; + if (!running) { + delete animAction; + animAction = 0; + } } } private: QAbstractAnimationAction *animAction; DeletionPolicy policy; + bool running; }; //animates QmlTimeLineValue (assumes start and end values will be reals or compatible) -- cgit v0.12 From 50afd26a657da319bd6e3cff09ac6c8dd44405bf Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Tue, 1 Dec 2009 08:55:42 +1000 Subject: unwarn --- src/declarative/qml/qmlsqldatabase.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/declarative/qml/qmlsqldatabase.cpp b/src/declarative/qml/qmlsqldatabase.cpp index d11e3cb..5a7e94c 100644 --- a/src/declarative/qml/qmlsqldatabase.cpp +++ b/src/declarative/qml/qmlsqldatabase.cpp @@ -71,7 +71,7 @@ public: str_forwardOnly = engine->toStringHandle(QLatin1String("forwardOnly")); // not in HTML5 (an optimization) } - QueryFlags queryProperty(const QScriptValue &object, + QueryFlags queryProperty(const QScriptValue &, const QScriptString &name, QueryFlags flags, uint *) { @@ -369,7 +369,7 @@ static QScriptValue qmlsqldatabase_open_sync(QScriptContext *context, QScriptEng // Incompatible THROW_SQL(VERSION_ERR,QmlEngine::tr("SQL: database version mismatch")); } - version = ini.value("Version").toString(); + version = ini.value(QLatin1String("Version")).toString(); } database.setDatabaseName(basename+QLatin1String(".sqlite")); } -- cgit v0.12