From 5a4787dca01c302dd462a76222dfbf28c8951a8d Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Fri, 9 Feb 2018 14:29:21 +0100 Subject: Modernize the "regularexpression" feature Use QT_CONFIG(regularexpression), disentangle it from QT_BOOTSTRAPPED, switch it off in the bootstrap build, remove the #ifdefs from qregularexpression.{h|cpp}, and add QT_REQUIRE_CONFIG(regularexpression) to the header. qregularexpression.{h|cpp} are already correctly excluded in tools.pri if !qtConfig(regularexpression). Change-Id: I21de154a6a118b76f99003d3acb72ac1e220d302 Reviewed-by: Oswald Buddenhagen --- src/gui/text/qtextdocument.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/gui/text/qtextdocument.cpp') diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp index e27b388762..44d1b2f201 100644 --- a/src/gui/text/qtextdocument.cpp +++ b/src/gui/text/qtextdocument.cpp @@ -47,7 +47,9 @@ #include "qtextlist.h" #include #include +#if QT_CONFIG(regularexpression) #include +#endif #include #include #include @@ -1488,7 +1490,7 @@ QTextCursor QTextDocument::find(const QRegExp &expr, const QTextCursor &cursor, } #endif // QT_REGEXP -#ifndef QT_NO_REGULAREXPRESSION +#if QT_CONFIG(regularexpression) static bool findInBlock(const QTextBlock &block, const QRegularExpression &expression, int offset, QTextDocument::FindFlags options, QTextCursor *cursor) { @@ -1613,7 +1615,7 @@ QTextCursor QTextDocument::find(const QRegularExpression &expr, const QTextCurso } return find(expr, pos, options); } -#endif // QT_NO_REGULAREXPRESSION +#endif // QT_CONFIG(regularexpression) /*! \fn QTextObject *QTextDocument::createObject(const QTextFormat &format) -- cgit v1.2.3