diff options
Diffstat (limited to 'src/corelib/serialization/qcborvalue.h')
-rw-r--r-- | src/corelib/serialization/qcborvalue.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/corelib/serialization/qcborvalue.h b/src/corelib/serialization/qcborvalue.h index e6e73e1fb6..f542e44c47 100644 --- a/src/corelib/serialization/qcborvalue.h +++ b/src/corelib/serialization/qcborvalue.h @@ -43,7 +43,9 @@ #include <QtCore/qbytearray.h> #include <QtCore/qdatetime.h> #include <QtCore/qcborcommon.h> -#include <QtCore/qregularexpression.h> +#if QT_CONFIG(regularexpression) +# include <QtCore/qregularexpression.h> +#endif #include <QtCore/qstring.h> #include <QtCore/qstringview.h> #include <QtCore/qurl.h> @@ -157,7 +159,9 @@ public: explicit QCborValue(const QDateTime &dt); explicit QCborValue(const QUrl &url); +#if QT_CONFIG(regularexpression) explicit QCborValue(const QRegularExpression &rx); +#endif explicit QCborValue(const QUuid &uuid); ~QCborValue() { if (container) dispose(); } @@ -235,7 +239,9 @@ public: QString toString(const QString &defaultValue = {}) const; QDateTime toDateTime(const QDateTime &defaultValue = {}) const; QUrl toUrl(const QUrl &defaultValue = {}) const; +#if QT_CONFIG(regularexpression) QRegularExpression toRegularExpression(const QRegularExpression &defaultValue = {}) const; +#endif QUuid toUuid(const QUuid &defaultValue = {}) const; // only forward-declared, need split functions @@ -380,8 +386,10 @@ public: { return concrete().toDateTime(defaultValue); } QUrl toUrl(const QUrl &defaultValue = {}) const { return concrete().toUrl(defaultValue); } +#if QT_CONFIG(regularexpression) QRegularExpression toRegularExpression(const QRegularExpression &defaultValue = {}) const { return concrete().toRegularExpression(defaultValue); } +#endif QUuid toUuid(const QUuid &defaultValue = {}) const { return concrete().toUuid(defaultValue); } |