summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qstring.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools/qstring.cpp')
-rw-r--r--src/corelib/tools/qstring.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index 75ef07a96e..eb8750838b 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -5461,8 +5461,10 @@ QString &QString::vsprintf(const char* cformat, va_list ap)
const char *c = cformat;
for (;;) {
// Copy non-escape chars to result
+ const char *cb = c;
while (*c != '\0' && *c != '%')
- result.append(QLatin1Char(*c++));
+ c++;
+ result.append(QString::fromUtf8(cb, (int)(c - cb)));
if (*c == '\0')
break;