Go to file
Marc Mutz 088eef5756 QStringBuilder: fix appending QLatin1String to QByteArray
The old code did the equivalent of strcpy(), thus stopping
at the first NUL byte, ignoring the QLatin1String's size().

That is not acceptable, for two reasons:

1. Appending QLatin1String to a QString uses the size(), too.

2. The QConcatenable claims an ExactSize = true, so
   it cannot go and write less data than it's own
   size() said it would. Even worse, it will happily
   write _more_ data, too, if the QLatin1String is
   not properly zero-terminated.

This change has low risk, because the equivalent change
to the QString branch has been applied between 5.2 and
5.3 (in fd0f1bc3), with no complaints from the user base.

It is also in a branch that is very unlikely to be taken:
Since QConcatenable<QLatin1String> is setting ConvertTo
to QString, any QStringBuilder expression containing it
will only implicitly convert to QString, not QByteArray.
In fact, I don't even know how to make it invoke the
changed code in normal operation...

Change-Id: I486a76352af7f318ba05da845d3afee7d826c92a
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-26 14:08:07 +00:00
bin syncqt.pl: say "ERROR" when it's an error 2015-12-08 06:32:24 +00:00
config.tests Merge remote-tracking branch 'origin/5.5' into 5.6 2016-01-19 10:03:01 +01:00
dist Update the Qt 5.5.1 changelog for qtbase 2015-09-23 06:49:28 +00:00
doc Doc: Update Qt Account url 2015-12-21 13:33:00 +00:00
examples Doc: Added brief statement to XML examples 2016-01-26 09:39:33 +00:00
lib Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
mkspecs winrt: update version settings in default manifest 2016-01-26 13:03:48 +00:00
qmake Use QFileInfo::exists(f) instead of QFileInfo(f).exists() 2016-01-21 21:21:47 +00:00
src QStringBuilder: fix appending QLatin1String to QByteArray 2016-01-26 14:08:07 +00:00
tests Add DST-change test for a date derived via .toLocalTime(). 2016-01-26 13:50:09 +00:00
tools configureapp: Print FontConfig in "Third Party Libraries" section 2015-12-10 11:33:00 +00:00
util Move CasexTraits from qstring.cpp to qunicodetables_p.h 2015-11-16 14:34:04 +00:00
.gitattributes Update the git-archive export options 2012-09-07 15:39:31 +02:00
.gitignore rewrite qtAddToolEnv() 2016-01-08 09:36:13 +00:00
.qmake.conf Move the official Qt version from qglobal.h to .qmake.conf 2015-10-14 20:12:57 +00:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
configure Merge remote-tracking branch 'origin/5.5' into 5.6 2016-01-19 10:03:01 +01:00
configure.bat Move the official Qt version from qglobal.h to .qmake.conf 2015-10-14 20:12:57 +00:00
header.BSD Updated BSD licensed file headers 2015-02-15 07:41:17 +00:00
header.COMM Add header template for commercial only modules 2015-10-19 10:37:18 +00:00
header.FDL Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL3 Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL3-COMM Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL21 Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL-ONLY Update copyright headers 2015-02-11 06:49:51 +00:00
INSTALL Doc: Update links in INSTALL file 2015-02-16 09:06:41 +00:00
LGPL_EXCEPTION.txt Update copyright headers 2015-02-11 06:49:51 +00:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.GPLv3 fix up license references 2015-08-13 11:13:09 +00:00
LICENSE.LGPLv3 fix up license references 2015-08-13 11:13:09 +00:00
LICENSE.LGPLv21 Update copyright headers 2015-02-11 06:49:51 +00:00
LICENSE.PREVIEW.COMMERCIAL Update copyright headers 2015-02-11 06:49:51 +00:00
qtbase.pro Install fixqt4headers.pl script 2015-11-14 12:46:50 +00:00
sync.profile make a proper header-only module for QtZlib 2015-11-17 20:22:17 +00:00