Commit Graph

37696 Commits

Author SHA1 Message Date
Christian Ehrlicher
2672a9a767 QWidget: set brushOrigin in paintBackground() only when really needed
When painting the background for a QAbstractScrollArea, the brushOrigin
was calculated for every brush type although it was not needed. Since
this can be very time consuming (e.g for a QTreeView with non-uniform
row sizes) it should be avoided when possible.
Therefore check if the brush is a texture and skip the calculation if
it is not the case. Also do not restore the old brushOrigin since the
painter is not used at all afterwards.

Task-number: QTBUG-61763
Change-Id: I66cbe1b796cb5cad4c78e656fb86d199d8e4bde9
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-10-13 10:51:26 +00:00
Qt Forward Merge Bot
fedcaf0256 Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: I2715ee7c694e5579bcedc7bab0ae68e79d5fd0b6
2018-10-13 00:07:20 +02:00
Oswald Buddenhagen
473d9a5fc7 qmake: fix the precedence of QMAKE_LIBDIR_POST
it must end up in front of QMAKE_LIBS{,_PRIVATE}, but not of
LIBS{,_PRIVATE} (which are preceded by QMAKE_LIBDIR).

Task-number: QTBUG-61982
Started-by: Liang Qi <liang.qi@qt.io>
Change-Id: Id3de01ee0e9b66af02f79949aeb5a0eabd55363f
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-10-12 18:06:49 +00:00
Oswald Buddenhagen
342b13944c qmake: document {,QMAKE_}LIBS_PRIVATE
Change-Id: I6637d5f57d372f63b3cfaeb28c7e48c940887db6
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-10-12 18:06:43 +00:00
BogDan Vatra
56f949ad3c Android: fix compile with NDK r18+
In NDK r18, libc++.so was renamed to libc++.so.XX where XX is the Android
API level.

[ChangeLog][Android] Fixed build issue with NDK r18+.

Task-number: QTBUG-70631
Change-Id: Id0d2955648197e3054e3c69263b5a90d57964f6c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2018-10-12 18:06:38 +00:00
Oswald Buddenhagen
405c73e495 qmake: make sure QMAKE_LIBS{,_PRIVATE} comes after LIBS{,_PRIVATE}
the early merging of LIBS* into QMAKE_LIBS* meant that we could not
interleave them properly. defer the merging until the points of use.

Task-number: QTBUG-70779
Started-by: BogDan Vatra <bogdan@kdab.com>
Change-Id: I890f98016c3721396a1f0f6f149a9e2b37d56d8e
Reviewed-by: Liang Qi <liang.qi@qt.io>
2018-10-12 18:06:33 +00:00
Oswald Buddenhagen
2a3695b7e0 qmake: nuke QMAKE_INTERNAL_PRL_LIBS
it's unused now, and just complicates matters. its interaction with
LIBS_PRIVATE & co. has always been a bit shaky. google produces no
public hits outside qt itself, so let's assume it really remained
internal.

Change-Id: I6606bbabd44f1b76d84e97219e155e38d6f1b3a6
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-10-12 18:06:21 +00:00
Oswald Buddenhagen
d30de09000 qmake: remove support for static archive splitting
this was introduced in 2002 supposedly for qnx4, but doesn't appear to
have actually been used ever. remove it, as it's in the way now.

Change-Id: I54dcabb61e1d3609a1e7a9fa4ff4b25509cfdb7a
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-10-12 18:06:15 +00:00
Andre de la Rocha
4d51e099b3 WinRT QPA: Fix crash in QWinRTBackingStore::flush()
QWinRTBackingStore::flush() was not considering the possibility
that the supplied region may fall partially outside the bounds
of the paint device. This resulted in possible accesses to invalid
memory addresses, causing a crash. This bug was exposed by an update
in ANGLE that was causing a crash when running tst_QTableView::bigMode
with a small screen size. With this fix the function will use the
intersection of the supplied region with the paint device bounds.

Change-Id: I2f0f0f7f5510688bfa1459320a0c146df6be65d1
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
2018-10-12 14:42:03 +00:00
Laszlo Agocs
9098ef697a windows: Disable shader disk cache for all Intel GPUs
Follow up to dff9bb2f9b

Task-number: QTBUG-64697
Change-Id: I73a114dd3c75f3ed1272fa73dad378ecfdc0db09
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-10-12 14:09:38 +00:00
Martin Storsjö
d92c25b1b4 qmake: Fix building with lld with mingw makefiles
lld for coff/mingw doesn't support linker scripts, which qmake used
for passing larger numbers of input file names to the linker.

Instead of using a fullblown linker script for this, just use a plain
response file, which both lld and binutils ld support.

Change-Id: I3aace7902fa6ca861a0a9fe67feaa236e7ea417b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-10-12 14:01:59 +00:00
Edward Welbourne
641eb4a965 Remove GPU_BLACKLIST support from QTest
This reverts 4fe68ffbe5,
1dfc16f6da and
9545bee98a2431d4ef4c3449631a5fcb8d9bd57a; this feature has not been in
use for some time, so is just dead code.

[ChangeLog][QtTestLib] Removed support for GPU_BLACKLIST files.
Reimplementations or equivalents of QTEST_MAIN() should remove their
uses of QTEST_ADD_GPU_BLACKLIST_SUPPORT and its _DEFS; they are still
vacuously defined, but serve no remaining purpose and shall be
undefined in due course.

Change-Id: I94ffd5c37ce4e1f7cf25d3c7ae8d40696b74c911
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-10-12 13:59:41 +00:00
Allan Sandfeld Jensen
8d2deea49c Report compiler and version in configure overview
It is not always easy to spot the compiler version in the build or
configure log, so report it explicitly to make our lives easier when
trying to figure out why a specific build might have failed.

Change-Id: I1c84199aad4a98a30b0b4c4fbf2554008dc3ba2d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-10-12 13:24:19 +00:00
Gatis Paeglis
8315acfb16 Revert "glib dispatcher: ensure all window system events are flushed"
This reverts commit 341bfcd1ea.

As it turns out there might be use cases where we want to have proper
windowing system event integration with glib dispatcher via g_source_attach().
For example with gtk_dialog_run, where GTK blocks in a recursive main loop.
We want to continue dispatcing our windowing system events during this nested
event loop. Not having a proper glib integration can result in rendering issues,
e.g. when resizing parent window via mouse while GTK-based dialog is shown. Can
be seen on examples/widgets/richtext/textedit/ -> Format (from menu) -> "Color..."

The issue from 341bfcd1ea actually should be fixed inside XCB platform plugin,
by improving integration with event dispatcher. That is handled in follow-up patches.

Change-Id: Icabc6d841a554aefbdd460765a3165d22e65f651
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-10-12 10:21:32 +00:00
Gatis Paeglis
466d65cd5b xcb: remove runtime check for xcb_poll_for_queued_event
xcb_poll_for_queued_event() was introduced in libxcb 1.8.
The minimal required libxcb version was bumped up to 1.9 in
1f5d791708. Before this version
bump we needed the runtime check to support older versions
of libxcb.

Updated connections in the event reader to use the new signal
and slot syntax. Removed threadedEventHandling() method because
now it is always 'true'.

Change-Id: I0bce61fd478a871d35e676239ee5280c4f40be8a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-10-12 10:21:22 +00:00
Albert Astals Cid
b6427ded65 Printing: Expose default and supported color modes
We had this information internally but there was no public API for it

Fixes: QTBUG-4071
Change-Id: Ic7f855e32a6870129e7723a47d31a629e0ea1aca
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-10-12 09:19:16 +00:00
Allan Sandfeld Jensen
e8fd992849 Add support font-kerning CSS3 property
Change-Id: Ie3894481ded40d20091bd0103ac426c1086f943f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-10-12 07:16:30 +00:00
Peter Hartmann
cdbebe6280 Qt namespace: Remove comment about stylesheet propagation
This is an opt-in feature to control whether font and palette should
be propagated, and there is no reason this should be removed in Qt 6.

This has been introduced in commit
7293200ace .

Change-Id: I666c09d716bf7033953e98108da3f7711f3bc321
Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com>
Reviewed-by: Martin Koller <kollix@aon.at>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-10-12 06:49:53 +00:00
Oswald Buddenhagen
9f89e07d75 Bump version
Change-Id: Icf0c81067f65b922a8473f9dce4aecefadf5b32d
2018-10-11 12:59:42 +02:00
Anton Kudryavtsev
02f7caaa7d QPixmap: use rvalue more
Change-Id: Ifb8c014abf6e02dc782fab2d653e4edfc4972125
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-10-10 12:20:32 +00:00
Eskil Abrahamsen Blomfeldt
d7944c2921 Remove QEXPECT_FAIL from test on macOS
The flakiness was reported for macOS 10.8 a long time ago and I
am not able to reproduce it, so lets remove the workaround for
it.

Task-number: QTBUG-32690
Change-Id: I92e64065c7480b8f4c5d1d1e6cb5fdd218a70313
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-10-10 08:24:01 +00:00
Allan Sandfeld Jensen
f864a62ccd Add missing null checks after detach
A few places we didn't check if detach() succeeded including
in reinterpretAsFormat(), where it can be undone.

Task-number: QTBUG-70785
Change-Id: Ibcc8e26e2961f6288eb7a045ae1cb28e59213a49
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-10-10 08:23:31 +00:00
Martin Storsjö
9436e3c315 configure: Treat win32-clang-g++ the same as win32-g++
This fixes configure with win32-clang-g++ as the native compiler.

Change-Id: Iced43d70b9a0aa413d1f5f6034b42b976cb7c39e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-10-10 04:10:40 +00:00
Alexander Volkov
1a9ebfabcd QWidgetTextControl: Get rid of dependency on QTextEditPrivate
QWidgetTextControl is a base class for controls of text widgets
and widget-specific code should be used in derived classes, so
override loadResource() in QTextEditControl.

Change-Id: I6d829ead0837419530094d19e0ca53a964413e92
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-10-09 22:03:54 +00:00
Alexander Volkov
941101bd5f Fix drawing of QGroupBox's title when check box is higher than text
Task-number: QTBUG-70623
Change-Id: I36c3b3e0250a4d2b0a2a2f03793f0eae3d868de2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-10-09 22:03:41 +00:00
Alexander Volkov
d66253665a QSideBar: take the icon size from a style
Change-Id: I9c4677b42cc920b7bb016b61b8c1fd34fe67aa30
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-10-09 22:03:32 +00:00
Lorn Potter
49f1f944bc wasm: rewrite QNetworkReplyWasmImpl to remove EM_ASM
and fix handling of incoming binary data

Change-Id: I31e97505ad4ff64cf8e380df5d0d6b70c3cd60b0
Reviewed-by: Ryan Chu <ryan.chu@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-10-09 20:44:24 +00:00
Edward Welbourne
41418a92b7 Remove spurious Q_FALLTHROUGH()
Two cases with no code between them don't need a fall-through marker.
The only code in the first case is subject to #if-ery; it either
returns, without falling through, or has no code there.  Putting in an
overt Q_FALLTHROUGH() confused a rather dumb compiler ...

Change-Id: Icc034be08859cc1656401af1c62367aec302668b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-10-09 16:12:37 +00:00
Allan Sandfeld Jensen
b7c5c2e65b Add NEON optimized ARGB32 unpremultiply routines
Mirroring similar routines recently added for SSE4.1

Change-Id: Ibb9d10cc34655ce1dc0e97fdff4e4f6a81d47d05
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-10-09 13:17:47 +00:00
Allan Sandfeld Jensen
25830cf912 Fix builds without DTLS
Change-Id: Ic7215c7aa0bf6f7b37ae34649d809f2e1e1ee95b
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-10-09 13:14:42 +00:00
Martin Smith
eeb6ceb192 Revert "qdoc: Add default include dirs to qdoc command line"
This reverts commit 4bdd8d4eca.

It contains an error.

Change-Id: I51052029f001b9e82c2a53de15b4ba354aafdbae
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-10-09 10:12:48 +00:00
Eskil Abrahamsen Blomfeldt
4f2e0117f9 Deprecate QFont::lastResortFamily() and QFont::lastResortFont()
These functions have not been used by the font selection algorithm
in Qt 5. Calling lastResortFamily() always gave you "helvetica"
and lastResortFont() would actually crash.

Since we cannot remove them before Qt 6, we deprecate them for now
and update the documentation to give a more accurate description
of how the font matching works in Qt 5.

Note that in the non-native QFontDialog, it tries to implement its
own font matching algorithm and therefore was calling
lastResortFamily(). Since fixing QFontDialog is not within the
scope of this patch, I have just replaced the call by "helvetica"
directly, so that it will continue to behave the same.

[ChangeLog][QtGui][Text] Deprecated QFont::lastResortFamily()
and QFont::lastResortFont() which are not in use in Qt 5 and
did not provide any useful information.

Task-number: QTBUG-60813
Change-Id: Id8fe7bfdd427292ef86bc8405de03cb466b9b62a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-10-09 06:55:42 +00:00
Eskil Abrahamsen Blomfeldt
5c94130a67 doc: Document version of bundled Freetype in qt_attribution
Task-number: QTBUG-70901
Change-Id: Ibc330320cf3851e9aed13a66a3552bd8b2ad34da
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-10-09 06:26:52 +00:00
Lorn Potter
b2fd16b478 wasm: fix parse error
Task-number: QTBUG-70952
Change-Id: I8a39de1d16b5301d221be4e9e47cabd4827b71aa
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-10-08 23:46:41 +00:00
Qt Forward Merge Bot
69b6845edb Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: I5cbfd39cf728036bbdfdeec8e8739568e0a3025b
2018-10-09 01:00:48 +02:00
Michal Lazo
e2ab24d36f Move cursor selection to start when there isn't any previous line in selection mode
Adding standard behavior for text selection, when user want to select text
and there isn't any previous line then selection will end on start

[ChangeLog][QtWidgets][QWidgetTextControlPrivate] Move cursor selection to start

Task-number: QTBUG-69735
Change-Id: If222d37747772f60774f671ffdd273d63cdaf571
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-10-08 18:06:25 +00:00
Marc Mutz
8e5a2f63c3 Fix UB (invalid pointer comparison) in QList, QVector, QVLA
QList, QVector and QVarLengthArray check the validity of iterators
passed to member functions using isValidIterator(), which checks that
the underlying pointers are in the range [begin, end]. This check is
well-defined when the outcome is positive, ie. when the iterator is
valid. But if the iterator is not valid, and does not happen to point
into [end, begin + capacity], the comparison, which uses normal
operator<, invokes UB.

Fix by using std::less<T*>, which defines a total ordering.

Change-Id: I1e5757789b4b9779f5e3e298e7f2b2dd0b27576c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-10-08 16:18:53 +00:00
Edward Welbourne
55d640483c Update 3rdparty valgrind headers to Valgrind 3.13.0
The version we're using is at least seven years old.
Let's try staying up to date ...

Change-Id: I450a2fc37c22740fe554a81b471bf0fad340498e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-10-08 14:18:54 +00:00
Edward Welbourne
bc099f33dd Support QCborMap::operator[] taking a string literal
Use a template on the size of the char[], as suggested by Ville
Voutilainen.  This resolves ambiguity about whether such look-ups
should be done via QString or QCborValue (not that it would have made
any difference).

When we come to add mutating indexing of QCborValue, chained
dereferences like map[i][j][k] need to stay in operator[] const
throughout, to avoid detaching intermediates to create references into
them due to using the mutating operator[] on the earlier dereference's
return.  So const-qualify the QCborValue operator[] const variants at
the same time, to match those of QCborValue itself.

Change-Id: Ib1652ae9440fe3767a653afa2856b74040210e07
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-10-08 14:11:23 +00:00
Edward Welbourne
ff7f09d187 Change QCborArray to pad with invalid on inserting past end
Likewise have mutating operator[] insert an invalid entry at its
target index, if beyond the end of the array. This makes it possible
to fill an array from high index to low, for example.

Change-Id: If71699c20e2623142214ce2c11c4d6e4a120c989
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-10-08 14:11:08 +00:00
Samuel Gaist
5a52890a85 QString: documentation fixes
Change-Id: I01cb7502514224cfb340bf8b8982340c29027689
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-10-08 13:53:55 +00:00
Samuel Gaist
5271b36672 Implement QRegularExpression overload for QPlainTextEdit::find
This patch adds the missing overload for QRegularExpression to match the
QRegExp one for QPlainTextEdit.

[ChangeLog][QtWidgets][QPlainTextEdit] Added QRegularExpression find()
method overload.

Change-Id: Id156971d3fa0372712bfa8b72a55550942a767e0
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: David Faure <david.faure@kdab.com>
2018-10-08 13:53:42 +00:00
Samuel Gaist
d348363673 Implement QRegularExpression overload for QTextEdit::find
This patch adds the missing overload for QRegularExpression to match the
QRegExp one for QTextEdit.

[ChangeLog][QtWidgets][QTextEdit] Added QRegularExpression find() method
overload.

Change-Id: Ic7be224dcc59fc8d832daddd1999a713b7f04253
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: David Faure <david.faure@kdab.com>
2018-10-08 13:53:39 +00:00
Jesus Fernandez
0c82994623 Use the stack for storing objects
Theoretically, it could improve the speed. Some of the modified lines
also make the style homogeneous.

Change-Id: Iaed7b16fa75e485be0f825220c366903525448ce
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-10-08 13:26:41 +00:00
Christian Strømme
7f079bf9d0 Android: Update the targetSdkVersion in the manifest to 28
Change-Id: I9fe8117ed75f82638b6a03166434bf83e23f166f
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-10-08 11:14:03 +00:00
Christian Strømme
52813712c4 Default to no style extraction on Android P when the target SDK is < 28
Applications with target SDK version lower then 28 running on a device
with version greater or equal to 28 will cause compatibility warnings,
so default to none when the extract_android_style value is set to
default.

Note that the new value "default" was introduced to allow this kind
of changes in the future, i.e., selecting the best solution based on
some simple heuristics. Adding a new value also keep compatibility and
allows the user to explicitly set a value when needed.

Task-number: QTBUG-69810
Change-Id: I68301716767870ce6de40e45742d9c5fc263ee25
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-10-08 11:14:01 +00:00
Liang Qi
1170e707b7 Merge "Merge remote-tracking branch 'origin/5.11' into 5.12" into refs/staging/5.12 2018-10-08 11:10:14 +00:00
Liang Qi
7344987c20 Merge remote-tracking branch 'origin/5.12' into dev
Conflicts:
	src/widgets/styles/qstylesheetstyle.cpp

Change-Id: I3a503b44ae413fbc0a90f4af70b8f84daffd86ad
2018-10-08 10:56:25 +02:00
Qt Forward Merge Bot
b4da5c6b93 Merge remote-tracking branch 'origin/5.11' into 5.12
Conflicts:
	src/corelib/tools/qtimezoneprivate.cpp

Change-Id: Icbb5999d378711ce3786a4fe0aba176a45ac702c
2018-10-08 10:00:49 +02:00
Oliver Wolff
29208fa07c winrt: Explicitly set main thread in QCoreApplication's constructor
For winrt we cannot rely on the fact, that QThread::current will be called
from the correct thread for the first time. The application's main entry
point creates a suspended thread and starts it right afterwards. At that
moment, other functionality (QLoggingRegistry for example) might have
called QThread::current, which set the wrong thread as the main thread. In
order to avoid this situation, the main thread is explicitly set in
QCoreApplication's constructor.

Task-number: QTBUG-66418
Change-Id: I8b6347357a80eb395ae758bd3d420adef0826751
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-10-08 05:34:28 +00:00