diff options
author | Samuel Gaist <samuel.gaist@edeltech.ch> | 2014-08-21 22:34:24 +0200 |
---|---|---|
committer | Konstantin Ritt <ritt.ks@gmail.com> | 2014-11-26 01:28:48 +0100 |
commit | 1611adc17eda0f4a85aea8d9cb4c5d01be0eda41 (patch) | |
tree | 239735292caf0344af32be4724aeb7029ba99430 | |
parent | 9ccc2560c844dcd607ff3d5f08f7daa7df08b623 (diff) |
Add missing QT_NO_REGEXP guard to search functions
Change-Id: I651243ad5dcdd0dcef20f12f37769bf8c45ae3c5
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
-rw-r--r-- | src/gui/text/qtextdocument.cpp | 2 | ||||
-rw-r--r-- | src/gui/text/qtextdocument.h | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp index 3820b415a3..3a11266e0a 100644 --- a/src/gui/text/qtextdocument.cpp +++ b/src/gui/text/qtextdocument.cpp @@ -1301,6 +1301,7 @@ QTextCursor QTextDocument::find(const QString &subString, const QTextCursor &cur } +#ifndef QT_NO_REGEXP static bool findInBlock(const QTextBlock &block, const QRegExp &expression, int offset, QTextDocument::FindFlags options, QTextCursor *cursor) { @@ -1420,6 +1421,7 @@ QTextCursor QTextDocument::find(const QRegExp &expr, const QTextCursor &cursor, } return find(expr, pos, options); } +#endif // QT_REGEXP #ifndef QT_NO_REGULAREXPRESSION static bool findInBlock(const QTextBlock &block, const QRegularExpression &expression, int offset, diff --git a/src/gui/text/qtextdocument.h b/src/gui/text/qtextdocument.h index 83e255bd96..271c29b16b 100644 --- a/src/gui/text/qtextdocument.h +++ b/src/gui/text/qtextdocument.h @@ -161,8 +161,11 @@ public: QTextCursor find(const QString &subString, int from = 0, FindFlags options = 0) const; QTextCursor find(const QString &subString, const QTextCursor &cursor, FindFlags options = 0) const; + +#ifndef QT_NO_REGEXP QTextCursor find(const QRegExp &expr, int from = 0, FindFlags options = 0) const; QTextCursor find(const QRegExp &expr, const QTextCursor &cursor, FindFlags options = 0) const; +#endif #ifndef QT_NO_REGULAREXPRESSION QTextCursor find(const QRegularExpression &expr, int from = 0, FindFlags options = 0) const; |