Go to file
Eskil Abrahamsen Blomfeldt 7eae50a52d Fix assert on justification of QTextLine with only spaces
In the justification code, we unconditionally subtracted one
from the line_length, but then compared the result to 0 afterwards,
so we did not support when the line_length is 0 initially, which
can happen if it only consists of spaces (in which case
trailingSpaces will be non-zero and line_length will be zero.)
The fix is to bail out for both strings of length 1 and length 0.

[ChangeLog][Text] Fixed an assert when justifying a QTextLine
which only contains spaces.

Task-number: QTBUG-38520
Change-Id: Ib04993f47eb2f9f7fc49c4a5400f18f9682a72f2
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-04-30 18:23:33 +02:00
bin automate handling of generated headers some more 2014-02-28 03:17:11 +01:00
config.tests Use category names when logging to the journal 2014-04-05 13:27:05 +02:00
dist Update the changelog for 5.3.0 2014-04-24 10:48:09 +02:00
doc Doc: Adding Enginio's export macro to the list of excluded QDoc tokens. 2014-04-16 07:28:39 +02:00
examples purge vestiges of opengl es 1 support 2014-04-04 19:32:21 +02:00
lib Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
mkspecs mkspec (iOS): use QTPLUGIN.platforms=- 2014-04-30 18:23:00 +02:00
qmake Fix vcxproj generation on Windows Phone 2014-04-25 06:44:18 +02:00
src Fix assert on justification of QTextLine with only spaces 2014-04-30 18:23:33 +02:00
tests Fix assert on justification of QTextLine with only spaces 2014-04-30 18:23:33 +02:00
tools Revert "Automatically link printsupport plugins to static applications." 2014-04-18 07:44:57 +02:00
util Introduce QChar::JoiningType enum and QChar::joiningType() method 2014-01-29 23:19:47 +01:00
.gitattributes Update the git-archive export options 2012-09-07 15:39:31 +02:00
.gitignore Add .dylib and .d to .gitignore 2014-03-29 00:40:46 +01:00
.qmake.conf Enable -Werror for all of qtbase 2013-09-04 01:50:10 +02:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
configure Build Qt tools for iOS 2014-04-23 06:31:08 +02:00
configure.bat get rid of syncqt wrapper scripts 2013-05-13 21:54:48 +02:00
header.BSD Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.FDL Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.LGPL Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.LGPL-ONLY Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
INSTALL Doc: Update links in INSTALL file 2014-01-16 20:37:25 +01:00
LGPL_EXCEPTION.txt Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.GPL Add the LICENSE.GPL file to the module referenced from license headers 2012-05-20 22:41:08 +02:00
LICENSE.LGPL Update copyright year in LICENSE.LGPL 2014-03-31 12:36:33 +02:00
LICENSE.PREVIEW.COMMERCIAL Update LICENSE.PREVIEW.COMMERCIAL license 2013-06-03 20:04:26 +02:00
qtbase.pro move generation of qconfig.h forwarding headers to qtbase.pro 2014-02-28 03:17:11 +01:00
sync.profile automate handling of generated headers some more 2014-02-28 03:17:11 +01:00