summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@digia.com>2012-01-19 17:32:41 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-26 07:02:25 +0100
commit8eb2546bf23419e20064f4cf5c308e77831b3ee5 (patch)
treeb3a261a6dadc0f98e4d57ae1fd25972db1ef773d /src
parent4dae8c1aff6a4d83fdabe366c6711df7ff867887 (diff)
Fix a couple of edge cases for WildcardUnix matching
Fix a couple of cases where WildcardUnix was not matching when the string was just [] or ended with a \. The testWildcardEscaping() test has been extended to account for these two cases too. Integrate 7ce3726aea4be2dfdb57966a4482f66fec6f8f57 from 4.8 Task-number: QTBUG-20897 Change-Id: I7a07ac008473fa7a080db752e189f6404842603f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/tools/qregexp.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qregexp.cpp b/src/corelib/tools/qregexp.cpp
index a2c8dce23c..4b1e1b44e2 100644
--- a/src/corelib/tools/qregexp.cpp
+++ b/src/corelib/tools/qregexp.cpp
@@ -773,7 +773,7 @@ static QString wc2rx(const QString &wc_str, const bool enableEscaping)
if (isEscaping) {
rx += QLatin1String("\\\\");
} // we insert the \\ later if necessary
- if (i+1 == wclen) { // the end
+ if (i == wclen) { // the end
rx += QLatin1String("\\\\");
}
} else {