summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <dangelog@gmail.com>2012-02-19 23:58:04 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-06 23:56:55 +0100
commitd7b720dd3ee7a095abe7e283d1bed881268b0f5e (patch)
tree92cf551ee5b0a470455e54abc97a6bf163a093f7
parentefcd4d9470781e3a0331afeab49cd00cee24399f (diff)
QRegularExpression: const correctness fixes
Adding some const qualifiers to members which are never written. Change-Id: Ibb8953764c7b7790a419a5d48f2956751d5fc1f9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r--src/corelib/tools/qregularexpression.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/corelib/tools/qregularexpression.cpp b/src/corelib/tools/qregularexpression.cpp
index 7bbac0144b..40b6b5a08e 100644
--- a/src/corelib/tools/qregularexpression.cpp
+++ b/src/corelib/tools/qregularexpression.cpp
@@ -817,14 +817,14 @@ struct QRegularExpressionMatchPrivate : QSharedData
QRegularExpressionMatch nextMatch() const;
- QRegularExpression regularExpression;
- QString subject;
+ const QRegularExpression regularExpression;
+ const QString subject;
// the capturedOffsets vector contains pairs of (start, end) positions
// for each captured substring
QVector<int> capturedOffsets;
- QRegularExpression::MatchType matchType;
- QRegularExpression::MatchOptions matchOptions;
+ const QRegularExpression::MatchType matchType;
+ const QRegularExpression::MatchOptions matchOptions;
int capturedCount;
@@ -835,16 +835,16 @@ struct QRegularExpressionMatchPrivate : QSharedData
struct QRegularExpressionMatchIteratorPrivate : QSharedData
{
- QRegularExpressionMatchIteratorPrivate(const QRegularExpression re,
+ QRegularExpressionMatchIteratorPrivate(const QRegularExpression &re,
QRegularExpression::MatchType matchType,
QRegularExpression::MatchOptions matchOptions,
const QRegularExpressionMatch &next);
bool hasNext() const;
QRegularExpressionMatch next;
- QRegularExpression regularExpression;
- QRegularExpression::MatchType matchType;
- QRegularExpression::MatchOptions matchOptions;
+ const QRegularExpression regularExpression;
+ const QRegularExpression::MatchType matchType;
+ const QRegularExpression::MatchOptions matchOptions;
};
/*!
@@ -1216,7 +1216,7 @@ QRegularExpressionMatch QRegularExpressionMatchPrivate::nextMatch() const
/*!
\internal
*/
-QRegularExpressionMatchIteratorPrivate::QRegularExpressionMatchIteratorPrivate(const QRegularExpression re,
+QRegularExpressionMatchIteratorPrivate::QRegularExpressionMatchIteratorPrivate(const QRegularExpression &re,
QRegularExpression::MatchType matchType,
QRegularExpression::MatchOptions matchOptions,
const QRegularExpressionMatch &next)