Commit Graph

45495 Commits

Author SHA1 Message Date
Marc Mutz
d124eeb00c Port qt_string_count() to QStringView
It was not using QStringView API, but immediately dropped to bare
metal operations (reinterpret_cast, ushort), subjecting itself to
ushort -> char16_t issues.

The new formulation avoids low-level primitives.

Change-Id: I8e75c7ea7409b133ff43bf5c829aa1f8f7503f11
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-05-07 15:28:26 +02:00
Marc Mutz
1eaf7fd544 QStyleSheetStyle: fix some premature pessimizations
- Use QStringView to substring before converting to L1
- cache result of toLatin1()

Pick-to: 5.15
Change-Id: I509f551913e77075e60903ebe65b880bd3f7e973
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-05-07 13:28:24 +00:00
Marc Mutz
c3ca27d02c QStyleSheetStyle: port a local QSet to QDuplicateTracker
Apart from a more fitting, minimal, API, QDuplicateTracker also
transparently uses C++17 pmr::monotonic_buffer_resource to avoid, or
at least reduce, memory allocations.

Change-Id: Ice3ebf1891141d2ac1ec9dd069fb40e98d4056c6
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-05-07 15:28:21 +02:00
Marc Mutz
a96900eea5 QString: remove weird uses of QChar::unicode()
Both *rc and fillChar have type QChar. So don't use QChar::unicode()
to assign them to each other, just use QChar::op=...

Change-Id: I050035ca16d613f3c57eb5a582978d23c2f04f36
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-05-07 15:28:17 +02:00
Marc Mutz
81c648590e QGraphicsAnchorLayout: rename AnchorData::{orientation -> isVertical}
That's basically what it is, and we don't want to extent the storage
from one to two bits when porting
QGraphicsAnchorLayoutPrivate::Orientation to Qt::Orientation later on.

Change-Id: I965164141e8d08dbf190e2cd71d9bb7a272b1fda
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2020-05-07 15:28:14 +02:00
Marc Mutz
9a66dff369 QLocale/Mac: make envVarLocale() thread-safe
The old code used a static QByteArray, but would write to it on every
invocation of the function. This makes the function non-re-entrant,
even though it's callable from non-GUI-threads (via
QSystemLocale::fallbackUiLocale()).

Fix by using an automatic QByteArray instead.

Change-Id: I93eea1dff1c72f3ea280283bb68b4ed47d2a8e1d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-05-07 15:28:12 +02:00
Jarek Kobus
a245945f29 Add more tests for QtConcurrent::filterReduced()
Test the case where reduce function of the form:
V function(T &result, const U &intermediate)
has T and U types different.

Task-number: QTBUG-83802
Change-Id: Ic89396caba16e7e47ae3ec1527e31b8620f1b08c
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-05-07 15:23:58 +02:00
Jarek Kobus
daea738b9f Cleanup the qtconcurrentfilter test
Get rid of code repetition in concurrentfilter test.
Move tests with initial value next to their original version.
Join new lambda tests into a common functions
testing all possible 16 combinations of
functor / function / member / lambda, as they
test in fact the same function. There is no need
to distinguish lambda case over other cases.
This helps in test readability and maintenance.
Add missing tests for lambdas with a combination
of initial value.

Task-number: QTBUG-83802
Change-Id: I45930c1e18a9e4e561909f46a5cbbdf0ad7ba333
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-05-07 15:23:46 +02:00
Giuseppe D'Angelo
e106dfdd6b Clean up some more mixed enum/int math
Add casts when necessary, and replace a bitwise trick with
the proper function call.

Pick-To: 5.15
Change-Id: I8b3109781af1e7fdc5d1c4c3fafe43394c81d71d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-05-07 13:23:36 +00:00
Allan Sandfeld Jensen
891b60bbc8 Fix QRunnable::ref use in QThreadPool
The reference counter could only ever be -1, 0 or 1,
as an autoDeleted QRunnable can only be in a single
thread pool.

This commits keeps the reference counting for now,
but asserts sanity, simplifies locking and fixes a
leak.

Pick-To: 5.15
Fixes: QTBUG-20251
Fixes: QTBUG-65486
Change-Id: I4de44e9a4e3710225971d1eab8f2e332513f75ad
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-05-07 13:00:30 +00:00
Volker Hilsheimer
9b4b406142 Handle disk full situations by skipping QFile::moveToTrash test
If any of the temporary directories and files can't be created, skip the
test. Otherwise, the cleanup routine would recursively delete "/".

Change-Id: I51f908a468be8fd2ebd523ff7ce27a7c78d1b4e2
Fixes: QTBUG-83863
Pick-to: 5.15
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-05-07 14:27:17 +02:00
Volker Hilsheimer
a033c23ddf QFile::moveToTrash: work with relative file paths on Windows
The system APIs expect an absolute "display name" of the file path,
so make it absolute.

The test was overly tolerant in accepting failure, as a QStorageInfo
initialized with a file path that doesn't exist is invalid, and thus
always different from the QStorageInfo of the home directory. Fix the
test to compare only valid QStorageInfo objects, and postpone the check
until the file we want to move has been created.

[ChangeLog][QtCore][QFile] moveToTrash supports relative file paths
on Windows

Change-Id: I94c8cd40c60fde469e38f76a98f867f20c6a0b15
Fixes: QTBUG-84015
Pick-to: 5.15
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-05-07 14:27:09 +02:00
Joerg Bornemann
ef0287d589 CMake: Fix icons in generated RC file
Change-Id: Idb11bd2058f2ec3f258845aea0d314430ff7c578
Reviewed-by: Simon Hausmann <hausmann@gmail.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-05-07 14:23:22 +02:00
Joerg Bornemann
864e1e10c4 CMake: Do not generate RC files for STATIC and OBJECT libraries
Those library types typically do not have Windows resources with
version information.

Change-Id: I1a385c2ae4e40d5c153ac6501c5ed826eaf75655
Reviewed-by: Simon Hausmann <hausmann@gmail.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-05-07 14:23:22 +02:00
Laszlo Agocs
0acab3c1ad rhi: Correct another scissor/viewport clamping problem
When x or y are >= the width or height of the render target, then the
width or height of the scissor/viewport rect is zero, no further logic
is needed.

This is different from the case of x or y being negative, because then
there is still a chance that there is an in-bounds area (if width or
height are large enough).

It is important to make this check based on the original value of x
and y, not the clamped ones. Otherwise we end up with a 1 pixel wide
region even when the expected result is a width or height of 0.

Previously the incorrect subtraction of 1 in the final clamping of w and h
masked this, but once that is fixed, the issue fixed here becomes visible
in the cubemap_scissor manual test.

Change-Id: I3d4b0a163a16aa1116b1e838fa95c0faf7b56a3d
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-05-07 08:56:28 +00:00
Eirik Aavitsland
f116221ab9 RHI: fix off-by-one clipping
In cases where qrhi_toTopLeftRenderTargetRect() would clip the width or height
to the available space, it would subtract 1 from the result, leading to
painting errors.

Fixes: QTBUG-83928
Change-Id: I65d23151d838386b516ded0588702bc0bf4c0d93
Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-05-07 08:56:24 +00:00
Kai Koehne
56c203fc09 Snippets: Fix dependency issues
The widget snippet was sometimes ignored, because the printsupport
dependency was not explicit in the top-level src.pro file. This lead
to a situation that, if printsupport by chance was already built,
it was tested, otherwise silently ignored.

This shows that having requires(qtHaveModule()) inside src/ is actually
harmful, and they are therefore removed from snippets.pro. Also, the
dependencies for the snippets projects are now moved to a central place
so that the correctness is easier to check.

Pick-to: 5.15
Change-Id: Ice051fa04848040e206c78361fbbcf680383c6b2
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-05-07 08:37:00 +02:00
Kai Koehne
5bfbae7d20 Snippets: Fix gcc warning about unused variable
Pick-to: 5.15
Change-Id: I4396556038a545beedf599be1a2c61cbde99903a
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-05-07 08:36:59 +02:00
Friedemann Kleint
c75151f5d9 Fix build of the widgets doc snippets
Rename main() of the graphicsview.cpp snippet to ensure it
is not considered a real main() function and prevent future
duplicate symbols.

Amends 2e1ef96cf8.

Pick-to: 5.15
Task-number: QTBUG-81497
Change-Id: Ibbb29e17f263ff02d3910852b195b1513b953f75
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2020-05-07 06:36:59 +00:00
Mårten Nordheim
654cd10755 Make QVector's default ctor constexpr
Because then other objects can be made constexpr

Change-Id: I083d4e664549cf48db1c8f89a873c48b9c558b60
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-05-06 11:28:27 +02:00
Giuseppe D'Angelo
8c889bf110 QModelIndex/QAIM: improve const correctness
QAIM::createIndex() takes a non-const void*. It's
typically called from inside QAIM::index(), which is a
const member function. If the data storage wrapped
by the model is const correct, it means that we have
to drop constness somewhere before calling createIndex().

To support this: change createIndex() to take a
const void * instead. This is painless.

Accessing the pointer is a bit more troubling, because
the accessor (QModelIndex::internalPointer()) returns
void *. (Effectively, now it does a const_cast...).
To avoid a massive source break, I've left it alone,
and instead added another function to retrieve a
const void *.

Read-only models can now be fully (deep) const correct.

[ChangeLog][QtCore][QAbstractItemModel] The
createIndex() function now takes a const void *, rather
than a void *.

[ChangeLog][QtCore][QModelIndex] Added the
constInternalPointer() function, to retrieve the
internal pointer as a pointer-to-const.

Change-Id: I108912b6814fcd5fe0c5cb7db6c721ba51e83de0
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-05-06 11:27:48 +02:00
Thiago Macieira
0de4f0dcc3 Fix build of rdrand & rdseed with ICC on Linux
qsimd.cpp(636): error: argument of type "qregisteruint={quint64={unsigned long long}} *" is incompatible with parameter of type "unsigned long *"

Pick-To: 5.15
Change-Id: I99ab0f318b1c43b89888fffd160c4785c98adc4d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-05-06 01:58:50 -07:00
Allan Sandfeld Jensen
45baf3b090 Template fetching of pixels for perspective transformed bilinear
We already templated the affine fetch logic to de-doublicate code, this
does the same with the perspective transform logic.

Change-Id: Ief58b8cc36af8abcdd5cbd1c4ca614567c1c99b9
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-05-06 10:49:42 +02:00
Friedemann Kleint
984767023e Fix build of the widgets doc snippets after opengl split
Add the Open GL modules.

Amends a426326e99.

Task-number: QTBUG-81497
Change-Id: I648c171a1a329bbc7710254b9e7498de221b318b
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-05-06 10:34:40 +02:00
Friedemann Kleint
2e1ef96cf8 Fix build of the widgets doc snippets on Windows
- Fix warning about missing return from main()
- Turn it into a library to prevent link errors from missing main()
  (used by winmain()).

Amends a426326e99.

Pick-to: 5.15
Task-number: QTBUG-81497
Change-Id: Idbcb5c26538ee474bc80387d0a1dae3af7b53744
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-05-06 10:34:32 +02:00
Lars Knoll
5f5f010885 Port baselineserver from QRegExp to QRegularExpression
Change-Id: I1e76345caa560c27ca75204e1b48a69ba2237ae4
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-05-06 09:58:42 +02:00
Lars Knoll
2a7c30e508 Remove some leftover includes of QRegExp
and include qrefularexpression.h in the pch for Qt Core.

Change-Id: Ibfa84c911dfcffd3e5a5cf11e48b186cff6e7d7a
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2020-05-06 09:58:24 +02:00
Lars Knoll
adf829e65d Add a QRegularExpression::fromWildcard() convenience method
Simplify constructing QRegularExpression objects from a glob
pattern.

Change-Id: I06f60b1dfea3da969e2474dedd44b6ca5d456d7d
Reviewed-by: Simon Hausmann <hausmann@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-05-06 09:57:40 +02:00
Lars Knoll
56a7984a90 Remove QRegExp from the bootstrap library
All it's uses have been replaces with QRegularExpression.

Change-Id: I5bcdfdd8a39dad6d1288f18f1b24d2eea9e028d2
Reviewed-by: Simon Hausmann <hausmann@gmail.com>
2020-05-06 09:57:31 +02:00
Volker Hilsheimer
660b38bb2c Remove a bunch of deprecated members from src/gui/painting classes
Also remove dead code that isn't compiled anymore in Qt 6 builds.

Change-Id: I7a7ae35e61fb2ad9cc21180fb7224357ade1505f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-05-06 09:54:17 +02:00
Volker Hilsheimer
d39fefc0eb QComboBox: Remove deprecated auto-completion properties
The replacement is to set, and configure, a QCompleter directly via
setCompleter. With the removal of the separate properties in QComboBox,
the configuration of the completer is not maintained if the line edit
is replaced. A QCompleter is created and set implicitly when the line
edit is set, unless the line edit came with a completer. This is what
the auto test verifies as well.

Change-Id: I9a4c73db5e39a2558aad346c0904be6deb4f1cd2
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-05-06 09:54:08 +02:00
Kai Koehne
55b470e411 CMake: Document versionless commands
Pick-to: 5.15
Change-Id: I249c10bf3338b08477ce04f7c2d5098390a6f9a0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-05-06 09:19:39 +02:00
Marc Mutz
0daf258e32 QGridLayoutEngine: remove now-unused enum
This enum has since been replaced by Qt::Orientation by way of QHVContainer.

Change-Id: I177409652c5de0c5f7b6117f94e26a05c3d609d4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-05-06 08:53:07 +02:00
Marc Mutz
1c417ef0cb QSettings: prepare for QChar::unicode() return type change
The return type will change from ushort to char16_t, and while for
the vast majority of the users, this will be a non-breaking change,
this code here would fail.

Fix by using an auto variable, as it should have been from the onset.

Change-Id: I8e3a0f3b38d83434665ee50aa8946b0edbcf133a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-05-06 08:52:55 +02:00
Marc Mutz
490859cdc9 QChar: fix missing warning for construction from char/uchar
Commit eea219732ed79fde65c1074832fb80fdf62d4c30 added the explicit
keyword to the QT_ASCII_CAST_WARN constructors of QChar, essentially
disabling the intended warning for the char/uchar case, because the
compiler would just pick another of the QChar ctors.

Fix by removing the explicit keyword again.

Change-Id: I65466426cfa471d44c3537fc47620ec8f0fcffcd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-05-05 23:59:35 +02:00
Volker Hilsheimer
a8fee0bf43 Don't move focus away from previous proxy in QWidget::setFocusProxy
This amends 23b998fa45, and the commits
3e7463411e and
947883141d. This change restores the
pre-5.13.1 behavior of setFocusProxy to not move focus away from a
previously set focus proxy.

With the previous changes, focus would move away from a proxy when a
new proxy is set, if the old proxy had focus. While there are arguments
in favor of this behavior, it is a change of behavior that shouldn't
be introduced to 20+ years old functionality in order to fix the real
bugs addressed by the initial commits.

Instead, move focus only to the new proxy when the focus widget was
the widget that gets a focus proxy.

[ChangeLog][QtWidgets][QWidget] setFocusProxy no longer moves focus
away from a previously set focus proxy, restoring pre-Qt 5.13.1
behavior.

Change-Id: Icf2ad7cba5b860014aeef91cb274c442a2ab9d42
Fixes: QTBUG-83720
Pick-to: 5.15
Reviewed-by: David Faure <david.faure@kdab.com>
2020-05-05 23:03:26 +02:00
Cristian Maureira-Fredes
2f975b39a9 uic/Python: import all the classes for QtCore and QtGui
We already had this approach for QtWidgets, so to avoid
adding the specific cases every time, we import all the
classes from QtCore and QtGui.

Change-Id: I38dd2eec3bbdfb83f156a48f35a2f4fda44528c7
Pick-to: 5.15
Fixes: PYSIDE-1287
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-05-05 22:04:51 +02:00
Friedemann Kleint
5290027e3b Emit QScreen::(availableG|g)eometryChanged() on logical DPI change
When a change in logical DPI occurs due to the user changing the scaling
factor, the screen size in device independent pixels may change
due to High DPI choosing a different scale factor.

Factor out the commonly used code into QScreenPrivate methods
and use them from
QGuiApplicationPrivate::processScreenLogicalDotsPerInchChange().

Pick-to: 5.15
Task-number: QTBUG-76902
Task-number: QTBUG-79248
Change-Id: I241a0f52d8236a65084d501fb4d8f9faeea89c0f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2020-05-05 22:01:36 +02:00
Thiago Macieira
0ef6b3d138 Remove use of std::not1 completely
libc++ that comes with XCode does not have the feature macros, resulting in
warnings printed. Just invert the condition in the functor itself.

lalr.cpp:316:84: warning: 'not1<Nullable>' is deprecated [-Wdeprecated-declarations]

Pick-To: 5.15
Change-Id: I99ab0f318b1c43b89888fffd160bf8d79bc4b47e
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2020-05-05 12:28:23 -07:00
Thiago Macieira
ee3ab7829d Fix Clang 10 warning about misleading indentation
qcombobox.cpp:3282:13: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]

Pick-To: 5.15
Change-Id: I99ab0f318b1c43b89888fffd160b5a7310c0a0d0
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2020-05-05 12:24:45 -07:00
Thiago Macieira
83223ca3ef Remove Perforce commands from setupSuite.sh
This file mustn't have changed at all, aside from the copyright headers,
since we switched to Git in October 2008.

Quick check shows the data from W3C is still online:
 https://dev.w3.org/cvsweb/2001/XML-Test-Suite/

I didn't check that the CVS server is actually running because none of
my machines even has the cvs command anymore...

Pick-To: 5.15
Change-Id: I4e559af2a9a1455ab770fffd15f4e740114a2433
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-05-05 12:24:38 -07:00
Thiago Macieira
c377bb385c tst_QProcess: create a more reliable crashing
Turns out that crashing on purpose is more difficult than it seems. It
should be easy, given how often we do it accidentally...

Let the null pointer dereferencing be the fall back. Some compilers are
too smart for their own good and remove the fault. Instead, let's rely
on raise(SIGABRT) on Unix and on the UD2 instruction on Windows.

Pick-To: 5.15
Change-Id: Ibdc95e9af7bd456a94ecfffd1603f1c9b73b167d
Reviewed-by: Simon Hausmann <hausmann@gmail.com>
2020-05-05 12:24:35 -07:00
Thiago Macieira
ff6d2cb0d5 Fix Clang 10 warning about LLONG_MAX being inexact in double
validator.cpp:707:19: error: implicit conversion from 'long long' to 'double' changes value from
 9223372036854775807 to 9223372036854775808 [-Werror,- Wimplicit-int-float-conversion]

Task-number: QTBUG-83666
Pick-To: 5.15
Change-Id: I99ab0f318b1c43b89888fffd160b4a95a258423b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
2020-05-05 12:24:12 -07:00
Thiago Macieira
64349c3fd5 Fix Mesa warning that MESA_EGL_NO_X11_HEADERS is deprecated
The warning isn't printed when EGL_NO_X11 (the new macro) is defined.

Fixes: QTBUG-80042
Pick-To: 5.15
Change-Id: I99ab0f318b1c43b89888fffd160b5d99f94c8c9b
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-05-05 12:23:49 -07:00
Thiago Macieira
d0c028e898 tst_QResourceEngine: fix the order of arguments to QCOMPARE
Expected and actual were inverted.

Pick-To: 5.15
Change-Id: Idc3fae4d0f614c389d27fffd15e9fa6a0a8f25e6
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-05-05 12:23:43 -07:00
Qt Forward Merge Bot
16e21c0a67 Merge "Merge remote-tracking branch 'origin/5.15' into dev" 2020-05-05 19:52:04 +02:00
Qt Forward Merge Bot
025e88bfe5 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I003c0d6271c6444748bf30b4331eca3fb2410f44
2020-05-05 19:51:50 +02:00
Volker Hilsheimer
c9df93bf27 Explicitly prevent out-of-bounds access to tabPositions array
Use DockCount enum value for the size of the array, and explicitly
handle when toDockPos returns DockCount (which it might).

Change-Id: Id52399607fb1ae74a24a050de7a8481264c03e47
Fixes: QTBUG-83983
Coverity-Id: 218539
Pick-to: 5.15
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2020-05-05 19:31:10 +02:00
Jan Arve Sæther
8d6d1d6fea Fix bug in QTextLayout::min/maxWidth for WrapAtWordBoundaryOrAnywhere
In that specific wrapping mode, it will first try a normal word wrap. If
it doesn't fit within the specified line width it will discard the
result of that and try WrapAnywhere by calling layout_helper()
recursively. The problem was that at the point it called itself again it
had already adjusted eng->maxWidth:

        eng->maxWidth += line.textWidth;

This was not restored, but carried on to the recursive call to
layout_helper(), so the end result was that the maximumWidth would
accumulate text widths from parts of the same line twice.

Due to the same recursive behavior the minimumWidth also had a problem:
It always returned the width of the widest word because it took the
qMax() of the minimum widths of the two passes, (WordWrap and then
WrapAnywhere) effectively making the minimum width always be the width
of the widest word (even though it could wrap at finer granularity).

Pick-to: 5.15
Task-number: QTBUG-77337
Change-Id: Ie7e9c17b157506352c2da38cc7f4a8dfa1283966
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2020-05-05 19:17:35 +02:00
Edward Welbourne
0534aeffe9 Remove spurous initializer for QByteArray
Change-Id: Ie0d1a068394283c724ab4f4aa0b5fc8ce06b1b08
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-05-05 19:02:07 +02:00