summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
diff options
context:
space:
mode:
authorSami Merila <sami.merila@nokia.com>2010-03-05 09:08:37 (GMT)
committerSami Merila <sami.merila@nokia.com>2010-03-05 09:08:37 (GMT)
commit5dba125fb953718d8282ff317a6ff34b612bcf45 (patch)
treeebdf2ada09d08e9ec6ae5c36f38a81911ec96a89 /src/corelib/tools
parent68eea46d309ff82e45c243a7689013f36454c85b (diff)
parent92c42901344ae654d8bc102e566d47d735cb3954 (diff)
downloadQt-5dba125fb953718d8282ff317a6ff34b612bcf45.zip
Qt-5dba125fb953718d8282ff317a6ff34b612bcf45.tar.gz
Qt-5dba125fb953718d8282ff317a6ff34b612bcf45.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-s60-public into 4.6
Diffstat (limited to 'src/corelib/tools')
-rw-r--r--src/corelib/tools/qregexp.cpp4
-rw-r--r--src/corelib/tools/qstring.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/tools/qregexp.cpp b/src/corelib/tools/qregexp.cpp
index 25255f9..b9e273f 100644
--- a/src/corelib/tools/qregexp.cpp
+++ b/src/corelib/tools/qregexp.cpp
@@ -523,7 +523,7 @@ int qFindString(const QChar *haystack, int haystackLen, int from,
\endtable
In the mode Wildcard, the wildcard characters cannot be
- escaped. In the mode WildcardUnix, the character '\' escapes the
+ escaped. In the mode WildcardUnix, the character '\\' escapes the
wildcard.
For example if we are in wildcard mode and have strings which
@@ -3774,7 +3774,7 @@ static void invalidateEngine(QRegExpPrivate *priv)
\value WildcardUnix This is similar to Wildcard but with the
behavior of a Unix shell. The wildcard characters can be escaped
- with the character "\".
+ with the character "\\".
\value FixedString The pattern is a fixed string. This is
equivalent to using the RegExp pattern on a string in
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index 3ef0e66..03bc053 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -3185,7 +3185,7 @@ QString QString::section(const QRegExp &reg, int start, int end, SectionFlags fl
if (!empty || !(flags & SectionSkipEmpty))
x++;
}
- if((flags & SectionIncludeLeadingSep)) {
+ if((flags & SectionIncludeLeadingSep) && first_i < sections.size()) {
const qt_section_chunk &section = sections.at(first_i);
ret.prepend(section.string.left(section.length));
}