summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qvariant.cpp
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2012-10-14 16:29:39 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-01-07 16:11:19 +0100
commit59eb393cf57015a4dfea94617c863aafb096afa7 (patch)
tree3cb977b8a857940f909ee52db05a3de92779dbca /src/corelib/kernel/qvariant.cpp
parent79f0a29abf3b2947da7848c8501061fdf7e91b76 (diff)
Rename QRegularExpression-related feature defs to QT_NO_REGULAREXPRESSION
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 <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Diffstat (limited to 'src/corelib/kernel/qvariant.cpp')
-rw-r--r--src/corelib/kernel/qvariant.cpp10
1 files changed, 6 insertions, 4 deletions
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 &regExp)
: d(RegExp)
{ v_construct<QRegExp>(&d, regExp); }
+#endif // QT_NO_REGEXP
#ifndef QT_BOOTSTRAPPED
+#ifndef QT_NO_REGULAREXPRESSION
QVariant::QVariant(const QRegularExpression &re)
: d(RegularExpression)
{ v_construct<QRegularExpression>(&d, re); }
+#endif
QVariant::QVariant(const QUuid &uuid)
: d(Uuid)
{ v_construct<QUuid>(&d, uuid); }
@@ -1552,7 +1555,6 @@ QVariant::QVariant(const QJsonDocument &jsonDocument)
: d(QMetaType::QJsonDocument)
{ v_construct<QJsonDocument>(&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<QRegularExpression>(d, handlerManager);
}
-#endif
+#endif // QT_NO_REGULAREXPRESSION
/*!
\since 5.0