diff options
author | Giuseppe D'Angelo <dangelog@gmail.com> | 2012-03-11 00:26:17 +0000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-14 10:53:24 +0100 |
commit | 08790636f2b19a6bab97e3462211bec5b2d23c45 (patch) | |
tree | 77e6dc5a9b79e4c0e3462c6bf345d0283cde144b /src/corelib/kernel/qvariant.h | |
parent | b8112c8526a6e261c6e00bdb4fe6ceef3876d01f (diff) |
QRegularExpression: QMetaType and QVariant support
Removed the Q_DECLARE_METATYPE in favour of first-class support
inside QMetaType and QVariant.
Change-Id: I904236822bfab967dc0fbd4d4cc2bcb68c741adc
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'src/corelib/kernel/qvariant.h')
-rw-r--r-- | src/corelib/kernel/qvariant.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h index 4d4b2d51ab..cc502d93a7 100644 --- a/src/corelib/kernel/qvariant.h +++ b/src/corelib/kernel/qvariant.h @@ -76,7 +76,8 @@ class QRect; class QRectF; #ifndef QT_NO_REGEXP class QRegExp; -#endif +class QRegularExpression; +#endif // QT_NO_REGEXP class QTextFormat; class QTextLength; class QUrl; @@ -154,6 +155,7 @@ class Q_CORE_EXPORT QVariant Point = QMetaType::QPoint, PointF = QMetaType::QPointF, RegExp = QMetaType::QRegExp, + RegularExpression = QMetaType::QRegularExpression, Hash = QMetaType::QVariantHash, EasingCurve = QMetaType::QEasingCurve, Uuid = QMetaType::QUuid, @@ -239,7 +241,10 @@ class Q_CORE_EXPORT QVariant QVariant(const QLocale &locale); #ifndef QT_NO_REGEXP QVariant(const QRegExp ®Exp); -#endif +#ifndef QT_BOOTSRAPPED + QVariant(const QRegularExpression &re); +#endif // QT_BOOTSTRAPPED +#endif // QT_NO_REGEXP #ifndef QT_BOOTSTRAPPED QVariant(const QEasingCurve &easing); #endif @@ -302,7 +307,10 @@ class Q_CORE_EXPORT QVariant QLocale toLocale() const; #ifndef QT_NO_REGEXP QRegExp toRegExp() const; -#endif +#ifndef QT_BOOTSTRAPPED + QRegularExpression toRegularExpression() const; +#endif // QT_BOOTSTRAPPED +#endif // QT_NO_REGEXP #ifndef QT_BOOTSTRAPPED QEasingCurve toEasingCurve() const; #endif |