summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qregularexpression.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/text/qregularexpression.h')
-rw-r--r--src/corelib/text/qregularexpression.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/corelib/text/qregularexpression.h b/src/corelib/text/qregularexpression.h
index 4fa258b080..aa6c48bf54 100644
--- a/src/corelib/text/qregularexpression.h
+++ b/src/corelib/text/qregularexpression.h
@@ -59,7 +59,7 @@ class QRegularExpressionMatchIterator;
struct QRegularExpressionPrivate;
class QRegularExpression;
-Q_CORE_EXPORT uint qHash(const QRegularExpression &key, uint seed = 0) noexcept;
+Q_CORE_EXPORT size_t qHash(const QRegularExpression &key, size_t seed = 0) noexcept;
class Q_CORE_EXPORT QRegularExpression
{
@@ -110,7 +110,8 @@ public:
enum MatchOption {
NoMatchOption = 0x0000,
- AnchoredMatchOption = 0x0001,
+ AnchoredMatchOption Q_DECL_ENUMERATOR_DEPRECATED_X("Use AnchorAtOffsetMatchOption instead") = 0x0001,
+ AnchorAtOffsetMatchOption = 0x0001,
DontCheckSubjectStringMatchOption = 0x0002
};
Q_DECLARE_FLAGS(MatchOptions, MatchOption)
@@ -138,11 +139,19 @@ public:
void optimize() const;
#if QT_STRINGVIEW_LEVEL < 2
- static QString escape(const QString &str);
- static QString wildcardToRegularExpression(const QString &str);
+ static QString escape(const QString &str)
+ {
+ return escape(qToStringViewIgnoringNull(str));
+ }
+
+ static QString wildcardToRegularExpression(const QString &str)
+ {
+ return wildcardToRegularExpression(qToStringViewIgnoringNull(str));
+ }
+
static inline QString anchoredPattern(const QString &expression)
{
- return anchoredPattern(QStringView(expression));
+ return anchoredPattern(qToStringViewIgnoringNull(expression));
}
#endif
@@ -158,7 +167,7 @@ private:
friend class QRegularExpressionMatch;
friend struct QRegularExpressionMatchPrivate;
friend class QRegularExpressionMatchIterator;
- friend Q_CORE_EXPORT uint qHash(const QRegularExpression &key, uint seed) noexcept;
+ friend Q_CORE_EXPORT size_t qHash(const QRegularExpression &key, size_t seed) noexcept;
QRegularExpression(QRegularExpressionPrivate &dd);
QExplicitlySharedDataPointer<QRegularExpressionPrivate> d;