diff options
author | Tasuku Suzuki <tasuku.suzuki@nokia.com> | 2010-05-25 18:32:11 (GMT) |
---|---|---|
committer | Tasuku Suzuki <tasuku.suzuki@nokia.com> | 2010-05-25 18:32:11 (GMT) |
commit | 5c8017e0880cc5f71854ebb71a38b944e58260b1 (patch) | |
tree | 246e556496f19077d71aea6dad1af7883f4db385 /src/declarative/qml/qdeclarativestringconverters.cpp | |
parent | 99f6250a4ac031b70757442715b226bc339ab699 (diff) | |
download | Qt-5c8017e0880cc5f71854ebb71a38b944e58260b1.zip Qt-5c8017e0880cc5f71854ebb71a38b944e58260b1.tar.gz Qt-5c8017e0880cc5f71854ebb71a38b944e58260b1.tar.bz2 |
Fix QT_NO_TEXTDATE
Diffstat (limited to 'src/declarative/qml/qdeclarativestringconverters.cpp')
-rw-r--r-- | src/declarative/qml/qdeclarativestringconverters.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/declarative/qml/qdeclarativestringconverters.cpp b/src/declarative/qml/qdeclarativestringconverters.cpp index bbcc00b..8bd2cf1 100644 --- a/src/declarative/qml/qdeclarativestringconverters.cpp +++ b/src/declarative/qml/qdeclarativestringconverters.cpp @@ -106,12 +106,14 @@ QVariant QDeclarativeStringConverters::variantFromString(const QString &s, int p return QVariant(uint(qRound(s.toDouble(ok)))); case QMetaType::QColor: return QVariant::fromValue(colorFromString(s, ok)); +#ifndef QT_NO_TEXTDATE case QMetaType::QDate: return QVariant::fromValue(dateFromString(s, ok)); case QMetaType::QTime: return QVariant::fromValue(timeFromString(s, ok)); case QMetaType::QDateTime: return QVariant::fromValue(dateTimeFromString(s, ok)); +#endif // QT_NO_TEXTDATE case QMetaType::QPointF: return QVariant::fromValue(pointFFromString(s, ok)); case QMetaType::QPoint: @@ -150,6 +152,7 @@ QColor QDeclarativeStringConverters::colorFromString(const QString &s, bool *ok) } } +#ifndef QT_NO_TEXTDATE QDate QDeclarativeStringConverters::dateFromString(const QString &s, bool *ok) { QDate d = QDate::fromString(s, Qt::ISODate); @@ -170,6 +173,7 @@ QDateTime QDeclarativeStringConverters::dateTimeFromString(const QString &s, boo if (ok) *ok = d.isValid(); return d; } +#endif // QT_NO_TEXTDATE //expects input of "x,y" QPointF QDeclarativeStringConverters::pointFFromString(const QString &s, bool *ok) |