summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qregularexpression.h
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2020-02-12 02:38:20 +0100
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2020-03-13 15:23:56 +0100
commit2537d047857db9f686e66c1e464b4742c23756b3 (patch)
tree64ef711d722d67aa07d45fc627810a7f5bea2b95 /src/corelib/text/qregularexpression.h
parent75514103e2f1cb7dc6b238d696b228e8f64a00ec (diff)
QRegularExpression: inline some compatibility calls
The functions take QStringView now. The ones taking QString can be implemented inline (BC break). Drive-by change, use qToStringViewIgnoringNull. Change-Id: Ia3089c574446418e5ab93e08e21869ef19fbfbfd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/text/qregularexpression.h')
-rw-r--r--src/corelib/text/qregularexpression.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/corelib/text/qregularexpression.h b/src/corelib/text/qregularexpression.h
index 4fa258b080..9e703a4eea 100644
--- a/src/corelib/text/qregularexpression.h
+++ b/src/corelib/text/qregularexpression.h
@@ -138,11 +138,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