qt6-bb10/src
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
..
3rdparty Fix font fallback handling with Harfbuzz and CoreText 2014-04-28 19:49:56 +02:00
android Android: Don't accept the volume-key events. 2014-04-03 00:28:22 +02:00
angle centralize auxiliary lib creation 2014-04-28 19:49:44 +02:00
concurrent Doc: Add docs for QtConcurrent::{Unhandled,Exception} 2014-03-17 20:52:42 +01:00
corelib Logging: Mention 'best practices' for using QLoggingCategory 2014-04-29 16:26:25 +02:00
dbus Fix some documentation errors. 2014-03-24 16:42:02 +01:00
gui Fix assert on justification of QTextLine with only spaces 2014-04-30 18:23:33 +02:00
network QAbstractSocket: enable read notification for unbuffered sockets 2014-04-25 06:34:04 +02:00
opengl Rename new QOpenGLContext APIs 2014-04-25 10:07:45 +02:00
openglextensions purge vestiges of opengl es 1 support 2014-04-04 19:32:21 +02:00
platformsupport Avoid reentering processMouseEvents on embedded 2014-04-28 19:49:26 +02:00
plugins printsupport: only build cocoa backend for OS X 2014-04-30 18:23:12 +02:00
printsupport QPrintEngine - Fix alpha engine state sync 2014-04-25 06:43:42 +02:00
sql [QtSql][QSqlTableModel] fix failure to refresh in selectRow() 2014-04-27 20:39:11 +02:00
testlib Fix identical sub-expressions in comparison 2014-04-26 09:10:03 +02:00
tools Update copyright year in tools output 2014-03-31 12:46:44 +02:00
widgets Restore Qt 4 behavior in default double click handler 2014-04-17 10:59:13 +02:00
winmain WinRT winmain: Pass ImagePath as part of ImageParams in Xap packages 2014-04-01 12:28:10 +02:00
xml Doc: Fix typos 2014-03-27 15:36:58 +01:00
src.pro purge vestiges of opengl es 1 support 2014-04-04 19:32:21 +02:00