Commit Graph

33926 Commits

Author SHA1 Message Date
Eskil Abrahamsen Blomfeldt
078c3b7d68 Remove deprecated text-related enums
Fixes: QTBUG-82367
Change-Id: Iff2645759657f8e350754e90e791dbd583017671
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-06-08 15:04:19 +02:00
Morten Johan Sørvig
974f239338 Check for valid Navigator.permissions before use
Safari on iOS now supports the Navigator.clipboard
API, but not the Navigator.permissions API.

Looks like we have not encountered this combination
Before. Add undefined check for permissions as well.

Fixes: QTBUG-84658
Pick-to: 5.15
Change-Id: I99ab08fd34bbb29a82661e24bf400c927f3604f6
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2020-06-08 14:06:56 +02:00
Volker Hilsheimer
ac419a66fd Fix deprecation warning, use char16_t instead of quint16/ushort
Change-Id: I4021abb901260c3e27cefd81b3acd5ac198941c8
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2020-06-08 14:01:41 +02:00
Martin Jansa
a85c7342ad Make the QFontCache size configurable
It can be configured using the QFONTCACHE_MIN_COST
define when configuring Qt.

Change-Id: I41fb781099c4c0f03c378f10c8db4ea06ef4e9ff
Task-number: QTBUG-83127
Reviewed-by: Risto Avila <risto.avila@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2020-06-08 13:23:21 +02:00
Lars Knoll
38096a3d70 Implement first/last/from and slice() for string-like classes
These methods are scheduled as a replacement for left/right/mid()
in Qt 6 with a consistent, narrow contract that does not allow
out of bounds indices, and therefore does permit faster
implementations.

Change-Id: Iabf22e8d4f3fef3c5e69a17f103e6cddebe420b1
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-06-08 13:17:32 +02:00
Marc Mutz
6ec41bd550 QSsl: port a local QStringList 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.

The code is the first user of the collected data, so make that
available by adding QDuplicateTracker::appendTo(Container&) methods.

Change-Id: Ibd8810c0070db7e6b3ead6d6a569facdab88b646
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-06-08 10:53:20 +00:00
Fabian Kosmale
3f5b5e4859 Use static function instead of lambda to workaround a MSVC compiler bug
The seemingly useless template parameters are needed to avoid a
(distinct) bug in MSVC 2019 < 16.6, and should be removed once we have a
newer version in the CI.

Task-number: QTBUG-82945
Fixes: QTBUG-83600
Change-Id: I5b22a2259aa16ae90eca7d4f3bd2e4fa1116a73b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-06-08 12:49:01 +02:00
JeongBong Seo
ea86f19319 Add the 'accessiblebridge' as a plugintype of gui module
This patch makes the 'accesiblebridge' plugin configurable.

Change-Id: I99f01fcd434be25bbbe5460bbc8cc1d76aa744b9
Task-number: QTBUG-83126
Pick-to: 5.15
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2020-06-08 09:34:02 +02:00
Tasuku Suzuki
69795835f3 Fix build without features.menubar
Change-Id: If7ad6f4c50936d2abf8b88859cb3a8a6189df152
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-06-08 10:30:44 +09:00
Marc Mutz
bd465695c3 QWindowsFontDatabase: replace a QPair with a dedicated struct
Pairs are easy to use, but they have no semantics attached: Two
QPair<QString, QString> compare equal, e.g., even though one is used
as a FontAndStyle and the other as, say, a type/subtype. It also
carries no information for the reader of the code.

So, write a minimal struct with equality and qHash() instead.

Change-Id: I9514c9b7d6c2cc6a4831f9ca83ca2ee466d91553
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-06-07 22:43:37 +02:00
Christian Ehrlicher
e0fc998e87 ItemModels: remove deprecated functions
Change-Id: Id3430493a62b11977f64e146f7668ca30935b959
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-06-07 19:02:47 +02:00
Samuel Gaist
50ccd35fbd Doc: add missing PatternSyntax documentation to QSslCertificate
This patch adds the missing documentation for the new QSslCertificate
PatternSyntax enum which replaces the one from QRegExp.

Fixes: QTBUG-84464
Pick-to: 5.15
Change-Id: Icf092f42ad4dff9207ca51dfd8b4fb8ed6443ff2
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-06-07 16:23:41 +02:00
Christian Ehrlicher
32b586864e QAbstractItemModel: remove deprecated setRoleNames()
Remove setRoleNames() and all its now unneeded helper functions.

Change-Id: I0a83751aace35700655d4cc7c79278325994cbdd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-06-07 10:01:48 +02:00
Oliver Wolff
45b0f1be68 Remove winrt
Macros and the await helper function from qfunctions_winrt(_p).h are
needed in other Qt modules which use UWP APIs on desktop windows.

Task-number: QTBUG-84434
Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-06-06 20:25:49 +02:00
Lars Knoll
aa81b90738 Remove unused argument from method
Task-number: QTBUG-84635
Change-Id: I9a1789e0481977e9fa26a915ff3bc776d0a37e75
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2020-06-06 17:19:02 +02:00
Lars Knoll
3615a5813a Remove unused function pointers in QVariant::Handler
Task-number: QTBUG-84635
Change-Id: Icfbd1aae26b0453426d93e0af64d84d6403b8e3b
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2020-06-06 17:19:02 +02:00
Marc Mutz
ccbf6ae0bb QDir: port from QStringRef/split() to QStringView/tokenize()
Port away from random-access of the returned sequences. That's
neither necessary nor does it make the code more readable than
the alternative single-pass implementation used here.

As a drive-by, make applying NRVO more likely by re-using the
`result` variable for all returns after its declaration.

Change-Id: I2c3bbaefa6b6f08ebf0b90fb7be62e3c6243f19d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-06-06 13:43:04 +02:00
Giuseppe D'Angelo
1f80d1a5eb QVariant: use std::addressof instead of operator&
Change-Id: If7172e9e0e213d99f0c54b387dde8f9e163109d0
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2020-06-06 13:30:34 +02:00
Giuseppe D'Angelo
725c37ffe0 QVariant: move and swap in the move assignment operator
And not pure swap. As per policy, QVariant must leave the rhs empty.

Change-Id: I2d5e0f584c4d4fffd05a0a5bfae27ddcb72430e9
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2020-06-06 13:29:49 +02:00
Marc Mutz
ee63557112 QString/View: add tokenize() member functions
[ChangeLog][QtCore][QString, QStringView, QLatin1String] Added tokenize().

Change-Id: I5fbeab0ac1809ff2974e565129b61a6bdfb398bc
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-06-06 02:07:28 +00:00
Tasuku Suzuki
832d3b482e Fix build without features.cborstreamwriter
Change-Id: I970d21d7ac97a602a5f374f6c89cd4bfdcd847b8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-06-06 07:46:33 +09:00
Jean-Michaël Celerier
35608c0761 cmake: quote paths to prevent issues when no install prefix is set
Change-Id: Ifa7f1ef70c4893e10cb4ce9a54d8a0806d19be93
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-06-05 20:57:32 +02:00
Allan Sandfeld Jensen
999c79863c Remove QThreadPool::cancel()
Deprecated in 5.9

Change-Id: Ib6e2a5da1e7ee2664fb6fa496bdc880fab870901
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2020-06-05 20:57:32 +02:00
Volker Hilsheimer
458d49861f Fix check for malformed input when decoding translations
Any integer modulo 1 can never be anything else but 0, so the statement
could never be true. The intention is to abort in case of an odd number
of bytes, as this would indicate malformed input that can't be decoded
into a QString.

Note that QTranslator will then silently continue to search for valid
translations, and not print any error message at runtime, or otherwise
inform the user or developer that an input message file contains
malformed content.

Change-Id: I957b337ee035f3aca013e0859f8ee70553d9a97b
Coverity-Id: 11014
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2020-06-05 18:57:31 +00:00
Edward Welbourne
5ba44d1427 Clean up docs of qbytearray.cpp's C-string functions
Details of MSVC version became irrelevant some time ago; the code now
just tests for MSVC. In any case, the reader doesn't need to know how
the function is implemented, as long as it does what it claims to do.

We do not, in fact, use a random number source when generating the
return value for comparisons involving only one nullptr; we quite
consistently treat the nullptr as less than the other string. Make
explicit that this is true even if the other is empty.

Change-Id: Ifd9b00fdf8e814fcf933a05821201670fecfd646
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-06-05 13:58:30 +02:00
Marc Mutz
94ad8518e0 Include qstringtokenizer.h from qstring.h
It's a bit annoying that you have to include <QStringTokenizer> to use
the tokenize() methods. The separation is a historic artefact, just fix it.

Change-Id: Ied4cc0c8dd2bb6735bf29fbb26fdbf47d07db264
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-06-05 13:21:45 +02:00
Marc Mutz
1f3cf206f4 QFactoryLoader: port a local QStringList 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: I0a0d1e31fd35d483e0036045847a3759b593c71c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-06-05 13:19:35 +02:00
Tor Arne Vestbø
1cd7cbf617 macOS: Respect window type when determining main window status
Fixes: QTBUG-84405
Pick-to: 5.15 5.12
Change-Id: I3fc6b15b07a81e7e7e417a5767c2853083c13516
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-06-05 11:00:16 +00:00
Alex Trotsenko
ad117c5444 QProcess/Win: Fix build in debug mode
Suppress a compile warning:

io\qprocess_win.cpp: 623:101: error: format '%d' expects argument of ...

Pick-to: 5.15
Change-Id: I9ea94ddfc21afea5d1a78e264507a36435cce063
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-06-05 13:22:49 +03:00
Edward Welbourne
8a95404905 Clean out string/character mentions from QByteArray docs
In some places QByteArray does interpret bytes as characters and a
sequence of them as a text string; everywhere else, however, it now
refers to them as bytes.

Add a section to the class doc explaining how char* pointers are
interpreted; the handling of '\0'-termination is surely familiar to
most readers, but making it explicit provides contrast for the
explanation of there being no such special treatment of '\0' bytes
when a stard address and length are given.

Also mention in the class doc that interaction with QString is done
via UTF-8 encoding and can be avoided by defining a macro. Shorten, in
light of that, the description of that encoding where it appears in
affected methods.

In the process, clean up lots of phrasings.

Change-Id: Ic97dce4a20752e277eeab35a06737322b2074692
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-06-05 12:13:29 +02:00
Edward Welbourne
c5f22d1c14 Fix references to section in QByteArray class doc after title change
This amends commit 9dd8e655cd to fix the
various references to section {8-bit Character Conversions}, which is
now renamed {Character Case}.

Change-Id: I1f777ab359c616a1b12f05a12b1cd7397f3ccb18
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-06-05 12:13:17 +02:00
Edward Welbourne
262ab9944a Prune two un-needed #include files from qbytearray.cpp
The QByteArray code doesn't use QLocale or QString.

Change-Id: I60966ecad35fdaaef9930ba2746bf732fa9f3cd7
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-06-05 12:12:51 +02:00
Edward Welbourne
c7420d9cb8 Create QLocale's default store if missing when setDefault() is called
A check to prevent crash-on-exit if QLocale::setDefault() was called
after the default store was torn down had the side-effect of causing
setDefault() to not record data if it was called before the first
access to the default store caused it to come into being.

Change the check to test that the default store has been destroyed
and, if not, create it if it doesn't exist yet.  This refines commit
4d6572aac0 (as modified by commit
11c5c078c7).

Fixes: QTBUG-83016
Fixes: QTBUG-83415
Pick-to: 5.15
Change-Id: Icbce9bd9c75d0258d403e2f90957561b5a18bdf3
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-06-05 12:12:36 +02:00
Jarek Kobus
79fd1cb2c6 Reuse the non blocking implementation for blocking one
Replace the implementation of blockingMappedReduced():
after calling non-blocking version of mappedReduced() we are getting
the future object, so we may call in sequence result(), which
will block and return the result when the all tasks are done.

The same is done with blockigMapped(), which calls blockingMappedReduced()
with a custom reduce function.

Looks like with this pattern we can reuse the non-blocking version
for implementing blocking version of mapped / filtered methods.

Task-number: QTBUG-83918
Change-Id: I7f240cfbd04834d551ff79d717b72194a26996d7
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-06-05 12:09:59 +02:00
Lars Knoll
690abaac0e Port QSettings from QStringRef to QStringView
Task-number: QTBUG-84319
Change-Id: If2b5d8eb78ab5ca78d365f137d9680b1f0646c6b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-06-05 07:07:13 +00:00
Teemu Holappa
0c2508efb2 Add possibility to set QNX Screen pipeline value
The pipeline value is set by window property _q_platform_qnxPipeline.

Task-number: QSR-263
Change-Id: I13536936b2335a97a6eeb5a94c4e0f552308d15e
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
2020-06-05 07:07:13 +00:00
Tasuku Suzuki
758ee12a99 Fix build without features.shortcut
Change-Id: I5b0d3b169c7adb3ee340df7b593f84167f1ccc0c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-06-05 10:23:48 +09:00
Tor Arne Vestbø
df2e029a06 macOS: Clean up headers
The headers are now C++ clean and can be used outside of Objective-C
code. All includes of Objective-C frameworks have been moved to the
implementation files.

Header guards have been added in the few places they were missing.

All includes are now done via #include, instead of sometimes using
the #import variant.

Change-Id: Ibb0a9c0bcfefbda4347737212e40e300a3184982
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-06-05 00:03:51 +02:00
Tasuku Suzuki
c7d80486de Fix build without features.completer
Change-Id: Icaed1963d6306e36653d01ad9d05b68cb50717e5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-06-05 07:02:28 +09:00
Andy Shaw
542e7da817 Update the qt_attribution.json for SQLite
This got forgotten when SQLite was upgraded to v3.32.1, so this amends
e10e989ce83027f2f620bb6948be4948f3c91e76

Change-Id: I75799b6c55bc39c4cc050b5eb18a99d9f197410c
Pick-to: 5.15 5.12.9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-06-04 23:20:20 +02:00
Giuseppe D'Angelo
34ae919f23 Enforce two's complement integers
C++20 will make this true for everyone, but as far as Qt goes,
this has to apply to all platforms even before that.
Just add another couple of checks to the list.

Change-Id: I0251ce431d4584380cfd3fc3e4b36f1dbdbf9df2
Pick-to: 5.15
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-06-04 22:34:20 +02:00
Sona Kurazyan
37cfc3c6d2 Deprecate the pause-related APIs of QFuture* classes
Deprecated the pause-related APIs of QFuture* classes and
added alternatives having "suspend" in the name instead.

With 2f15927f01 new
isSuspended()/suspended() APIs have been added to QFuture* classes for
checking if pause/suspension is still in progress or it already took
effect. To keep the naming more consistent, renamed:

 - setPaused() -> setSuspended()
 - pause() -> suspend()
 - togglePaused() -> toggleSuspended()
 - QFutureWatcher::paused() -> QFutureWatcher::suspending()

Note that QFuture*::isPaused() now corresponds to (isSuspending() ||
isSuspended()).

[ChangeLog][Deprecation Notice] Deprecated pause-related APIs of
QFuture and QFutureWatcher. Added alternatives having "suspend" in
the name instead.

Change-Id: Ibeb75017a118401d64d18b72fb95d78e28c4661c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2020-06-04 22:32:43 +02:00
Miika Pernu
036c3c19e7 Fix to crash in QWindow::event when delete this called on closeEvent
Starting from Qt 5.11 QWindow::event is called after QDialog::closeEvent
which would cause a crash if "delete this" was called on closeEvent.  The commit
that changed this was e0b5ff4ad5. Added
a check before QWindow::event call utilizing QPointer to prevent the
function call in case object is destroyed by a user in close event handler.

Change-Id: I64a4a0f3271714e55bf7e806177f0d8b39b67fa3
Fixes: QTBUG-84222
Pick-to: 5.15 5.12
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-06-04 20:29:38 +00:00
Volker Hilsheimer
c7b457e287 QLabel: create the text control when getting polished, if necessary
This amends 7bee4e9cb3, and makes sure
that the text control is created even if the attributes that define
whether it's needed are changed after a call to setText or
setTextInteractionFlags, where it is otherwise created.

Task-number: QTBUG-84080
Pick-to: 5.15
Change-Id: I3be27f35bc83944948027345535d1202a7b97163
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2020-06-04 22:29:15 +02:00
Volker Hilsheimer
94dcb5454f Remove the deprecated QDirModel
QFileSystemModel is the documented replacement. It uses threads to
populate the model, which QDirModel doesn't.

Change-Id: I7818ecd8f849eb566ac176612f382e17a0471c47
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-06-04 19:11:19 +02:00
Samuli Piippo
5781ef2013 QNX: assume QNX is always UTF-8
Override locale encoding to UTF-8 on supported platforms.

QNX has nl_langinfo, but the header is not using extern "C". Tests
show that it returns UTF-8 regardless of the locale, so let's assume
it's always UTF-8.

Change-Id: I0fe98f8441287df9f99c334e537a7b962df105f6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-06-04 20:11:19 +03:00
Samuli Piippo
8a0c16ce9f QNX: add missing include
src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp:149:42: error: incomplete type 'QTouchDevice' used in nested name specifier
     m_touchDevice->setType(QTouchDevice::TouchScreen);
                                          ^~~~~~~~~~~

Change-Id: I83fbecfb3b0745d2f8f30d946f3ee3bd5d6c7459
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
2020-06-04 20:11:19 +03:00
Samuli Piippo
150917a4ad QNX: fix build error without PPS feature
Use matching ifdef's as is done for the declaration.

src/plugins/platforms/qnx/qqnxintegration.cpp:430:24: error: no declaration matches 'QPlatformInputContext* QQnxIntegration::inputContext() const'
 QPlatformInputContext *QQnxIntegration::inputContext() const
                        ^~~~~~~~~~~~~~~

Change-Id: I7afddba514833279fe560c1807da0cb060aead29
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
2020-06-04 20:11:18 +03:00
Timur Pocheptsov
6d6bfcb9ad QtNetwork remove deprecated signals
Use 'errorOccurred' instead of 'error' and 'sslHandshakeErrors'
instead of 'sslErrors'.

Fixes: QTBUG-82605
Change-Id: I19d4845b16c7b636af7b0658d4fbbba4eef9d029
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-06-04 15:58:02 +02:00
Mårten Nordheim
c2085c26cf QNetworkReplyHttpImpl: resolve a todo after the bearer removal
Not quite "next commit" like I wrote originally, but better late than
never.

As the comment said (and the code shows) it only returns true now so
the extra function and if-check isn't needed anymore.

Change-Id: I9e8fb8891a116475ab78c3848d7cfcdb659ac521
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-06-04 15:58:02 +02:00
Tor Arne Vestbø
4497cb3d85 macOS: Build print support plugin directly into QtPrintSupport
Task-number: QTBUG-83259
Change-Id: I74f60519fbccfa5f208397bf3d65f0a4f64cb6f0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-06-04 15:58:02 +02:00
Tor Arne Vestbø
1cee9cc587 macOS: Remove QtWidget dependency from platform plugin
The dialog helpers don't depend on widgets themselves, and should be
built regardless of whether the widget dialogs are enabled, as these
helpers can (and should) be used by other layers, such as Qt Quick.

Change-Id: I1c66b474ab2f29748f1256aea90229c51c12a16f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-06-04 10:39:53 +02:00
Edward Welbourne
9dd8e655cd Limit QByteArray's 8-bit support to ASCII
Previously it handled Latin-1, which made it incompatible with UTF-8,
which is now our preferred 8-bit encoding. For Qt6 it is limited to
ASCII. Adjusted tests to match. QLatin1String::compare() turned out
to be relying on qstrnicmp()'s Latin-1 handling.

Removed some spurious Q_UNLIKELY()s and tidied up code a little in the
process.

[ChangeLog][QtCore][Important Behavior Changes] Encoding-dependent
features of QByteArrray are now limited to ASCII, where previously
they worked for the whole of Latin-1. This affects case-insensitive
comparison, notably including qstricmp() and qstrnicmp(), and
case-transforming functions.

Fixes: QTBUG-84323
Change-Id: I2925d9908f8654599195a2860847b17083911b41
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-06-04 10:39:53 +02:00
Edward Welbourne
135204bdf6 Overhaul documentation of QByteArray numeric conversions
A few pet peeves, a bunch of missing details and some phrasing I like
better.

Telling folk you're using "base 10" in fact communicates no
information; it *assumes* a base that folk shall read that text with
and tells them they are indeed using that. If they happen to be
reading with a different assumption than you, they'll duly see you
confirming their expectation. If you mean "base ten", say so.

Values "between 2 and 36" may nor may not include the bounds,
depending on weird cultural cues and contextual complications. Be
explicit about octal being base 8 and hexadecimal being base 16; most
readers shall know, but best to be clear. Be explicit about the digits
used for bases beyond ten.

Mention that QLocale is the way to do locale-sensitive conversions.

Change-Id: I4efcec6242644f37a48ff6391b96ed5b371d5be8
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-06-04 10:39:53 +02:00
Edward Welbourne
3a8aeef897 QByteArray: clean up docs of trimmed() and simplified()
Make the set of spacing characters explicit (rather than "includes"
hinting that there might be more) and makes explicit that this is an
ASCII operation.

Change-Id: I61b543bcb450ee82bcce980ecb469901e287b46f
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-06-04 10:39:53 +02:00
Edward Welbourne
21549529ef Rename snippet files to match the carved up corelib/tools/
This is a folllow-up to commits
548513a4bd and
a9aa206b7b, renaming the snippets files
referenced by the files moved out of corelib/tools/ to match the new
locations of the files using them.

Change-Id: I59f5d3c217ef835e9244387cc769e7212de9d8f5
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-06-04 10:39:52 +02:00
Andy Shaw
f439df7893 Set the dontPrint attribute correctly for the character being checked
This amends 36325f9d86 so that the
dontPrint attribute is set before incrementing i

Change-Id: I0be7386253d8607596489ce1025d2f3f8d468ab4
Pick-to: 5.15
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2020-06-04 07:36:40 +02:00
Andy Shaw
915549f6ed sqlite: Upgrade to 3.32.1
The patches applied are now removed as they are all included in v3.32.1

[ChangeLog][QtSQL][sqlite] Upgraded to v3.32.1

Pick-to: 5.15
Pick-to: 5.12
Change-Id: Ib5b26fb36d7ca49c1108a96097a48fe5b797f291
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-06-04 07:36:26 +02:00
Tasuku Suzuki
e83991274a Fix build without features.action
Change-Id: Ie37036e44da9b552dc7e46ce94db7b50ce2f8a0b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-06-04 10:08:14 +09:00
Tor Arne Vestbø
7f179eff61 Move macOS print support from platform plugin into QtPrintSupport
Task-number: QTBUG-83256
Change-Id: I29044b6c3f952c259f501f94a175c8ef2cbaae55
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-06-04 01:46:27 +02:00
Marc Mutz
6a3c6f939f Long live QStringTokenizer!
This class is designed as C++20-style generator / lazy sequence, and
the new return value of QString{,View}::tokenize().

It thus is more similar to a hand-coded loop around indexOf() than
QString::split(), which returns a container (the filling of which
allocates memory).

The template arguments of QStringTokenizer intricately depend on the
arguments with which it is constructed, so QStringTokenizer cannot be used
directly without C++17 CTAD. To work around this issue, add a factory
function, qTokenize().

LATER:
- ~Optimize QLatin1String needles (avoid repeated L1->UTF16 conversion)~
  (out of scope for QStringTokenizer, should be solved in the respective
  indexOf())
- Keep per-instantiation state:
  * Boyer-Moore table

[ChangeLog][QtCore][QStringTokenizer] New class.

[ChangeLog][QtCore][qTokenize] New function.

Change-Id: I7a7a02e9175cdd3887778f29f2f91933329be759
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-06-03 19:13:54 +02:00
Jonas Karlsson
1b33ee95e5 Use QByteArray instead of QString
Since the variable names in QShaderDescription are later compared to
QByteArrays we can gain some performance from not having to convert them
to QByteArrays later.

Task-Id: QTBUG-83706
Change-Id: Iaf80d0966f45cbb09e7c1000b7854bc488e57bb3
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-06-03 18:56:21 +02:00
Laszlo Agocs
1f88ccc8ad Enable the scenegraph to remove its QMatrix4x4_Accessor hack
Expose flagBits via a public function marked as internal.

Task-number: QTBUG-82670
Change-Id: Ia64d934d3dda3e718357cf4e3c32866a613a4722
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2020-06-03 18:56:09 +02:00
Ulf Hermann
07ded4912f Fix and compactify QNotifiedProperty
The static observer can live in a union with the inline observers. We
only need to take care of calling the ctors and dtors manually then.

In order for any observers to be called in the presence of a static
observer, the static observer has to be called after the other
observers.

Change-Id: I2f56fa64f3fe6fcd7f06cc403929362da7d86f65
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-06-03 18:53:40 +02:00
Tasuku Suzuki
5a1680ef13 Fix build without features.menu
qaction_widgets.cpp needs qwidget_p.h for qWidgetShortcutContextMatcher.

Change-Id: I9144a4158af2f25f20b6f13badd0ddcd50075b67
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-06-04 01:52:21 +09:00
Tor Arne Vestbø
788cd98b35 Move QAbstractFileIconEngine into QtGui
Task-number: QTBUG-83255
Change-Id: Iab502c51600b96f315113b08fa473ed28a5457fc
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-06-03 18:47:56 +02:00
Allan Sandfeld Jensen
87d32424de Do not multithread if already in a global threadpool thread
This can lead to a deadlock if we block all the worker threads, waiting
for the worker threads to finish.

Pick-to: 5.15
Fixes: QTBUG-84619
Change-Id: I92b7f96007897d86ece0c34223bab0df4ccbed9a
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-06-03 18:40:34 +02:00
Allan Sandfeld Jensen
6a31a7b024 Support winding fonts like Windows does
Map Latin-1 characters to the Winding unicode entries for symbol fonts
to render those fonts like Windows does.

Pick-to: 5.15
Fixes: QTBUG-84409
Change-Id: I60b81d93412d970d25a98606545773db6c8ab723
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2020-06-03 18:40:23 +02:00
Alex Trotsenko
33e6e5fac3 QEventDispatcherWin32: retrieve PM_REMOVE value as a bit flag
Windows unexpectedly passes PM_NOYIELD flag in wParam parameter to the
hook procedure, if ::PeekMessage(..., PM_REMOVE | PM_NOYIELD) is called
from the event loop. So, to ignore undocumented flag, we should
interpret wParam as a bit field.

Thanks to Robin Lobel for research.

Pick-to: 5.15
Fixes: QTBUG-84562
Change-Id: Ib16d7d747aebc9a3628e4ee67478c4d3edeb96f1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-06-03 19:36:34 +03:00
Giuseppe D'Angelo
b99ade85b0 QPoint(F): API cleanups
Unexport the classes, plaster noexcept, and port to constexpr.

Change-Id: I5cc7928fb08e8e32c67cff2d84c1b0ed9d46a2fa
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-06-03 18:26:54 +02:00
Shawn Rutledge
d268b91907 Add QT_QPA_SYSTEM_ICON_THEME to override icon theme name
On a plain X11 desktop, it otherwise ends up empty.

Pick-to: 5.15
Task-number: QTBUG-25351
Task-number: QTBUG-25718
Task-number: QTBUG-74252
Change-Id: I50a522a3e1761e422d5949d5338869ceb9e5e89d
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2020-06-03 18:17:51 +02:00
Eskil Abrahamsen Blomfeldt
4dfaa1d60a Fix build for Android on macOS
The FreeType engine has moved out of the fontdatabases library,
so the .a file would be empty. This caused the error
"attempt to map 60 bytes at offset 72 exceeds size of file" when
building for Android on macOS.

Change-Id: I9d9afca67e7626d3b5c6a62fcde33fed029fe04c
Reviewed-by: Liang Qi <liang.qi@qt.io>
2020-06-03 16:39:39 +03:00
Assam Boudjelthia
7ede57f937 Make sure the default AndroidManifest is compatible with Qt Creator
When adding the default AndroidManifest.xml to a project, Qt Creator
edits some pieces because of autoformat and shows that something is
changed, but the user changed nothing, and this can be confusing. Let's
make them on the same page.

Pick-to: 5.15
Task-number: QTCREATORBUG-23768
Change-Id: I76088358dc31be45adb766bed29e2c9d889a8f09
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-06-03 10:26:01 +03:00
Alex Blasche
5f7b771c4f Add missing lock in QFactoryLoader
libraryList is modified in a code section that was not yet properly locked.

This was overlooked by 7ca66b1e66.

Task-number: QTBUG-42855
Change-Id: I028ad21a7df314133931f860ad49453bb2db9da0
Pick-to: 5.15
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-06-03 09:06:50 +02:00
Dominik Holland
43ae627f40 Add Q_OS_WEBOS to qsystemdetection
This can be used to guard WebOS specific patches.

Change-Id: Ia770562b92c59fc3410d6254acd1313776d15a28
Pick-to: 5.15
Fixes: QTPM-1826
Reviewed-by: Johannes Oikarinen <johannes.oikarinen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-06-03 06:42:48 +00:00
Paul Wicking
ca89ad8002 Doc: Fix qdoc warnings
Use \li for list items.

Change-Id: I5ab253e22077cd7132f28c8690aa2a9a4b8b489c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-06-03 07:10:28 +02:00
Eskil Abrahamsen Blomfeldt
c2dcb7eaa1 Windows: Fix QPainter warnings when using some fonts
Some fonts, like Segoe UI, have empty glyphs defined for
characters such as space. When there is a margin on the glyphs,
we would previously render them as 4x4 completely transparent
images. This is a waste of time, and in the case of DirectWrite,
we fixed it in bb67c3b68b so that
it will always return an invalid image when the glyph does not
have dimensions.

But since we did not account for this in alphaMapBoundingBox(),
the texture glyph cache did not detect this case and would
request the empty image and try to add it to the cache.

Fixes: QTBUG-84629
Pick-to: 5.15
Change-Id: I470a4a55577c5e9239bf77de81c2b381bf8e6a49
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-06-03 07:00:32 +02:00
Timur Pocheptsov
7f927b373e H2 protocol handler: make sure inflateEnd gets called on z-stream
The request/reply pair is created out of QNetworkRequest, we set
autoDecompress data-member on the request, but not reply. As a result,
reply in its destructor fails to release memory, allocated by z-lib
(by failing to call inflateEnd). Since with H1 requests it does not
seem to be a problem (no leaks detected), I'm limiting this change
to H2 handler only. Later it will be retired by the stream decompression
change in Qt 6, but will be picked to 5.15.

Fixes: QTBUG-84560
Pick-to: 5.15
Change-Id: I82e19d2b0a83624b730edd20d7d45721e7001731
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-06-03 06:57:50 +02:00
Samuel Gaist
654a3ad08e Doc: fix some typos in QRegularExpression documentation
Pick-to: 5.15
Change-Id: Ibf96fc775b08df4de0b20d499d8779204ff7df30
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-06-03 00:39:06 +02:00
Tor Arne Vestbø
93a04332eb Move QtAccessibilitySupport into QtGui
Task-number: QTBUG-83255
Change-Id: Ibc1b38e77c3c90030a832c41f4de65c6c38bc91d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-06-02 23:32:36 +02:00
Marc Mutz
dd7f4001e1 QPainter: replace manual memory management [1/5]: dummyState
Use a unique_ptr to indicate ownership.

Change-Id: I15e8c48fac1424d5605e869adcfba6965b16c218
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-06-02 22:52:57 +02:00
Marc Mutz
033e5dc183 QTranslator: replace manual memory handling with std::unique_ptr
The QTranslator owns its QResource and its sub-translators, so hold
them in unique_ptr to show what's going on.

Change-Id: I65dfa8c3b6dd774066a01de23ae6cff7449b363a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-06-02 22:52:54 +02:00
Albert Astals Cid
add92a551c Do not fully initialize QIconLoader when setting the fallback theme
We need this because without this patch you get bugs both
if you call QIcon::setFallbackThemeName before creating the QGuiApplication and
if you call QIcon::setFallbackThemeName after creating QGuiApplication

Why do you get a bug if you call QIconLoader::setFallbackThemeName
before creating the QGuiApplication:
 * QIcon::setFallbackThemeName calls QIconLoader::instance
 * QIconLoader::instance calls QIconLoader::ensureInitialized
 * QIconLoader::ensureInitialized calls systemThemeName
 * systemThemeName asks the current QPlatformTheme for its
   QPlatformTheme::SystemIconThemeName
 * But since we're calling this before creating the QGuiApplication
   there is no current QPlatformTheme yet, so systemThemeName
   is set to empty, which is obviously not what we want

Why do you get a bug if you call QIconLoader::setFallbackThemeName
after creating the QGuiApplication:
 * QGuiApplicationPrivate::init calls
   QGuiApplicationPrivate::createPlatformIntegration
 * QGuiApplicationPrivate::createPlatformIntegration sets the
   current QPlatformTheme and at the end of the very same function
   uses QIcon::fromTheme
 * Since we haven't called QIconLoader::setFallbackThemeName yet
   there is at least one icon lookup that doesn't take
   the fallback theme we would like to have into account

This patch makes it so calling QIconLoader::setFallbackThemeName
before creating the QGuiApplication works.

The only thing we want to do from QIcon::setFallbackThemeName is set
the internal m_userFallbackTheme, it doesn't care about doing
further initialization of QIconLoader, if it's done, great it's done,
if it is not initialized yet, great it will be initialized later
when someone actually tries to use the QIconloader.

So it's OK for ensureInitialized() to return early if there is no
platform theme yet, because it will be called again later.

Pick-to: 5.12
Pick-to: 5.15
Fixes: QTBUG-74252
Change-Id: I65268fc3d3d0bd282d76c76cf75e495bcc9d1a30
Done-with: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-06-02 20:47:53 +00:00
Leander Beernaert
5a779a4ad3 CMake: Make it possible to build tools when cross-compiling
This patch allows tools to be built for the target platform when the
QT_BUILD_TOOLS_WHEN_CROSSCOMPILING parameter is set at configuration
time.

To avoid naming conflicts, the target tools are suffixed with "_native".
The qt_get_tool_target_name() function can be used to get the tool name
for both scenarios (cross and non-cross compilation).

Extend pro2cmake to refer to the right target name for tools.
The relevant write_XXX functions have a new target_ref parameter that
will be "${target_name}" for tools and literally the target name for
everything else.

Fixes: QTBUG-81901
Change-Id: If4efbc1fae07a4a3a044dd09c9c06be6d517825e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-06-02 22:42:15 +02:00
Fabian Kosmale
47c6466d0a QMetaType: create metatype for void
Create a QMetaTypeInterface for void. This allows us differentiate
QMetaType::Unknown from QMetaType::Void. In addition, this will enable
the usage of QMetaMethod::metaReturnType in QMetaMethod::returnType,
and will facilitate using metaReturnType in declarative, which needs to
distinguish between Unknown and Void.

Change-Id: I83296b49587f3deb7ec73e25a33f0d8c98cf8da0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-06-02 22:42:15 +02:00
Fabian Kosmale
fa987d4441 MetaObject: Store the QMetaType of the methods
This does the analog of 46f407126e for the
methods we care about (signals, slots, Q_INVOKABLEs). In addition to the
actual QMetaType, we store an array with offsets so that we later can do
a mapping from methodIndex to metatype.

The newly added QMetaMethod::{return,parameter}MetaType methods can then
be used to retrieve the metatypes.

This does however require that all involved types are complete. This is
unfortunately not a feasible requirement. Thus, we only populate the
metatype array on a best effort basis. For any incomplete type, we store
QMetaType::Unknown. Then, when accessing the metatype, we fall back to
the old string based code base if it's Unknown.

Squashes "moc: support incomplete types" and  "Fix compile failures
after QMetaMethod change"


Fixes: QTBUG-82932
Change-Id: I6b7a587cc364b7cad0c158d6de54e8a204289ad4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-06-02 22:42:15 +02:00
Topi Reinio
707018b76e Doc: Fix issues with Qt Widgets documentation configuration
Remove '/' as an example directory. We do not want to retrieve the
directory tree of the entire system.

Change-Id: I911f8eea12b4960319a9a4cbea820b910a35aede
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-06-02 19:25:59 +02:00
Friedemann Kleint
13d95e415e High DPI/Windows style: Fix potential crash when drawing buttons of maximized QMdiSubWindow
In QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(),
pass the correct rectangle (reflecting the correction factor)
to the function fixAlphaChannel().

Amends e56b8e1e59.

Pick-to: 5.15
Fixes: QTBUG-84613
Task-number: QTBUG-75927
Change-Id: I5357bb8c55ed26a50cc322ea7a05df4487212fb8
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2020-06-02 14:50:54 +02:00
Dimitrios Apostolou
f19650cf80 Convert Q_ASSERT to Q_STATIC_ASSERT
This is now possible because of the earlier commit that changed the
const arrays in qurltlds_p.h to constexpr arrays.

Change-Id: I37a6a64e250bbe33f7d34b5916595bf6a37aed4a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-06-02 12:01:42 +02:00
Lars Knoll
51beb816e8 Support qbswap for all integral types
long and ulong where missing. Generalize the code so that it'll work
for all integral types.

Change-Id: I74591e9c8b375e0ecdcfdd856970ce355eb2d4ce
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-06-01 20:57:44 +02:00
Lars Knoll
aac39167b7 Add QStringView::split() methods
Since QString::split() is not going away in Qt 6, we should aim
to provide API symmetry here, and ease porting existing code from
QString(Ref) to use QStringView.

This is easier than having to port everything to use tokenize() at
the same time. tokenize() will however lead to better performance
and thus should be preferred.

Change-Id: I1eb43300a90167c6e9389ab56f416f2bf7edf506
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-06-01 20:43:21 +02:00
David Faure
4f1ebf666e QMimeType::suffixForFileName shouldn't lowercase the file suffix
It was returning a lowercased suffix because it was extracting it from
the pattern (*.txt) rather than from the filename ("README.TXT").

This broke expectations on the application side, since this method is
documented to return a suffix from the given filename.

Ref: https://bugs.kde.org/show_bug.cgi?id=402388

Change-Id: I7dae13db31280249d3f592fa9592c4067804e22d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-06-01 13:36:05 +02:00
Lars Knoll
b0294bb1c7 Refactor splitString to use QStringView
Instead of a QChar * and a length.

Change-Id: Ic07e92fe0889e57c19ce7c1bf6902f3a598fad05
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-06-01 00:39:24 +02:00
Giuseppe D'Angelo
529f052add Port QRegularExpression to QStringView, drop QStringRef
The idea is pretty simple -- add QRegularExpression matching over
QStringView. When matching over a QString, keep the string
alive (by taking a copy), and set the view onto that string.
Otherwise, just use the view provided by the user (who is then
responsible for ensuring the data stays valid while matching).

Do just minor refactorings to support this use case in a cleaner
fashion.

In QRegularExpressionMatch drop the QStringRef-returning methods, as
they cannot work any more -- in the general case there won't be a
QString to build a QStringRef from.

[ChangeLog][QtCore][QRegularExpression] All the APIs dealing
with QStringRef have been ported to QStringView, following
QStringRef deprecation in Qt 6.0.

Change-Id: Ic367991d9583cc108c045e4387c9b7288c8f1ffd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-05-31 21:46:32 +02:00
Kai Koehne
32a39c4ed1 Document how to use CMake for Qt Widgets
Task-number: QTBUG-73058
Change-Id: Ida459635e159334a4ef67979c0d28b1553317ea9
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-05-31 18:44:57 +02:00
Lars Knoll
c84e9c0700 Fix a bogus assert
advances and glyphIndices can be nullptr's as long as numGlyphs
is zero.

Change-Id: I29c3764792c1a0ffaafd3393c82a26af65699ab3
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-05-31 15:55:57 +02:00
Lars Knoll
6a6314df1e Add QStringView::constData()
This is doing the same as data(), but the method is widely being used in
Qt (e.g. in QString), so this will make it easier to change the type of a
variable from QString(Ref) to QStringView in a source compatible way.

Change-Id: Ic49bef688d3ce3c550336edf90130aa5cac8b497
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-05-30 23:11:20 +02:00
Lars Knoll
a1056096fc Add support for count() to QStringView
Make the API more symmetric with regards to both QString and QStringRef.

Change-Id: Ia67c53ba708f6c33874d1a127de8e2857ad9b5b8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-05-30 23:11:09 +02:00
Eirik Aavitsland
2b7b75f721 gif image handler: check for out of range image size
Make the decoder fail early to avoid spending time and memory on
attempting to decode a corrupt image file.

Pick-to: 5.15 5.12 5.9
Change-Id: Ic556d4fbcb6b542fc110d10e48dac1a880e60697
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-05-30 15:37:12 +02:00
Andy Shaw
f71a400bf6 Android: Clear the clipboard when getting a null mimedata
From API 28 it is possible to clear the clipboard so we should ensure
that this is done if API 28 or later is being used. Otherwise it is not
removed, but that is due to limitations on the Android side.

Pick-to: 5.15
Change-Id: I1fe504d0e566c6923b39b2adf4540619c6b1daf7
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-05-30 12:49:42 +00:00
Eirik Aavitsland
6a2224fd58 bmp/ico decoder: fail early for unsupported bit depths
All the normal bit depths are supported, so no point in trying to go
through the decoding code path for others. Avoids wide bitshift
warning for claimed depths > 32.

Pick-to: 5.15 5.12
Change-Id: I61b72dbbf9558ca28db46f8168339f8174e56997
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2020-05-30 12:33:08 +02:00
Eirik Aavitsland
30571068b2 Gif decoder: avoid undefined values in enum
The gif standard allocates 3 bits for the disposal method, but values
4-7 are unused.

Pick-to: 5.15 5.12
Change-Id: I0f70b3f87b4cd8e98140c3da476702a22ebe93a9
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2020-05-30 12:32:56 +02:00
Samuli Piippo
10a0dc6600 Return correct threadId in all cases
If the assembler code cannot be used to retrieve the threadId, always
use pthread_self() for it. QObject uses QThread::currentThreadId() and
QThreadData::threadId to match threads, which makes address of the
currentThreadData unsuitable as the thread id.

Reading the threadId from currentThreadData is slower than calling
pthread_self(), as tested on Aarch64 linux and x86_64 QNX.

Change-Id: If9afc8ed2810ad1e04bd42ead8f40b43ef3bac30
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-05-30 09:55:05 +03:00
Alexandru Croitor
71e3b04282 CMake: Regenerate rest of configure.cmake files
Change-Id: I17cca57c18f33d4283eb6009ba4c5ebb0c1847c3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-05-29 23:23:06 +02:00
Laszlo Agocs
e3361c1614 CMake: Update src\gui\configure.json and the conversion script
The ANGLE removal's manual configure.cmake changes are now replaced
by updating the conversion script's special cases instead.

Change-Id: I06317fe0202b25bd9f9524da14e1bb0ccbb30cc1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-05-29 23:23:02 +02:00
Alexandru Croitor
a97a8fcc1a CMake: Regenerate src/platformsupport
Change-Id: If7b5359c457edee814dc7d3a71cf47ce052e6c5e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-05-29 23:22:57 +02:00
Alexandru Croitor
77771116a4 CMake: Regenerate src/plugins
Change-Id: Icceceeb42023e7fa5edf320bb21f03d11bd357b7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-05-29 23:22:47 +02:00
Alexandru Croitor
a9fbe53966 CMake: Regenerate tools and 3rd party
Change-Id: I38e065cddc954e8594a5dce823c3bb5385a8a1e8
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-05-29 23:22:43 +02:00
Alexandru Croitor
abe3dbe719 CMake: Regenerate src/opengl
Change-Id: I6a648c5fd2fa90e6e70d0ccffb34fd3cb1161e5e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-05-29 23:22:39 +02:00
Alexandru Croitor
c67c05ee0e CMake: Regenerate src/corelib
Change-Id: I985f9cca78e173f066d65e704c101d499668163a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-05-29 23:22:35 +02:00
Alexandru Croitor
41b1eaf579 CMake: Regenerate src/gui
Remove the manual modifications, and let the script do its work
and use the .pro file as the source of truth.

Change-Id: I510d5487a326d72a9c19e8148ec1daac9a23394b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-05-29 21:22:31 +00:00
Lars Knoll
f98fe1ba41 Fix UB in QGraphicsScene::wheelEvent()
operator--() would iterate before begin() if the
list was empty. This is UB, and will crash in Qt 6,
where begin()/end() can return an iterator pointing
to a nullptr if the list is empty.

Change-Id: I39c3a8ebb09fcad75d42019b02426ac5ac05eed9
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-05-29 23:21:51 +02:00
Lars Knoll
beaef85b8d Add toInt() and friends to QStringView
Make the API more symmetric with regards to both QString and QStringRef.
Having this available helps making QStringView more of a drop-in
replacement for QStringRef. QStringRef is planned to get removed in Qt 6.

Change-Id: Ife036c0b55970078f42e1335442ff9ee5f4a2f0d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-05-29 19:01:58 +02:00
Tor Arne Vestbø
b39f33e311 Move QPlatformBackingStoreOpenGLSupport handling out of platform plugins
Allows them to not depend on QtOpenGL just to provide the default
backing store OpenGL support backend.

Change-Id: I90d6d9247ce76848d9d03e2d512fb736c81488d3
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-05-29 19:01:57 +02:00
Alexandru Croitor
f77c4ebb7d CMake: Check CMAKE_CONFIGURATION_TYPES when doing automoc extraction
Otherwise when configuring a standalone example without specifying a
CMAKE_BUILD_TYPE (so it's empty), building fails because
qt6_generate_meta_types_json_file thinks it's being called with
a multi-config generator.

Change-Id: I360c7dbb19522155d8e72f98836fb663916715a0
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-05-29 17:17:15 +02:00
Alexandru Croitor
4182cf409e CMake: Use default location for installing metatypes json files
Previously configuring a standalone example that had no explicit
INSTALL_DIR option for qt6_generate_meta_types_json_file would fail.

When no explicit location is specified to
qt6_generate_meta_types_json_file via INSTALL_DIR option, default
to installing into a lib/metatypes location relative to the install
prefix.

This is required for supporting calling
qt6_generate_meta_types_json_file when building standalone applications
or libraries (not part of the Qt build).

Make sure not to install the metatypes.json file for executables.
Install it only for libraries (aka modules).

Task-number: QTBUG-84403
Change-Id: Ie0dd75fca0cde71ccb4eb48030871e72d31d1725
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-05-29 17:17:11 +02:00
Ivan Tkachenko
a50d7005a5 Cosmetic whitespace / indentation
Split long signature into multiple lines, and indent some existing
misaligned signatures.

Change-Id: Icaed7b703c3f0b20472400b186ac2a28f1ff1dd1
Pick-to: 5.15
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-05-29 14:58:43 +00:00
Sona Kurazyan
2f15927f01 Add a way of notifying QFutureWatcher when pause is in effect
Because setting QFutureInterface to paused state does not mean that
the computations that are already in progress will stop immediately,
it may be useful to get notified when pause actually takes effect.

Introduced the QFutureWatcher::suspended() signal, to be emitted when
there are no more computations in progress, and no more result ready
or progress reporting signals will be emitted, i.e. when pause took
effect. Added {QFuture, QFutureWatcher}::isSuspended() methods for
checking if pause took effect.

QtConcurrent will now to send QFutureCallOutEvent::Suspended event
when the state is paused and there are no more active threads.

[ChangeLog][QtCore][QFutureWatcher] Added a new QFutureWatcher::suspended()
signal, to be emitted when pause took effect, meaning that there are no
more computations in progress. Added {QFuture, QFutureWatcher}::isSuspended()
methods for checking if pause took effect.

Fixes: QTBUG-12152
Change-Id: I88f2ad24d800cd6293dec63977d45bd35f9a09f0
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2020-05-29 16:58:43 +02:00
Cristian Adam
9b0e23ef8a CMake Build: Do not set "lib" prefix for modules (plugins)
CMake sets "lib" as default prefix for Windows-GNU platforms.

Change-Id: I49e3123c385610307c84c584a21f5f3827a6fafd
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-05-29 16:58:43 +02:00
Volker Hilsheimer
743c7234df Export the highlighter function so that we can use it in QtSvgWidgets
That allows us to remove the copy of that function in QtSvgWidgets.

Change-Id: I99d54408781c99b877c4df8fc9fc5f4139dcebb2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-05-29 16:58:43 +02:00
Edward Welbourne
25823cdeb4 Fix a typo and an odd phrasing
One initializes data "byte by byte" not "byte per byte", at least in
any dialect I'm familiar with.

A byte array can be "created from raw data" but if it was "from a"
thing it'd have to be a datum of some sort.

Change-Id: Id9706b191f08f03418b9ea6f481797d93a278dff
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-05-29 16:58:43 +02:00
Timur Pocheptsov
73158a9cb0 CA fetcher (Windows) - relax the logic a bit
In case a certificate chain is missing an intermediate,
for a certificate having "Authority Information Access"
extension it's possible to fetch this intermediate and
build the chain up to the trusted root. Unfortunately,
it's not always possible to install the root certificate
in the system "ROOT" store and then an application
wants to set it in the socket's configuration,
using setCaCertificates(). But this call also
disables CA fetcher ('no on demand root loading').
It makes sense to relax this logic for such
certificates and try to fetch the intermediate CA
and then have the complete chain verified.

Pick-to: 5.15
Fixes: QTBUG-84173
Change-Id: I5b9b4271767eba6f5fd2b5cf05e942360c6aa245
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-05-29 16:58:43 +02:00
Oliver Wolff
2216f10ffd Update src/gui/CMakeLists.txt
The result of running pro2cmake.py

Change-Id: Iaaf959069db527c43c8bcdc2cf51e2813bf8d140
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-05-29 11:30:30 +02:00
Simon Hausmann
36f6922925 Implement support for QProperty<T> with a static observer
A common pattern in Qt Quick will be QProperty members that are
connected to a callback that needs to perform something when the value
changes, for example emitting a compatibility signal or marking scene
graph node data dirty.

To make such a pattern more efficient, a new QNotifiedProperty type is
introduced that offers the same API as QProperty<T>, with two changes:

    (1) The template instantiation not only takes the property type as
    parameter but also a callback pointer-to-member.

    (2) Since that member itself cannot be called without an instance
    and to avoid storing an instance pointer permanently, the API for
    setBinding and setValue are adjusted to also take the instance
    pointer. For the former it gets stored in the binding, for the
    latter it is used to invoke the callback after setting the new
    value.

Change-Id: I85cc1d1d1c0472164c4ae87808cfdc0d0b1475e1
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-05-28 21:08:51 +00:00
Lars Knoll
66d6943478 Add missing number/setNum() overloads
QString has the overloads taking a long/ulong. QByteArray also has
toLong/ULong(), so add these to make the API symmetric.

Change-Id: I6d1f98ca95fabd32b012f1c3df603dc54e187ec3
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-05-28 22:09:45 +02:00
Tor Arne Vestbø
7172b5112e Move QtPlatformCompositorSupport into QtOpenGL
Task-number: QTBUG-83255
Change-Id: Id9ea654db8efb00b487d53aea03d7f23a7ab1a54
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-05-28 21:39:48 +02:00
Allan Sandfeld Jensen
d80a98d525 Fix ExtendedRgb and Rgb encoding comparisons
ExtendedRgb should be treated as Rgb as it can be an automatic upgrade.

Pick-to: 5.15
Change-Id: I2942a1067ed5cacb2f60f303f467887cb44c36dd
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-05-28 21:15:55 +02:00
Ivan Tkachenko
93c8b4c0c8 Fix most obvious typos in doc comments
Just opened some files with spell checker turned on,
and corrected what was underlined.

Also, see QTBUG-84427.

Change-Id: I702b5bf2cfe1f23c928a6a57f117a2f571ad86ea
Pick-to: 5.15
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2020-05-28 15:57:13 +00:00
Laszlo Agocs
56977990e0 rhi: Harmonize create-destroy API pattern with the rest of Qt
For historical reasons we use build and release instead of create and
destroy. This becomes confusing now that more modules in Qt start taking
QRhi into use. Migrate to the more familiar naming, so those who have
used QWindow or QOpenGLContext before will find it natural.

Change-Id: I05eb2243ce274c59b03a5f8bcbb2792a4f37120f
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-05-28 17:53:32 +02:00
Laszlo Agocs
c991d87ee2 rhi: d3d11: Use qstrncpy to avoid MSVC warning
Switch strncpy to qstrncpy, which internally uses strncpy_s with MSVC.

This way we will not get the following warning:

qrhid3d11.cpp(933): warning C4996: 'strncpy': This function or variable
may be unsafe. Consider using strncpy_s instead. To disable deprecation,
use _CRT_SECURE_NO_WARNINGS. See online help for details.

Change-Id: Iaed86033b0fc182e68804f311ac382c93c72abda
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2020-05-28 17:53:23 +02:00
Topi Reinio
67d6b05aac Doc: Fix issues with Qt Test documentation configuration
Remove '/' as an example directory. We do not want to retrieve the
directory tree of the entire system.

Change-Id: I1caa7ef659dfe326515a4d81193682dacb373856
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-05-28 15:14:09 +02:00
Giuseppe D'Angelo
7c8c8272b4 Actually apply the shadow stack Intel CET flags
C&P mistake dropped $$ from qmake variables, my fault.
Will squash manually in 5.15 to avoid introducing a bug there.

Amends fa98adbd04.

Change-Id: I3ce33dba16f512cd20c8d3c6adc4c1a09506c1ea
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-05-28 15:13:59 +02:00
Alexandru Croitor
e189126f1a CMake: Use -fapplication-extension when building Qt libraries on macOS
Needed to avoid linker warnings transformed into errors, when linking
QtWebEngine with qmake mixing.

ld: warning: linking against a dylib which is not safe for use in
application extensions:

The flag is added to libraries and plugins, unless opted out.

CMake equivalent of 944110089d

Task-number: QTBUG-83929
Task-number: QTBUG-75666
Change-Id: I3e9acca4712c9a266bf54c6e35e2fd2c0096692b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-05-28 15:13:27 +02:00
Edward Welbourne
f20f0b03d5 Cache system zone ID when fetched from the file-system
Record the device and inode numbers when found and assume we can
safely re-use the name if those have not changed.

Tidy up some preprocessor trivia in the process and moved
zone-availability check functions to before the system name lookup.

Pick-to: 5.15
Task-number: QTBUG-75585
Change-Id: I3660922ef3c94b553a20f887a676e8921693b30f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-05-28 15:13:05 +02:00
Jarek Kobus
bd877e76a8 Make threadCount a const member of ReduceKernel
Change-Id: I8e75263d3e02a6e6a20520ebecfdb4e40b562bbf
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-05-28 15:12:56 +02:00
Jarek Kobus
eb5d8efc51 Pass the thread pool into ReduceKernel
This was overlooked when enabling setting a custom thread pool
for various concurrent methods.

Fixes: QTBUG-53465
Change-Id: I189a7776fa02bbc3e995538cc154a7246ad1ad7a
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-05-28 15:12:41 +02:00
Jarek Kobus
9aea74f2c6 Pass the thread pool into BlockSizeManager
This was overlooked when enabling setting a custom thread pool
for various concurrent methods.

Fixes: QTBUG-53465
Change-Id: I8b0a0086e46639639051fe99cf52d049f7bb3bb2
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-05-28 15:12:29 +02:00
Jarek Kobus
b6a2962a52 Make some members of IterateKernel const
Change-Id: Ifeabebcbb7212a8c2799a37665b290983fd64105
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-05-28 15:12:16 +02:00
Dimitrios Apostolou
bc58e0dc7a Address Coverity defect about buffer overrun
Coverity warned that chunk could be >= tldChunkCount (2), and
tldData[chunk] (array of length 2) would be accessed out of bounds.

This can not happen, but it was unclear.
Clarify logic with comments and asserts, that Coverity will hopefully
understand now.

Change-Id: I2a38c685cfcbc69ed123918e8cbed360b20b1035
Coverity-Id: 178254
Pick-to: 5.15
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-05-28 10:48:58 +02:00
Dimitrios Apostolou
d4d08e009d Regenerate qurltlds_p.h
With the recent changes in the utility that generates it, it now has
improved readability and constexpr arrays, usable in static asserts.

It also has an updated list of TLDs.

Change-Id: Ibdc986d667feebeb141ff81f6fddbc05b6be8488
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-05-28 10:48:58 +02:00
Andrei Golubev
cfbb30decd Make QDateTimeParser recognize local time offsets
Fixes: QTBUG-84209
Pick-to: 5.15
Change-Id: Iedbc7beafcaa55c72fec3ac5a5f519c6ed5f7770
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-05-28 11:48:57 +03:00
Christian Ehrlicher
33fc622686 QTableWidget: simplify QTableWidgetSelectionRange
Simplify QTableWidgetSelectionRange by removing the unneeded
user-defined functions - the compiler can generate them by it's own.

Change-Id: Ia96ea29f595851e58c5b714bb316174406d42b8e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-05-28 06:13:56 +02:00
Giuseppe D'Angelo
fa98adbd04 Fix compilation of PCRE2 under Intel CET
Ubuntu 20.04 enables -fcf-protection by default.

PCRE2 10.35 sees this but complains that -mshstk is also necessary
to build its JIT. Detect whether the compiler is enabling Intel CET
automatically, and if so, build PCRE2 with the right options.

Pick-to: 5.15
Change-Id: I3440e689b81f4f07055f211a4fa7331a43eb410d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-05-27 22:29:55 +02:00
Friedemann Kleint
9c31acbf47 Move windowsuiautomation API support into QtGui
Task-number: QTBUG-83255
Change-Id: Ibface71931b6384494842ba9744d76f738c5ca85
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-05-27 22:28:41 +02:00
Tor Arne Vestbø
6a0995525d macOS: Fix use of deprecated NSOffState
Pick-to: 5.15
Change-Id: Ic799c52350f99a14f57efa9907db772d19264ca2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-05-27 20:26:11 +00:00
Joerg Bornemann
e7d12b876a Fix qmake builds of Windows applications against a CMake-built Qt
QMake's windows.prf expects the WinMain library to be named
'qtmain[d].lib' and not 'Qt6WinMain[d].lib'. We're renaming the
library to 'qtmain[d].lib' in the CMake build now to avoid adjusting
the qmake build of Qt.

Also, we have to add the private library shell32.lib to WinMain to
make it appear in qtmain.prl and having it linked to Windows GUI
applications.

Fixes: QTBUG-84425
Change-Id: Ia94090b89e037b17ebfded359b293c8586371d59
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-05-27 21:44:39 +02:00
Tor Arne Vestbø
ce2bc0e2d5 Move CoreText font engine/database to QtGui
Task-number: QTBUG-83255
Change-Id: Id34ed1759fdebbb1d09e51009f0370736002167c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-05-27 17:51:24 +02:00
Mårten Nordheim
cbb9c53704 QNetworkReplyFileImpl: Fix typo
Causes emission to not happen and prints a warning

Pick-to: 5.15
Change-Id: Ie80cc89549741079c243e6fd4269f793bccca9fd
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-05-27 12:43:01 +00:00
Tor Arne Vestbø
da1b0d2d6a Move FreeType font engine/database to QtGui
Task-number: QTBUG-83255
Change-Id: If6be7057d6bd25b34acd99e18658744161985ed0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-05-27 14:42:59 +02:00
Ulf Hermann
a64a0ce331 Add a QPropertyAlias
A property alias is the equivalent of the "alias" keyword in QML. It
provides the same API as QProperty, but redirects any access to the
QProperty it was initialized with. When the original property is
destroyed the binding becomes invalid and ignores any further acccess.

Task-number: QTBUG-84370
Change-Id: I0aef8d50e73a2aa9e7703d51194d4c5480573578
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-05-27 14:41:52 +02:00