summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
diff options
context:
space:
mode:
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));
}