summaryrefslogtreecommitdiffstats
path: root/src/corelib/doc/src/qt6-changes.qdoc
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@qt.io>2020-10-29 15:39:20 +0100
committerTopi Reinio <topi.reinio@qt.io>2020-10-29 18:26:13 +0100
commit13e978e82754020bfd31cf0c8784d8b51621b96f (patch)
tree63b4d592080b19b0efe6fdac3b222de2144cdfe1 /src/corelib/doc/src/qt6-changes.qdoc
parent91384c99182e3e306f9cad97a3e9e6de283e5466 (diff)
Doc: Fix code snippet that abruptly ends the document
Having the string '*/' appear in a quoted snippet ends the entire documentation comment. Use a parameter to the \code command to work around that. Task-number: QTBUG-86295 Change-Id: Ifcb21a4a0958724ebdb1c9e0eafdc767020d3a7b Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/corelib/doc/src/qt6-changes.qdoc')
-rw-r--r--src/corelib/doc/src/qt6-changes.qdoc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/doc/src/qt6-changes.qdoc b/src/corelib/doc/src/qt6-changes.qdoc
index 099ebeb6b6..adf9dc2e80 100644
--- a/src/corelib/doc/src/qt6-changes.qdoc
+++ b/src/corelib/doc/src/qt6-changes.qdoc
@@ -595,18 +595,18 @@
translated in a way you would expect it. The following example code will
silently break if simply converted using the above mentioned function:
- \code
+ \code *
const QString fp1("C:/Users/dummy/files/content.txt");
const QString fp2("/home/dummy/files/content.txt");
- QRegExp re1("*/files/*");
+ QRegExp re1("\1/files/*");
re1.setPatternSyntax(QRegExp::Wildcard);
... = re1.exactMatch(fp1); // returns true
... = re1.exactMatch(fp2); // returns true
// but converted with QRegularExpression::wildcardToRegularExpression()
- QRegularExpression re2(QRegularExpression::wildcardToRegularExpression("*/files/*"));
+ QRegularExpression re2(QRegularExpression::wildcardToRegularExpression("\1/files/*"));
... = re2.match(fp1).hasMatch(); // returns false
... = re2.match(fp2).hasMatch(); // returns false
\endcode