Commit Graph

46219 Commits

Author SHA1 Message Date
Shawn Rutledge
f25bd998a7 Don't return a touchscreen from QPointingDevice::primaryPointingDevice()
This was causing some bogus failures in Qt Quick autotests.
Existing APIs like QQuickWindow::mouseGrabberItem() are not really
compatible with the idea of a mouse-less system; but perhaps we can
revisit this later.

Task-number: QTBUG-85114
Change-Id: Id1c2e5894e5cf13a79998aaea28d5f42fad920cf
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-06-19 08:13:36 +02:00
Giuseppe D'Angelo
97af1b839c Use | to OR some related flags
And not +. Guess what, this was "accidentally" working around
a number of bugs, most importantly QTBUG-75172 (which is caused by
QTBUG-74639 and probably others).

Change-Id: If13810d9408f2be7b87f0d259737bff8cacc6f7b
Pick-to: 5.15
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: David Faure <david.faure@kdab.com>
2020-06-19 06:13:35 +00:00
Lorn Potter
3d452492c6 wasm: fix network reply timeout and error handling
Fixes: QTBUG-83728
Change-Id: Ib8184a497a028949eea20e9d189d79da51ccc290
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit b2e998d467)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-06-19 06:43:26 +10:00
Shawn Rutledge
4c9bab54f0 xcb: fix seatId to be master-keyboard-id << 16 | master-pointer-id
Amends 6589f2ed0c to match the comment.
If the master device we found is a keyboard, then its own ID is the
keyboard ID, and the attachment is a pointer; but if the master device
we found is a pointer, then its attachment is the master keyboard.
In practice, this gives all devices the same seatId on normal
single-user sessions.

Change-Id: Ibe7d7cdee7b3fe642efacd0349c109271059cb36
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-06-18 19:22:27 +02:00
Alexandru Croitor
e2b2cd9397 CMake: Improve automatic compiler embedding into the Qt toolchain
Embedding the initial CMAKE_CXX_COMPILER into qt.toolchain.cmake
breaks Boot2Qt builds, because the CXX environment variable is not
used anymore when building qtsvg or other projects.

Disable automatic embedding when cross-compiling, while keeping it
enabled for non-cross-compiling cases (to keep Windows and
and ICC configurations working).

Allow opting in or out of the embedding in case if the default is
wrong, via QT_EMBED_TOOLCHAIN_COMPILER.

Task-number: QTBUG-85067
Change-Id: I1d8f9f580bc379b77c34eefb5728bb49f93cc81a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-06-18 19:13:11 +02:00
Shawn Rutledge
28ef8d283d Add QPointingDevice argument to every QWSI input event handler function
We want every QInputEvent to carry a valid device pointer. It may be
some time until all QPA plugins are sending it, but it's necessary to
provide the functions for them to start doing that.

We now try to maintain the same order of arguments to all the functions.
handleTouchEvent(window, timestamp, device, the rest) was already there
(except "device" has changed type now), and is used in a lot of platform
plugins; so it seems easiest to let that set the precedent, and modify
the rest to match. We do that by adding new functions; we can deprecate
the older functions after it becomes clear that the new ones work well.

However the handleGestureEvent functions have only ever been used in
the cocoa plugin, so it's easy to change their argument order right now.

Modify tst_qwindow::tabletEvents() to test new tablet event API.

Task-number: QTBUG-46412
Change-Id: I1828b61183cf51f3a08774936156c6a91cfc9a12
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-06-18 18:53:40 +02:00
Andrei Golubev
68de38ded1 Document QPromise API
Documented QPromise. Added snippets under auto tests
to ensure they are compiled and run in CI.

Task-number: QTBUG-81586
Change-Id: I20084e38f9d2f6fc8540f95ee03ec3d2827177e8
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-06-18 18:28:41 +03:00
Simon Hausmann
b0f445a152 Add support for QNotifiedProperty to the moc
Change the meaning of Q_PRIVATE_QPROPERTY to imply that the property is
implemented using a QNotifiedProperty. That requires passing the owner
object instance to the value and binding setters.

Similarly, detect QNotifiedProperty members like QProperty.

Change-Id: If49bbb04c8ccd4a661973888c50d2d556c25034f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-06-18 17:26:11 +02:00
Tasuku Suzuki
31d2804e7a Fix build without features.highdpiscaling
Change-Id: I9fee7303d53be228546accbcdf29a63b52e3f625
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2020-06-18 23:56:04 +09:00
Dominik Holland
e11939afee Fix the vertical alignment of images in a text document
Try to align with the HTML standard as much as possible.
AlignBottom is now really the bottom of the line (not the text).
AlignMiddle is between AlignTop and AlignBottom.

Change-Id: Ia067b96209c2ab0becbff99cf15bb8ab193ee2c6
Fixes: QTBUG-84981
Pick-to: 5.15
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-06-18 14:59:02 +02:00
Karsten Heimrich
c1e5044d22 Fix QString{Encoder|Decoder} documentation
Change-Id: I8e29846db77581953d90c818060950744cb9f521
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2020-06-18 14:45:54 +02:00
Andy Shaw
3ce2fab0a6 Android: Pass a null Bundle when calling QtActivityDelegate.onCreate
The onCreate function expects a Bundle variable to be passed in so it
needs to get a null Bundle in this aspect to prevent it from crashing
due to the lack of parameters.

Change-Id: I8cc4b62d9e8db170b957f7574360033e91ca3493
Pick-to: 5.15 5.12
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-06-18 14:28:58 +02:00
Assam Boudjelthia
4041610cb2 Android: warn about too long build paths on Windows
If Gradle build fails on Windows, check for java files that exceed
the max length of 260 that Gradle can handle, then warn about the length
issue.

Pick-to: 5.15
Task-number: QTBUG-83875
Change-Id: Ia7462bc816b3efa4ba9fdd0f179fdc4c06e23248
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-06-18 12:17:34 +00:00
Giuseppe D'Angelo
1face78345 QOGLVAO::Binder: unexport a value class
Change-Id: Idd0261a30599d0eaeb6faffd0ff5615b5c45b670
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-06-18 13:03:26 +02:00
Alexandru Croitor
87c4812b6c CMake: Query public target defines when generating module .pri files
Assuage the fears in the previous commit, by actually querying and
using the public defines set on a target, rather than hardcoding one
single QT_FOO_LIB define + the extra namespace define.

This should future-proof .pri file generation for qmake mixing.

Amends 3452b08df6

Task-number: QTBUG-84781
Task-number: QTBUG-84881
Change-Id: Ide68ecf3f89be6d5462cfe43706c27f9cb53394f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-06-18 12:58:02 +02:00
Alexandru Croitor
ed20023760 CMake: Fix namespace builds for qmake mixing
While we recorded the namespace define in the CMake generated Targets
file, we also have to record it in qt_lib_core.pri, so that qmake
knows to use the define when building other modules / apps.

It does scare me what other MODULE_DEFINES we might be missing, and
that we should perhaps put all public modules defines into the
generated module .pri files.

Amends 3452b08df6

Task-number: QTBUG-84781
Task-number: QTBUG-84881
Change-Id: I3175aa9991a06a4541eb0dd153ba2e6e58c019ce
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-06-18 12:58:00 +02:00
Kyu Man Lim
f1beb28c46 Add a way to disable syntethesized bold and italic support
Using the environment variables QT_NO_SYNTHESIZED_BOLD
and QT_NO_SYNTHESIZED_ITALIC it is now possible to disable
the support for synthesized bold and italic, which is
used when the font doesn't support those variants.

Change-Id: Ic1a6984858e1260f252662689705553073859df4
Task-number: QTBUG-83124
Pick-to: 5.15
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2020-06-18 12:07:36 +02:00
Lars Knoll
7b5d5faae1 Remove unused functionality from QTypeInfo
Change-Id: I10fe4cde7a18047599e656cc3bb67b0dfe18a986
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-06-18 12:02:51 +02:00
Friedemann Kleint
7e83f09ead Move UNIX services into QtGui
Task-number: QTBUG-83255
Change-Id: I95cd25c6e18ffb46955acc76d6cab551d1c8f5ae
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-06-18 12:02:26 +02:00
Friedemann Kleint
ab01885e48 QtGui: Fix duplication of logging category lcQpaFonts
Move it to qplatformfontdatabase.h.
Amends 6be9830d86.

Task-number: QTBUG-83255
Change-Id: I0a3807dc49128c8ddd1dfe7d725528c1a852950b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-06-18 12:02:21 +02:00
Fabian Kosmale
add1807d44 QMetaMethod: implement returnType via returnMetaType
Change-Id: I6c77331c3bfe83b00e4bbdf960216df696aadabd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-06-18 11:57:38 +02:00
Andy Shaw
a60f266d41 Android: Only emit the signals once when doing multiple file selection
Change-Id: Ie57908f5e882ef4f85f4199ecb06c09ae5d8ae2a
Pick-to: 5.15
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2020-06-18 11:54:20 +02:00
Andy Shaw
59b03992ab Undef Q_DECL_ENUMERATOR_DEPRECATED when having no deprecation warnings
Since Q_DECL_ENUMERATOR_DEPRECATED can be explicitly set to something
other than QT_DEPRECATED, then it needs to be explicitly undefined
when QT_NO_DEPRECATED_WARNINGS is used to prevent it from showing a
warning.

Pick-to: 5.15
Change-Id: Ibe73ff5e7b5aa5eff93d0c4c0a38a33855a9a330
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-06-18 11:54:09 +02:00
Mårten Nordheim
f63c810485 QNAM: Fix my silly leftover mistake
I removed the line locally, and then added it back for testing and
forgot to remove it again.

Amends a0bfa4e1f8.

Task-number: QTBUG-84907
Change-Id: I7d6d0237742f4c3fc3ca0a2532d776325f396aab
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-06-18 09:52:12 +00:00
Alexandru Croitor
976fa5134a CMake: Use intelcet flags for bootstrap and qmake
This should fix build failures on Ubuntu 20.04.

Amends fa98adbd04

Change-Id: Iff399faff0cf06f5b88d756b1f632b8798069578
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-06-18 11:51:41 +02:00
Alexandru Croitor
8b701f9bd9 CMake: Don't use a lib prefix for MinGW prl files
This is to be consistent with qmake.

Change-Id: I17b8a3e4649d035d1d871e4f124952cded7f6664
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-06-18 11:51:41 +02:00
Alexandru Croitor
06557312d2 CMake: Improve .prl dependency tracking
Previously .prl files were created via add_custom_command with a
POST_BUILD command. This means they were only created after linking
the libraries, and that whenever a relinking happened, dependees had
to rebuild many parts of their target.

Ideally we would use generator expressions in the OUTPUT argument, but
versions up-to CMake 3.18 don't support doing that.

A workaround is to create and depend on a .prl file name without
generator expressions, and as a side effect also create a .prl file
that does use generator expressions, but don't specify it as an
OUTPUT.

This seems to work well, and improves the dependency tracking issue,
at the cost of one more file copy per .prl file whenever it changes.

Change-Id: I7dd99777fec5a08552503bdbafb6116f93ebe66b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-06-18 11:51:41 +02:00
Shawn Rutledge
f04cb9ed63 Begin writing tst_QInputDevice autotest
...starting with a new feature: registering different devices at
different seats and verifying their capabilities and that we can get
them back again.

Change-Id: I8e58a49080633753d02a76e5fdc4932f5c674e0a
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2020-06-18 08:05:44 +02:00
Karsten Heimrich
b251d6137d Fix examples build after a061a64642
Change-Id: I4d10b4439e5a858437751b00efde2bf8c467e857
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-06-17 22:40:02 +02:00
Lars Knoll
3898c022a6 Remove some dead code
Change-Id: I4e3906d5e6313014b207aa7bc63a0ff5e21b0261
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-06-17 22:05:27 +02:00
Lars Knoll
a42dd2ffe0 Cleanup float-equal warnings
Consistently use the macro from qcompilerdetection.h instead of manually
disabling the warning for three different compilers.

Change-Id: Id59d30047c8a504e1082d7e47c02f4746fddf9d6
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-06-17 22:05:21 +02:00
Lars Knoll
4d90725e77 Disable float-equal warnings in QGenericMatrix
Those warnings can cause compile errors if someone instantiates the
equality operator.

Pick-to: 5.15
Change-Id: I95fab87a424b2d359a8f3e22134f9d3ff6219703
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-06-17 22:05:15 +02:00
Friedemann Kleint
57d46aef2a sync.profile: Remove obsolete modules
Task-number: QTBUG-83255
Fixes:  QTBUG-85065
Change-Id: I167f8bdee4229bb6265e154dcf19cee78b53e9f6
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-06-17 21:29:36 +02:00
Robert Loehning
2242887e5c Use dedicated function for chopping QByteArray
Change-Id: I03f5e782a3d5d63540db9a5fdd1d432e71b5eec5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-06-17 19:29:10 +02:00
Oliver Wolff
2f2340c97e qmake: Fix generation of Visual Studio projects
While removing winrt code too much code was removed. The
ProjectConfiguration is needed for every Visual Studio project.

This patch amends 45b0f1be68

Fixes: QTBUG-85086
Change-Id: Ic8b42583a159d5b69c0c4e82f46dd98ad8e54ce2
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-06-17 19:14:52 +02:00
Friedemann Kleint
a1f3ab1cad QtGui: Update CMakeLists.txt after adding QInputDevice
Run pro2cmake.py again, amending
6589f2ed0c.

Change-Id: I27178f412bcf9d3731fbd06b4099ca4faec07a5c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-06-17 18:05:56 +02:00
Joerg Bornemann
3b75024a94 CMake: Simplify the qt_path_join function
Use ARGN that already has the out_var parameter removed.

Change-Id: I79438caa4333a11493456fa219448ad500518880
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-06-17 18:05:46 +02:00
Giuseppe D'Angelo
a97cda8b8b QMath: make the math-related functions templates
This way we can take and return more datatypes than qreal,
just piggy-backing on the std:: functions (which take any
integral and any fp datatype).

This makes these functions pure ADL enablers (like qSwap).
A type (hi, QAngle!) that wants to have math related functions
simply needs those defined in its own namespace using the
"standard" names (sin, cos, etc.); and we'll find them
using the q-prefixed function.

qCeil and qFloor signatures however still return int
to avoid too much breakage.

The FP-related functions (qIsInf, etc.) have been left
alone. Those are "special"; a lot of care is in qnumeric
because some implementations define them as macros, which
blocks any possibility of user-defined overloads found via
ADL.

[ChangeLog][QtCore][QtMath] The math-related functions
(such as qSin, qCos, qPow and so on) can now take an
arbitrary parameter rather than just qreal. They will do
a ADL-enabled call to the respective free function, using
the functions in namespace std as a fallback. Moreover,
they will now return whatever datatype is returned by the
free function (e.g. long double if the call is placed on
a long double).

Change-Id: I111084eda52556663802e65a85e082187c2a6861
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-06-17 17:56:48 +02:00
Joerg Bornemann
d2a04cf165 CMake: Fix .prl generation and installation for plugins
The referenced Qt libraries had paths to the build directory, instead
of the $$[QT_INSTALL_LIBS]/ prefix. The reason was two-fold:

1. QT_BUILD_LIBDIR had the wrong value, namely
"${QT_BUILD_DIR}/platforms/qfoo".

2. The QtFinishPrlFile.cmake script was called with a wrong OUT_FILE
parameter, placing the final .prl file in the build lib dir.

As drive-by change, surround arguments for QtFinishPrlFile.cmake that
can contain spaces with double quotes.
This amends 8c8c0f65e3.

Task-number: QTBUG-84781
Change-Id: I7188b799716576b3296ee7b2d460489867b9967a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-06-17 15:13:44 +02:00
Alexandru Croitor
e67829e655 CMake: Fix MinGW prefixes / suffixes again
Document what qmake expects and what CMake creates by default.
This change should fix qmake mixing for MinGW, where the WinMain
library was called qtmain.a instead of libqtmain.a.

Amends f626c73b28
and 9b0e23ef8a

Task-number: QTBUG-84781
Change-Id: I059db13f8d8a0aab8bd3fc69d4537a2b63687394
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-06-17 15:13:44 +02:00
Alexandru Croitor
9862cb4532 CMake: Write QT_MAC_SDK_VERSION into qconfig.pri
Task-number: QTBUG-84781
Change-Id: I9f4e979a7404dd45286e0a85a6f3772e53a2fd0b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-06-17 15:13:44 +02:00
Alexandru Croitor
435fe4b13d CMake: Add additional info which was missing in qconfig.pri
Mostly compiler version numbers.

Task-number: QTBUG-84781
Change-Id: I10e92fdfd4e603c9b763a51a0e09b6c4a2c75ac7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-06-17 15:13:43 +02:00
Alexandru Croitor
3452b08df6 CMake: Record info about namespaced build for qmake
To make sure qmake generates appropriate rules when building other
applications.

Task-number: QTBUG-84781
Change-Id: I75618575602be820bf20a8067e3a6ee3ff7e7950
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-06-17 15:13:43 +02:00
Alexandru Croitor
17d8b54cbc CMake: Fix usage of qt_process_qlalr when cross compiling
qtremoteobjects has a tool that uses qt_process_qlalr. The function
doesn't have a check to see if the consuming target is an imported
target, to skip doing any work when corss compiling.

Fix it, like we do in qt_extend_target.

Change-Id: Ide389a371aa07225f08689d15125c04d8b0e3916
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-06-17 15:13:43 +02:00
Shawn Rutledge
9b72900834 Update QTabletEvent device_information manual test
- stop using deprecated accessors in QTabletEvent and QMouseEvent
- position() and globalPosition() provide high resolution so
  we don't need to display hi-res global pos separately
- keep a pointer to the last-seen QPointingDevice instance
  rather than copying fields out of it; it will only be deleted
  if the platform plugin does that (usually only at exit or
  when it's unplugged)
- show seat ID
- show platform-specific device ID

Change-Id: Ic34e1d1256d6956867992db831c2e66bdda7001e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-06-17 09:12:20 +02:00
Shawn Rutledge
4e145de8a6 Make QInputDevice::devices() return a QList
There was a decision to use QList consistently in public API, now that
it's supposed to perform as well as QVector. Amends
6589f2ed0c

Task-number: QTBUG-46412
Task-number: QTBUG-72167
Change-Id: I30004792667ee0581a433409ac2e20ffc645e952
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-06-17 09:12:03 +02:00
Shawn Rutledge
6589f2ed0c Introduce QInputDevice hierarchy; replace QTouchDevice
We have seen during the Qt 5 series that QMouseEvent::source() does
not provide enough information: if it is synthesized, it could have
come from any device for which mouse events are synthesized, not only
from a touchscreen. By providing in every QInputEvent as complete
information about the actual source device as possible, we will enable
very fine-tuned behavior in the object that handles each event.

Further, we would like to support multiple keyboards, pointing devices,
and named groups of devices that are known as "seats" in Wayland.

In Qt 5, QPA plugins registered each touchscreen as it was discovered.
Now we extend this pattern to all input devices.  This new requirement
can be implemented gradually; for now, if a QTWSI input event is
received wtihout a device pointer, a default "core" device will be
created on-the-fly, and a warning emitted.

In Qt 5, QTouchEvent::TouchPoint::id() was forced to be unique even when
multiple devices were in use simultaneously. Now that each event
identifies the device it came from, this hack is no longer needed.

A stub of the new QPointerEvent is added; it will be developed further
in subsequent patches.

[ChangeLog][QtGui][QInputEvent] Every QInputEvent now carries a pointer
to an instance of QInputDevice, or the subclass QPointingDevice in case
of mouse, touch and tablet events. Each platform plugin is expected to
create the device instances, register them, and provide valid pointers
with all input events. If this is not done, warnings are emitted and
default devices are created as necessary. When the device has accurate
information, it provides the opportunity to fine-tune behavior depending
on device type and capabilities: for example if a QMouseEvent is
synthesized from a touchscreen, the recipient can see which touchscreen
it came from. Each device also has a seatName to distinguish users on
multi-user windowing systems. Touchpoint IDs are no longer unique on
their own, but the combination of ID and device is.

Fixes: QTBUG-46412
Fixes: QTBUG-72167
Task-number: QTBUG-69433
Task-number: QTBUG-52430
Change-Id: I933fb2b86182efa722037b7a33e404c5daf5292a
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-06-16 22:06:56 +02:00
Shawn Rutledge
0a2e3ce85c Always show a submenu on its parent menu's screen
QWidget::screen() was added in b455a863a1
and this is another good use for it (in 5.15 and newer).

Amends c068edcecf

Pick-to: 5.15
Fixes: QTCREATORBUG-24195
Task-number: QTBUG-76162
Change-Id: Ifaafe9b45fafaae220da54bbf3bc7a568e7953f9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-06-16 20:54:14 +02:00
Joerg Bornemann
4ab5432081 CMake: Write object libs of Qt resources to .prl files
Since commit e343affd63 we're creating object libraries for Qt
resources in static libraries. Those must be reflected in the
generated .prl files for static builds of Qt.

In qt_add_resource, we now calculate the install locations of the
object files of rcc-generated C++ files and save them in the target
property QT_RCC_OBJECTS. This property is then passed to
QtFinishPrlFile to write the object file paths to the .prl file.

Change-Id: Ic383892d723d02fc91f712bc2dbcbc90babad074
Reviewed-by: Simon Hausmann <hausmann@gmail.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-06-16 17:56:35 +02:00
Joerg Bornemann
bd2a14ff98 CMake: Do not use $$[QT_INSTALL_LIBS/get] in generated .prl files
We do not support building with qmake from the build directory in prefix
builds. Therefore we can just use the standard QT_INSTALL_LIBS property
instead of the /get variant.

Change-Id: I82ccaf1894fb1dccc9ec18b4984b582b555ce0f8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-06-16 17:56:21 +02:00