Skip to content

Commit

Permalink
QLocale(Win): fix pessimizing use of QStringBuilder
Browse files Browse the repository at this point in the history
Instead of

   result += QString(string builder expression);

forcing a QString creation incl. memory allocation, do

   result += string builder expression;

using the overloaded QString += QStringBuilder operator.

Change-Id: I23023c76620fa6bb7bf9f2786c22f6a2ec0d87c2
Reviewed-by: Friedemann Kleint <[email protected]>
  • Loading branch information
marc-kdab committed Jan 31, 2017
1 parent 714100f commit d258d69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/corelib/tools/qlocale_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ QString QSystemLocalePrivate::winToQtFormat(const QString &sys_fmt)
if (text == QLatin1String("'"))
result += QLatin1String("''");
else
result += QString(QLatin1Char('\'') + text + QLatin1Char('\''));
result += QLatin1Char('\'') + text + QLatin1Char('\'');
continue;
}

Expand Down

0 comments on commit d258d69

Please sign in to comment.