summaryrefslogtreecommitdiff
path: root/src/xmlpatterns/functions/qpatternplatform_p.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2012-04-23 16:29:18 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-24 14:39:38 +0200
commitc1623a0d42c9869e5a1d04081e7660722a863de5 (patch)
tree17a58be3a4c80b143add805b7ff8218daab61106 /src/xmlpatterns/functions/qpatternplatform_p.h
parentc18f589a757b2c4cb8c5e66a92f34ac005223cfe (diff)
downloadqtxmlpatterns-c1623a0d42c9869e5a1d04081e7660722a863de5.tar.gz
Don't use the QRegExp methods that modify the object
QRegExp matching methods modify the object, which we don't want to. In particular, when we receive a QRegExp from the user or we store in a context that might require thread-safety, make sure we make a copy before using it. QRegularExpression has no such shortcoming. Task-number: QTBUG-25064 Change-Id: I2c4d5f4b60d6b3569568103cd7107cd2adaa3ae8 Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/xmlpatterns/functions/qpatternplatform_p.h')
-rw-r--r--src/xmlpatterns/functions/qpatternplatform_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xmlpatterns/functions/qpatternplatform_p.h b/src/xmlpatterns/functions/qpatternplatform_p.h
index ede3c4e..4a7f087 100644
--- a/src/xmlpatterns/functions/qpatternplatform_p.h
+++ b/src/xmlpatterns/functions/qpatternplatform_p.h
@@ -113,7 +113,7 @@ namespace QPatternist
* settings its flags, and everything else required for getting it ready to use. If an error
* occurs, an appropriate error is raised via @p context.
*/
- const QRegExp pattern(const DynamicContext::Ptr &context) const;
+ QRegExp pattern(const DynamicContext::Ptr &context) const;
/**
* @returns the number of captures, also called parenthesized sub-expressions, the pattern has.