summaryrefslogtreecommitdiffstats
path: root/src/declarative/util
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-07-01 01:31:10 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-07-01 01:31:10 (GMT)
commit0200260487c888b62d7761d6f358543602b53994 (patch)
tree3765d309209feabd2ab1c4e9f2ae593b01b9246a /src/declarative/util
parent6863162d579310e66694832ce1c1468cd1b7b169 (diff)
downloadQt-0200260487c888b62d7761d6f358543602b53994.zip
Qt-0200260487c888b62d7761d6f358543602b53994.tar.gz
Qt-0200260487c888b62d7761d6f358543602b53994.tar.bz2
Cleanup.
Diffstat (limited to 'src/declarative/util')
-rw-r--r--src/declarative/util/qmlanimation.cpp16
-rw-r--r--src/declarative/util/qmlanimation.h1
2 files changed, 2 insertions, 15 deletions
diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp
index c4eabfe..620739f 100644
--- a/src/declarative/util/qmlanimation.cpp
+++ b/src/declarative/util/qmlanimation.cpp
@@ -97,13 +97,11 @@ QEasingCurve stringToCurve(const QString &curve)
if (normalizedCurve.startsWith(QLatin1String("ease")))
normalizedCurve = normalizedCurve.mid(4);
- //XXX optimize?
- int index = QEasingCurve::staticMetaObject.indexOfEnumerator("Type");
- QMetaEnum me = QEasingCurve::staticMetaObject.enumerator(index);
+ static int index = QEasingCurve::staticMetaObject.indexOfEnumerator("Type");
+ static QMetaEnum me = QEasingCurve::staticMetaObject.enumerator(index);
int value = me.keyToValue(normalizedCurve.toLatin1().constData());
if (value < 0) {
- //XXX print line number
qWarning("QEasingCurve: Unknown easing curve '%s'",
curve.toLatin1().constData());
value = 0;
@@ -130,7 +128,6 @@ QEasingCurve stringToCurve(const QString &curve)
return easingCurve;
}
- //XXX optimize
if (propName == QLatin1String("amplitude")) {
easingCurve.setAmplitude(propValue);
} else if (propName == QLatin1String("period")) {
@@ -698,15 +695,6 @@ void QmlPauseAnimation::setDuration(int duration)
emit durationChanged(duration);
}
-void QmlPauseAnimation::prepare(QmlMetaProperty &p)
-{
- Q_D(QmlPauseAnimation);
- if (d->userProperty.isNull)
- d->property = p;
- else
- d->property = d->userProperty;
-}
-
QAbstractAnimation *QmlPauseAnimation::qtAnimation()
{
Q_D(QmlPauseAnimation);
diff --git a/src/declarative/util/qmlanimation.h b/src/declarative/util/qmlanimation.h
index 12212df..91c1898 100644
--- a/src/declarative/util/qmlanimation.h
+++ b/src/declarative/util/qmlanimation.h
@@ -154,7 +154,6 @@ Q_SIGNALS:
protected:
virtual QAbstractAnimation *qtAnimation();
- virtual void prepare(QmlMetaProperty &);
};
class QmlRunScriptActionPrivate;