From 59eb393cf57015a4dfea94617c863aafb096afa7 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Sun, 14 Oct 2012 16:29:39 +0100 Subject: Rename QRegularExpression-related feature defs to QT_NO_REGULAREXPRESSION MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QRegExp and QRegularExpression are totally independent, therefore using two different defines is the right thing to do. Also, document the new define in qfeatures.{txt,h}. Change-Id: Ice4826ea543f4b22f1cc27bf31ed6e043d0c43b0 Reviewed-by: Oswald Buddenhagen Reviewed-by: Thiago Macieira Reviewed-by: JÄ™drzej Nowacki --- src/corelib/kernel/qvariant.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/corelib/kernel/qvariant.cpp') diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index 26deeba6a2..a88b7d2b1f 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -1529,10 +1529,13 @@ QVariant::QVariant(const QLocale &l) QVariant::QVariant(const QRegExp ®Exp) : d(RegExp) { v_construct(&d, regExp); } +#endif // QT_NO_REGEXP #ifndef QT_BOOTSTRAPPED +#ifndef QT_NO_REGULAREXPRESSION QVariant::QVariant(const QRegularExpression &re) : d(RegularExpression) { v_construct(&d, re); } +#endif QVariant::QVariant(const QUuid &uuid) : d(Uuid) { v_construct(&d, uuid); } @@ -1552,7 +1555,6 @@ QVariant::QVariant(const QJsonDocument &jsonDocument) : d(QMetaType::QJsonDocument) { v_construct(&d, jsonDocument); } #endif // QT_BOOTSTRAPPED -#endif // QT_NO_REGEXP /*! Returns the storage type of the value stored in the variant. @@ -2214,6 +2216,7 @@ QRegExp QVariant::toRegExp() const } #endif +#ifndef QT_BOOTSTRAPPED /*! \fn QRegularExpression QVariant::toRegularExpression() const \since 5.0 @@ -2223,13 +2226,12 @@ QRegExp QVariant::toRegExp() const \sa canConvert(), convert() */ -#ifndef QT_BOOTSTRAPPED -#ifndef QT_NO_REGEXP +#ifndef QT_NO_REGULAREXPRESSION QRegularExpression QVariant::toRegularExpression() const { return qVariantToHelper(d, handlerManager); } -#endif +#endif // QT_NO_REGULAREXPRESSION /*! \since 5.0 -- cgit v1.2.3