Test that setting QT_USE_PHYSICAL_DPI uses physical
DPI instead of logical DPI.
Change-Id: I7f89cf1af5e013454cc3d8ec3559f2719514fea3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Add auto-tests for QT_SCALE_FACTOR and QT_SCREEN_SCALE_FACTORS
Change-Id: I57bffa266be910f2ba26cb1a870e09ae202fcae0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Use a normal static variable, like the other high-dpi
variables.
Clear the stored factors in initHighDpiScaling(). This
makes auto-testing possible where the application object
is recreated for each test case and should start with
a clean slate.
Change-Id: I1831c856b5d7a2c522e62c7ed0657da771c3144f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Move all environment access to initHighDpiScaling(),
which makes it so that all environment access happens
at one point in time during QGuiApplication construction.
Replace the “qt.scaling” logging category with “qt.highdpi”,
and log each recognized env. variable. Further logging
of DPI and computed scale factors will be introduced
later on.
This also enables auto-testing of the environment variable
settings, since the auto-test can now control when the
environment is read by (re-)creating the application
object.
Change-Id: I4e62a9c0050438357a58ace5b50fb7c5950c87ce
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Wayland doesn't support explicit window activation, so the
qWaitForWindowActive() function won't actually wait for the
window to be active.
On platforms like this, we just QTRY_VERIFY() for the window
activation instead.
Task-number: QTBUG-91418
Change-Id: I5f728e6a6bcaac283c026b60e6378b9d5aaf1be5
Reviewed-by: Liang Qi <liang.qi@qt.io>
The tst_qwindow test failed with a warning that programmatically
moving the mouse cursor is not possible with Wayland.
Task-number: QTBUG-91418
Change-Id: I02ceb2af43fbc83a4e6ae09718315f5f79ff8285
Reviewed-by: Liang Qi <liang.qi@qt.io>
The test assumed that a window was registered as the active
one immediately when it was exposed. This created a race
condition on Wayland, where we would often get the wrong
active window when simulating the events.
Task-number: QTBUG-91418
Change-Id: Ie41fe5adb339bbb43d5ee5db400a198e479de386
Reviewed-by: Liang Qi <liang.qi@qt.io>
Several tests failed due to side effects of client side
decorations. We explicitly disable this when initializing
the test to make things go smoother.
In addition, the setToolTip() test tries to set the mouse
cursor position programmatically, which is not possible
on Wayland.
And finally, the qWaitForWindowActive() falls back to
qWaitForWindowExposed() on platforms where explicit window
activation is not supported. This fixes a few issues, but
in cases like focusProxy(), it means we aren't actually
waiting for the WindowActivation event. Instead of testing
for exposed twice on such platforms (Wayland), we replicate
the logic from qWaitForWindowActive() instead and rely on
automatic window activation. If it fails, we do a QSKIP, so
this shouldn't cause any flaky test failures at least.
Task-number: QTBUG-91418
Change-Id: I767c881e7cdc91f43ad357294a2c6240ab1af43c
Reviewed-by: Liang Qi <liang.qi@qt.io>
Commit 9ee554ac1d removed qrand() and
qsrand(), so commit 81896304dc removed the
functions accessing QRandEngine, but forgot to remove the actual engine.
Pick-to: 6.1
Change-Id: I26b8286f61534f88b649fffd166c41aecf55d2b1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
So to avoid QScopedPointer::swap deprecation. Side note,
QSslError is not implictly shared (although it should be, but
that's a job for Qt 7).
Change-Id: I42f7abffa81d72aac5af157074a0c3cbd20ba253
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
qtpath should replicate the functionality of 'qmake -query'. Also we
want this tool to be available in builds without qttools.
Task-number: QTBUG-75870
Change-Id: I6578fc4fc45dd940fd353a5cfe6db0a12744230a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Add the ability to select a standard and json output formats of
the Qt properties. This patch also improves the encapsulation of
QMakeProperty.
Change-Id: Ib1d232be1b430ed8456ce65cc98141282e4c3f7f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The Wayland backend needs 4 buffers and is failing when
making QVulkanWindow since there was a hardcoded limit at
3.
The Vulkan-backend to RHI already has smarter handling of
this. We want to limit the changes we do to the "legacy"
QVulkanWindow, so we keep the hardcoded max value but
increase it to 4 to accommodate the requirements on
Wayland.
Task-number: QTBUG-91418
Change-Id: I830bc30d1c2eeac1b076c50d35d5d138fd46dace
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Some vendor requires more gbm surface flags for specific purpose,
such as protected content.
Change-Id: Ie7db337e05f941b5480ffaccf61fbc94eb989ffc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
As QMultiHash uses a pointer for the data, nullptr dereference is a
thing, so check for valid d before doing anything in count()
Fixes: QTBUG-91704
Pick-to: 6.0 6.1
Change-Id: Ia20440cd7bdc03cb09c77f796fb9c5b52765eac5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When the font is large enough, using PM_SmallIconSize will get a large
lineedit,but the icon is very small. This is very unsightly, and the
style plug-in hopes to be able to define the size of the icon by itself.
Change-Id: I0e35b331301472541d3378e748dbcd074d5419a2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
It's never used or accessed. It's not part of exported API.
Change-Id: Ie60a560fb6f1315a53442f3c067363e651b80768
Reviewed-by: David Edmundson <davidedmundson@kde.org>
This reverts commit 6269438af9, and adds a test.
This change introduced QTBUG-91735, without fixing QTBUG-86857 correctly. The
code already interprets the textAlignment values from the rule, also if no
icon is set. Adding the same, or some default textAlignment to the text flags
if there is no icon doesn't work.
Fixes: QTBUG-91735
Task-number: QTBUG-86857
Pick-to: 6.1 6.0 5.15
Change-Id: Iee07e63a40e72909275f32e1caa28b33a595f879
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The code was already there, just only implemented for Linux.
Change-Id: Ib709fc1585f647a98d54fffd16663881b6d24d6f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Having a `break` after a `return` is pointless as it's never reached.
Change-Id: I30877e926c006fac45681f547e97a55410f02e43
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Qt is built with CMake since 6.0 and the QMake build system was removed
in 6.1. It's time to remove the -cmake and -qmake configure arguments
for Qt 6.2.
Fixes: QTBUG-88286
Change-Id: Ie726ec364ded025f8d93bd69b469561a6ae40aa9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Some qmake sources could be reused by other tools. It makes sense to
move such sources to the object library, to avoid additional compilation
steps and to simplify the reuse of sources.
Change-Id: I9d7bb7624019149d34d29e4b269b4f26b8aec7a4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Instead of blocking in QProcessPrivate::closeWriteChannel(), we can
handle a pending close in _q_canWrite() slot when there is no more
data to write.
Change-Id: I2a30789b6099a2ec075292348ebe33a11341bca3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Section titles are valid targets for QDoc's autolinker. When
they are identical to other valid link targets, such as for
example a class, these sections may cause invalid links.
Pick-to: 6.0 6.1
Fixes: QTBUG-91141
Change-Id: Ie9a6258d2bf83932335976d8c0b5fc59f2028ae5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
The code in qtdeclarative did not do anything at all anymore.
Change-Id: Idd97145cb74aeb4f43dfce2f282a765e90945073
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
When building a module against an installer-provided Qt,
CMAKE_INSTALL_PREFIX would default to /home/qt/work/install, which is
the install prefix of our packaging machines.
Do not hard-code the install prefix in QtBuildInternalsExtra.cmake but
use the one that is calculated from the location of
QtBuildInternalsExtra.cmake.
Pick-to: 6.1
Fixes: QTBUG-90449
Fixes: QTBUG-91475
Change-Id: I39f214efb18796a89f00a171ef190c547bba5c0a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>