diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-04-03 20:57:06 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-04-15 14:39:24 +0200 |
commit | 1b65098a202f67d80d5db9e2ea1d07033c01f570 (patch) | |
tree | d65bf3ed84370035320fe6448fcdd48ce9a8bb38 /src/corelib/doc | |
parent | b6145bfcc5dc1dde253c9bf44f751270fbfcb577 (diff) | |
download | qtbase-1b65098a202f67d80d5db9e2ea1d07033c01f570.tar.gz |
Move the QRegExp porting docs into the QRegExp class documentation
It used to live in QRegularExpression, but as QRegExp gets removed from
Qt Core, the better place for it is to live in the QRegExp docs.
Also marked QRegExp as deprecated in the docs.
Change-Id: Id5b0e3040e4d46f5d806022b58fbd5b5efd58911
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/corelib/doc')
-rw-r--r-- | src/corelib/doc/snippets/code/src_corelib_tools_qregexp.cpp | 9 | ||||
-rw-r--r-- | src/corelib/doc/snippets/code/src_corelib_tools_qregularexpression.cpp | 9 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/corelib/doc/snippets/code/src_corelib_tools_qregexp.cpp b/src/corelib/doc/snippets/code/src_corelib_tools_qregexp.cpp index 433b01b21a..8339ea413e 100644 --- a/src/corelib/doc/snippets/code/src_corelib_tools_qregexp.cpp +++ b/src/corelib/doc/snippets/code/src_corelib_tools_qregexp.cpp @@ -232,3 +232,12 @@ s2 = QRegExp::escape("f(x)"); // s2 == "f\\(x\\)" QRegExp rx("(" + QRegExp::escape(name) + "|" + QRegExp::escape(alias) + ")"); //! [20] + +{ +//! [21] +QString p("a .*|pattern"); + +// re matches exactly the pattern string p +QRegularExpression re(QRegularExpression::anchoredPattern(p)); +//! [21] +} diff --git a/src/corelib/doc/snippets/code/src_corelib_tools_qregularexpression.cpp b/src/corelib/doc/snippets/code/src_corelib_tools_qregularexpression.cpp index 99cd4ea7a2..b451ed5253 100644 --- a/src/corelib/doc/snippets/code/src_corelib_tools_qregularexpression.cpp +++ b/src/corelib/doc/snippets/code/src_corelib_tools_qregularexpression.cpp @@ -285,15 +285,6 @@ if (!invalidRe.isValid()) { } { -//! [24] -QString p("a .*|pattern"); - -// re matches exactly the pattern string p -QRegularExpression re(QRegularExpression::anchoredPattern(p)); -//! [24] -} - -{ //! [26] QString escaped = QRegularExpression::escape("a(x) = f(x) + g(x)"); // escaped == "a\\(x\\)\\ \\=\\ f\\(x\\)\\ \\+\\ g\\(x\\)" |