Commit Graph

44826 Commits

Author SHA1 Message Date
Volker Hilsheimer
943cb0999d Header-review: add Q_DECL_DEPRECATED_X macro to deprecated method
Change-Id: I486d479b2e07042b397869aab117f44e65539f1e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-03-17 18:20:04 +01:00
Simon Hausmann
733ae8a04b Make it possible to use QTaggedPointer within classes
A common pattern in declarative is to use the unused bits in linked list
next pointers for additional information storage. The "next" pointer is
typically then a tagged pointer of the containing class, which is not
fully defined yet. Therefore alignof() can't be used at tagged pointer
instantiation time. This patch delays the calls to alignment, etc. until
the corresponding functions are used, as in principle the tagged pointer
is just a quintptr and no additional information should be needed until
operating on it.

Change-Id: I87a3578ee921d471e1b60ed5903b549ef0610b97
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-03-17 17:55:27 +01:00
Simon Hausmann
8337684b04 Fix docs suggesting that it's possible to draw to the X11 screen
It's not possible anymore, since many years. The desktop's don't use the
X11 root window anymore :)

Fixes: QTBUG-82880
Change-Id: I923f29f23e61d93640cacb2ac20620c5ddc480b9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-03-17 17:19:44 +01:00
Edward Welbourne
0677525f2e Update Unicode license for CLDR and UCD
Task-number: QTBUG-82747
Change-Id: I6bbecaf3f0a8f8e7e0ad31074d88dea7ec98dff2
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-03-17 16:17:49 +01:00
Allan Sandfeld Jensen
b430826501 Fix memory leak on new QThreadPool::tryStart version
Also documents the ownership of the traditional tryStart better, and
remove a redundant check.

Change-Id: I06202465b782926724fa33a901d08c1626f87373
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-03-17 16:13:48 +01:00
Volker Hilsheimer
1b4d01d163 Add 'since' tag to documentation of new enum value
Change-Id: I400dc1f2d3dba0fa50b2bcb5e4efbcfc0ad912fd
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-03-17 15:37:44 +01:00
Cristian Adam
7150b07041 QLocale: Fix test on MinGW 8.1.0 32 bit
The call of _control87 would crash because of the previous test.

Change-Id: I254efe9c2e9892a473a02663e5ff7016791d5d6d
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2020-03-17 15:35:34 +01:00
Friedemann Kleint
749e37efc5 Property binding system: Fix developer build with MSVC 2019 (16.4.1)
- Fix wrong forward declaration
- De-inline constructor of QUntypedPropertyBinding(), fixing:

qtbase\include/src/corelib/tools/qshareddata.h(184): error C2027: use of undefined type 'QPropertyBindingPrivate'
qtbase\include/src/corelib/kernel/qpropertyprivate.h(60): note: see declaration of 'QPropertyBindingPrivate'
qtbase\include/src/corelib/tools/qshareddata.h(184): note: while compiling class template member function 'QExplicitlySharedDataPointer<QPropertyBindingPrivate>::~QExplicitlySharedDataPointer(void)'
qtbase\src\corelib\kernel\qproperty.h(143): note: see reference to function template instantiation 'QExplicitlySharedDataPointer<QPropertyBindingPrivate>::~QExplicitlySharedDataPointer(void)' being compiled
qtbase\src\corelib\kernel\qproperty.h(142): note: see reference to class template instantiation 'QExplicitlySharedDataPointer<QPropertyBindingPrivate>' being compiled
qtbase\include\/src/corelib/tools/qshareddata.h(184): warning C4150: deletion of pointer to incomplete type 'QPropertyBindingPrivate'; no destructor called
qtbase\include\/src/corelib/kernel/qpropertyprivate.h(60): note: see declaration of 'QPropertyBindingPrivate'

Amends 9f9049b486.

Change-Id: Idd613e2487d5ab7f8ead74747acd976d5d210c28
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-03-17 12:59:31 +01:00
Sona Kurazyan
b345087dde Log the possible socket error code for the flaky test
tst_QSocks5SocketEngine::simpleConnectToIMAP() is flaky. It may be
useful to log the socket error, to provide more info in case the
test fails again.

Change-Id: Ia5518dce13fd9da1fa5bfb3d5cf3a52a908b8698
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-03-17 11:22:59 +01:00
Mitch Curtis
0dcdfc1ee4 src\angle\src\config.pri: remove references to gnuwin32
gnuwin32 repository was removed from Qt 6 in f96355679.
If we don't do this, it could look for the wrong version of flex.

Done-with: Andy Shaw <andy.shaw@qt.io>
Change-Id: I15cd68ceb17c33dfc6316a469bca706100bfce60
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2020-03-17 11:05:16 +01:00
Tor Arne Vestbø
165de10027 Introduce helper class QTaggedPointer
Useful for attaching small bits of information in the alignment bits of
a naked pointer. For use in the new property system as well as in
qtdeclarative (where currently a similar class exists as private API).

Change-Id: Idf9b93e714e15129f302e16425dbeda94bcd207b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-03-17 10:01:04 +01:00
Fabian Kosmale
7ef3826497 Introduce always constexpr variants of qNextPowerOfTwo
Amends e464e1eb8e. qNextPowerOfTwo has the
same issue as qCountTrailingZeroBits.

Change-Id: Ib1905986e932ac130bce7a1d98f4f7b5ef73991f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-03-17 10:01:03 +01:00
Alexandru Croitor
f66a5c2d61 CMake: pro2cmake: Handle javascript files not present in qmldir
If a file is present in a QML_FILES variable inside a qmake .pro
file, but is not listed in the static qmldir file, mark the file
so no qmldir entry created for it.

Change-Id: I3ec77b6eedf70ea9124bf7f447ee3477204bc4f7
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-03-17 09:18:05 +01:00
Alexandru Croitor
605a36800f CMake: pro2cmake: Handle system tiff feature
Don't exclude it, because we use it in qtimageformats.

Change-Id: I0004830580dd9711cf7a5bd934ecd5a7f9036800
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
2020-03-17 09:18:01 +01:00
Alexandru Croitor
beebd7f4b1 CMake: Regenerate projects and adjust after old harfbuzz removal
Change-Id: I3a00334f2b29caa739d6a1d8edd4c7311dda812f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-03-17 09:17:57 +01:00
Eskil Abrahamsen Blomfeldt
cfcf88e259 Fix compilation with -no-feature-regularexpression
This -no-feature has probably not been tested for a while
and seems to have rotted a bit, both some unprotected
uses and some warnings on unused parameters.

Change-Id: Ie20a06c78d3b4c36860dab49d6615eaa8ffc9077
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-03-17 09:17:08 +01:00
Lars Knoll
dee55af0a5 Remove QRegExpValidator
As QRegExp will be moved to a compat library in Qt 6.

Change-Id: I181aec45bd798f49d2c50a0e7fb64782e004b854
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
2020-03-17 08:35:50 +01:00
Lars Knoll
befd198c15 Remove QRegExp usage from the the OCI plugin
Change-Id: I95009b5bc6f9ce4356e707e07c5cb7346aaf9245
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2020-03-17 08:35:35 +01:00
Lars Knoll
b798b2cbb4 Remove QRegExp usage from Qt PrintSupport
Change-Id: I32daae8e5028084dd12f0aba4da7920f995d919f
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
2020-03-17 08:35:31 +01:00
Lars Knoll
3a5342163a Bump the minimum requirement for harfbuzz to version 2.6.0
That will give better text rendering capabilities in Qt and allow
us to clean up some more code.

Change-Id: Ia11b7ab57cda8320047381224989766b854e8ca5
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2020-03-17 01:44:35 +01:00
Lars Knoll
47b1e883e4 Remove the old harfbuzz library and integration code
It's not used anymore. harfbuzz-ng is a requirement in Qt 6 if you
want any open type shaping.

Fixes: QTBUG-82881
Change-Id: If7100aebdcfa078a999608bb8f07a2ef3a79d282
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2020-03-17 01:43:29 +01:00
Lars Knoll
8863bfa603 Remove old harfbuzz support from QFontEngine
Change-Id: I1595ce32d2b88b98157bcf8020ac22db93d7ea64
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2020-03-17 01:43:11 +01:00
Lars Knoll
f081348472 Remove old harfbuzz dependency from QTextEngine
We're either using harfbuzz-ng or disable shaping now.

Change-Id: Ia80bc4671efb20eabb35d7560abc774cdad7f424
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2020-03-17 01:43:04 +01:00
Lars Knoll
dd7d8304bb Remove harfbuzz dependency from qunicodetools
Copy the relevant harfbuzz code over from Harfbuzz into qunicodetools.cpp

This is basically the attribute functions from the different harfbuzz
shapers. Those methods do not require any font support but operate
purely on unicode input data.

Adjusted the code to use Qt's own data structures and enums (QChar::Script
and friends) instead of the harfbuzz equivalents.

The code is 100% copyright The Qt Company, so we can do this without
requiring any attribution.

Change-Id: I8262ba34eae1837f031f07d1b6d9917c0224e160
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2020-03-17 01:42:58 +01:00
Lars Knoll
76ced3f179 Change signature of initScripts to take out pointer to a QVLA<ScriptItem>
This avoids one additional copy of data that we've been doing before.

Change-Id: I3fae0ebe0cded632b41fdcf7efc01d5c7f2dc181
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2020-03-17 01:42:52 +01:00
Lars Knoll
5af2016b7c Remove QRegExp usage
It's deprecated in Qt 6.

Change-Id: I9ea27ed31a8df39670c0a50c9cb182c7f950ad96
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2020-03-16 22:04:33 +01:00
Lars Knoll
45e6835727 Remove unused include
Change-Id: I98f018c63295e09c5e374741583d191eca97de3b
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-03-16 22:04:00 +01:00
Lars Knoll
9981330157 Get rid of QRegExp from the xpm image handler
Change-Id: Ic6bc89c7ffbf1c2f615e9b89aff7c64201ac2837
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-03-16 22:03:55 +01:00
Simon Hausmann
bc64ccbf00 Re-generate various CMake projects and configure after merge
Change-Id: I02f5926c6664aab518c5c81e0c33dca0818a1871
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-16 20:43:56 +01:00
Simon Hausmann
c2f167b412 Merge "Merge remote-tracking branch 'origin/5.15' into dev" 2020-03-16 20:43:50 +01:00
Simon Hausmann
ff922e7b87 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/corelib/kernel/qmetatype.cpp

Change-Id: I88eb0d3e9c9a38abf7241a51e370c655ae74e38a
2020-03-16 18:41:27 +01:00
Simon Hausmann
9f9049b486 Initial import of the Qt C++ property binding system
This implements the core value based property binding system with
automatic dependency tracking. More features are to be added later, and
the documentation will need further improvements as well.

Change-Id: I77ec9163ba4dace6c4451f5933962ebe1b3b4b14
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-03-16 18:19:45 +01:00
Alexandru Croitor
3c7c60e322 cmake: Regenerate projects
Change-Id: I0cd4f34b0df0227789805f30f474ff6aa275078f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-03-16 17:58:00 +01:00
Tor Arne Vestbø
77885f8402 cmake: Remove APPLE prefix from platform names
None of the other platforms have it.

Change-Id: Ib448c2c03ba03f711b507ef391977c0e6aa7c192
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-16 17:57:56 +01:00
Tor Arne Vestbø
db745fdd2d cmake: Fix naming when referring to Apple macOS
Change-Id: Iafb5e448d0d65d42f788464fc600594a5666f9af
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-16 17:57:52 +01:00
Leander Beernaert
1b7008a3d7 CMake: Fix Windows VM Test Runs
Simplify the handling of simd specific sources. The previous
implementation was causing simd instructions to bleed into the main
library.

The tests were failing because the avx instruction were leaking into
Qt6Gui due to the previous problem. This in turn caused any test which
required Qt6Gui code run to crash since it is not possible to run avx
instruction in the VMs.

This patch also disables PCH for the simd sources as they result in
warnings related related to using PCH header not compiled for the
architecture in question. The latter can cause the build to fail in
conjunction with warnings as errors.

Change-Id: I1be98f2f5e967f33793d6a2e6134a24ef1709566
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
2020-03-16 17:30:38 +01:00
Mårten Nordheim
3e9014ed61 QNetworkReply: stabilize sslSessionSharing test
Sometimes this test would fail due to the session not actually being
reused. The cause of this was that the requests were sometimes being
completed 1-by-1, enabling the individual requests to re-use the
already-connected socket completely because it stayed connected.

Setting the Connection-header to close lets us be sure that
the socket cannot be re-used when the request is finished.

Fixes: QTBUG-82846
Change-Id: I5da8baa50a3a45fb60f1e1613e500e3e9c034fb0
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-03-16 12:12:29 +01:00
Edward Welbourne
75f52bd0dd Update the latest public suffix list
Task-number: QTBUG-72623
Change-Id: I8e0450c41882f00a49264a99342eb2dcf1959abe
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-03-16 08:52:49 +01:00
Edward Welbourne
ebb2d85612 Record that we're still up to date with latest dbus
DBus does have dbus-1.13.* releases these days, as well as its stable
1.12.* releases, but there's no change in the fragments we've
extracted from its headers, since the last (1.12.12) release we
checked against. We're thus in sync with 1.12.16 and 1.13.12.

Fixes: QTBUG-82748
Change-Id: Ic550e3cd7486db712643711d010f5b45c347a95b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-03-16 08:52:10 +01:00
Edward Welbourne
ebcd8e16db Deduplicate day-name data in QLocaleXML files
This is a follow-up to commit ebb0212133.
The day name data appeared twice in the XML files.
Skip the second copy, saving 8.8% of the intermediate file-size.
This makes no change to generated QLocale data.

Change-Id: Ic2cc543a2a85cbb1d2d47ebac7df4fa9ad6ee0a7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-03-16 08:51:46 +01:00
Fabian Kosmale
e464e1eb8e Introduce always constexpr variants of qCountTrailingZeroBits
qt_builtin_ctz is unfortunately not constexpr on MSVC, so the whole
function cannot be used in constexpr contexts, unless v is exactly 0. As we
don't have std::is_costant_evaluated until C++20, we need to introduce a new
helper function, which always works in constexpr contexts.

Change-Id: I36290acb61e430d6bdb3da112a9b2263be4b9fbf
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-03-16 08:21:49 +01:00
Lorn Potter
d6ddd21257 wasm: remove uneeded platform plugins from build
Wasm does not use minimal, offscreen or qvnc platform plugins.

Change-Id: I3a1919a260280ffdff33b68502d488f71f2b0c13
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2020-03-16 10:06:51 +10:00
Lorn Potter
e7ae28cfb9 wasm: do not move or resize Popup windows
Fixes: QTBUG-81771
Change-Id: I1595ade444222160ac05c4564dad5b61f10a050f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2020-03-16 09:27:20 +10:00
Christian Ehrlicher
f5213ab799 QMySQL: return QVariant::ByteArray for POINT column
qDecodeMYSQLType() did not handle FIELD_TYPE_GEOMETRY and therefore the
type for a POINT column was incorrectly treated as QVariant::String.
Even the type can not (yet) be properly decoded to a QPoint, treating it
as QVariant::ByteArray is the better option here.

Fixes: QTBUG-72140
Change-Id: I12e75b326ae3acb75cb36f2e650464528bd43c0e
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-03-15 23:00:41 +01:00
Lars Knoll
cb8eb0f86c Get rid of QRegExp usage in the cocoa plugin
Change-Id: I9789e1637a17809082458e946fa7c49ab9269537
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-03-15 15:06:40 +01:00
Lars Knoll
fed4d6d78d Fix QNetworkAccessCache after QHash stability semantics change
The data structure relies on stable nodes in QHash, something that
is not guaranteed in Qt 6 anymore.

Change-Id: I9077ed404ee922893099f5eaae76d2dcea414090
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-03-15 15:05:26 +01:00
Topi Reinio
26ed956cbc Doc: Remove \contentspage commands
The command is deprecated and has no effect apart from generating
a documentation warning.

Change-Id: I30871bfd6975f8268930cce99993a8579242fdb8
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-03-15 10:48:58 +01:00
Lucas Wang
9287447a67 macOS: Ensure GL symbols are resolved from the OpenGL framework
The app or its dependencies may link against X11's libGL.1.dylib from
XQuarz, to support GLX on macOS. Doing so may place libGL earlier in
the load order than Apple's OpenGL framework, which results in dlsym
picking symbols from libGL when using the RTLD_DEFAULT lookup strategy,
breaking Qt's OpenGL support in various ways:

  QOpenGLShaderProgram: could not create shader program
  Warning: "" failed to compile!

To fix this we use RTLD_NEXT, which looks up the symbol in
dependency order of the image that called dlsym, rather than
the global load order.

Change-Id: I1ec3055a4ab0bb96566c7e196d301b30785f2dc0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-03-15 00:02:45 +01:00
Harald Meyer
91436e2409 Add native iOS file dialog
This patch adds native iOS file open and directory picking support for
the QFileDialog using the iOS UIDocumentPickerViewController class.

Change-Id: Ia724a59742650a01c62067aed3477f82ab1fd546
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-03-14 16:22:17 +01:00
Tor Arne Vestbø
395e2d9bc4 macOS: Modernize QCocoaSystemTrayIcon
The code had not been touched in a very long time and was overgrown
with weeds from pre-QPA times.

We no longer maintain an indirection through QSystemTrayIconSys,
which was a remnant from Qt 4 times.

The Objective-C helper class used for callbacks has been slimmed
down to just a simple delegate, with the actual work done in the
QCocoaSystemTrayIcon implementation, further reducing indirection.

We no longer use a custom NSView for the status bar item, something
that has been deprecated for a long time. Instead we set properties
on the NSStatusItem's button. This gives us automatic support for
drawing the icon with the right highlight, including in dark mode.

Finally, the code has been updated to modern Objective-C syntax.

Change-Id: I59706081f6b179035b8216a7a6ebc08a47cec127
Fixes: QTBUG-77189
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-03-14 14:21:28 +01:00