diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-06-26 03:36:53 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-06-26 03:36:53 (GMT) |
commit | 0ee01c42afb203d60ff0cd543ced124e0c100b8e (patch) | |
tree | d961afce8a30067f673ef4c4dfe2cdd9fff2576f /src/declarative/util | |
parent | 98286fd1ac3bb7940618d5a170c7b98b0e2a4dae (diff) | |
download | Qt-0ee01c42afb203d60ff0cd543ced124e0c100b8e.zip Qt-0ee01c42afb203d60ff0cd543ced124e0c100b8e.tar.gz Qt-0ee01c42afb203d60ff0cd543ced124e0c100b8e.tar.bz2 |
Make ease prefix optional.
Diffstat (limited to 'src/declarative/util')
-rw-r--r-- | src/declarative/util/qmlanimation.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp index 921c578..c5f2a25 100644 --- a/src/declarative/util/qmlanimation.cpp +++ b/src/declarative/util/qmlanimation.cpp @@ -85,11 +85,17 @@ QEasingCurve stringToCurve(const QString &curve) QString prop_str = easeName.mid(idx + 1, easeName.length() - 1 - idx - 1); normalizedCurve = easeName.left(idx); + if (!normalizedCurve.startsWith(QLatin1String("ease"))) { + qWarning("QEasingCurve: Easing function '%s' must start with 'ease'", + curve.toLatin1().constData()); + } props = prop_str.split(QLatin1Char(',')); } - normalizedCurve = normalizedCurve.mid(4); + if (normalizedCurve.startsWith(QLatin1String("ease"))) + normalizedCurve = normalizedCurve.mid(4); + //XXX optimize? int index = QEasingCurve::staticMetaObject.indexOfEnumerator("Type"); QMetaEnum me = QEasingCurve::staticMetaObject.enumerator(index); |