Also, trim QWasmCursor as some of it was dead code.
Change-Id: If6fee3390e4c2a2c66ceaef5917d7387f8dbd46c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
If a proxy is configured on the system then we will request credentials
if needed.
Task-number: QTBUG-108874
Fixes: QTBUG-106245
Pick-to: 6.5
Change-Id: Icbea491492cde4634421b1a1e722a3768d56dec8
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
In Qt 6 it is unset by default.
Task-number: QTBUG-108874
Pick-to: 6.5
Change-Id: I35af9d7c1517fd393710b7b1b978d3f39c61acf0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
As a drive-by: print the path with native separators
Task-number: QTBUG-108874
Pick-to: 6.5
Change-Id: I73164acb159d1a45960e16d5f57996e8c27257f7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
It can do more than HTTP but let's keep the naming simple. Most people
likely aren't looking to do file: or data: or qrc: in this example.
Task-number: QTBUG-108874
Pick-to: 6.5
Change-Id: I8a822640f4a8015ebf6c56cb6a614d6426e8a912
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
QCoreApplicationPrivate::initLocale()'s check that the selected locale
is UTF-8-based was added with an initial work-around for Android,
specific to NDK <= 15, which Qt 5.15 did not support.
Later the Android-specific #if-ery was changed to test for Qt taking
UTF-8 for granted, for a given reason having to do with QNX; and later
the #if-ery for that was removed. However, we still support versions
of Android that lack nl_langinfo(), so restore the Android #if-ery.
It presently seems that NDK 26 (Android 8) does contain nl_langinfo(),
so we should be able to drop the nl_langinfo() kludge for this and
later versions. That way we'll at least use the real nl_langinfo()
where we have it.
In the process, fix the indentation of #if-ery.
Pick-to: 6.5 6.4 6.2
Change-Id: Ie9e83c3397955c24cea1e9a9ff6bb0187e47dda2
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
QSharedMemorySystemV::updateNativeKeyFile() stores the QBA
nativeKeyFile member using QFile::encodeName(), so feed it back
through QFile::decodeName() rather than relying on QString(QByteArray)
coercion, which might use a different encoding.
Fixes a CodeChecker grumble.
Change-Id: If9fb01ed65b5bba8c1070b4939ee1d87adf94743
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Test calls in Q{SystemSemaphore,SharedMemory}*::runtimeSupportCheck()
are commented to be sure to fail, so the return is irrelevant.
Suppresses warnings from CodeChecker.
Change-Id: I2ac6ccb8d96a169229dcf24a744015fb9d414c74
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
The script claims to be #!/bin/sh so should not use bash extensions.
Amends 5c40cb0f1a.
Change-Id: Ib88f528acda0893fd6e96878c49ec5a2cf7ebba7
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
We must not set rpath-related properties on INTERFACE libraries. Move
the code that sets the properties below the bail out for INTERFACE
libraries.
This amends commit 392d9a5419.
Pick-to: 6.5
Fixes: QTBUG-110513
Change-Id: Ie395f1482245c4522917f982d2f3bc745c0b2abc
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Rename local var to lastVal, this is less confusing and less error
prone. Seeing "last" in the code one would have to ask which one it is,
the member var, a parameter or a local var? and it could be missed
especially when reading code quickly, which happens especially if it's
not what you're focusing on now, i.e. you're fixing something else and
want to check this code quickly.
Change-Id: Id1742fd5f47ce65faf4d95f408ab3eb1f16e8c45
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Those files/dirs are only build time generated by IDEs like Android
Studio or gradle builds, so ignore them.
Pick-to: 6.5 6.4 6.2
Change-Id: Ib4785f9cc75412825d5be4cb5fe206587f37d193
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
While probably not common, it is not unthinkable that one does
a destroy() - create() on a QOpenGLContext while relying on the
versioned function wrappers. This is likely broken at the moment
since the internal data is not released on destroy(), only when
the QOpenGLContext is deleted. This differs from any other similar
data (the portable function resolvers, QOpenGLTexture backing data,
etc.) which are all dropped and nulled out in destroy().
Also remove the bizarre comment in the dtor which must be something
from Qt 4 / QGLWidget times.
Note that this does not fix the associated problem since that only
relies on the standard mechanism that leads to fully destroying
and then recreating the QOpenGLContext when the window changes.
Pick-to: 6.5
Task-number: QTBUG-109171
Change-Id: Id265a1d208ffae3792a0608c29324e840ce690dc
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Amends e08fe78b2335046934abae970e59fe0156178b95 (in a way).
While touching this function in the other patch, it becomes
obvious that the order in which things are cleaned up and
invalidated is somewhat odd: the native context is in fact
gone _before_ invoking helper callbacks or tearing down the
OpenGL API wrappers. This only works because likely nothing
relies on the context still being usable when destroying
those objects and when the texture/vao helper callbacks
run.
Reorder this to: 1. emit the about-to signal 2. invoke
callbacks and null out helpers 3. destroy the function
resolvers 4. only then start tearing down the platform
(and so the underlying native) context objects.
Pick-to: 6.5
Change-Id: I9067463b8f6ce1f656129594c347c1428439ca5e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
- Convert defines to static const
- Use camel case in the constants
- Use size_t as type in sizes.
Pick-to: 6.5
Change-Id: I06d2588bfa5211a7825f068b2c4f33bbbd2065c4
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Add some details about the support of Qt apis (QFile, QDir, QFileInfo)
for Android content uris.
Fixes: QTBUG-99664
Task-number: QTBUG-98974
Pick-to: 6.5 6.4 6.2 5.15
Change-Id: I4b884623702ccad116d47049e34ccddfe21f83ca
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
The printer drivers of some pdf printers allows the user to set a
global scaling factor, scaling up or down the number of device pixels
available for the same paper size and dpi. Make sure to update the Qt
print device metrics accordingly so that QPainter will see the entire
page, and not more than the page.
Fixes: QTBUG-106659
Pick-to: 6.5
Change-Id: Icb90c1aa742f56b2a2043ef7070530beebe541d5
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Sending each line in separate POST requests seems to clog emrun.
Join the output in 300ms intervals so that the number of requests is
limited to 3,(3) per second.
Fixes: QTBUG-109827
Change-Id: I099e8cc14d9d162c54b7040b62297d1070b234c3
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
The extra quote enforces the arguments to be string, and stops the
COMMAND_EXPAND_LISTS within
QtDbusHelpers.cmake::qt_create_qdbusxml2cpp_command from expanding it
as a list.
Fixes: QTBUG-110459
Fixes: QTBUG-110450
Task-number: QTBUG-99238
Change-Id: Ifddd6570c7bf8f2d1757f275d9445ce2924a93f1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
- Use modern string literals and initializer lists
- Move the Python-specific parts into if block
Pick-to: 6.5
Task-number: PYSIDE-2191
Change-Id: I529f461b330de72dba465ece2c03fa55819a575e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Yuhang Zhao <yuhangzhao@deepin.org>
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Due to a bug in earlier Windows SDKs developers have copy paste
a workaround whenever they are including winrt/base.h. In addition to
that our usage winrt API also forces them to include
qfactorycacheregistration_p.h whenever they include that file. To make
things easier all that magic can now be done with one single include of
qt_winrtbase_p.h.
Pick-to: 6.4
Change-Id: Ic6a80d6d3723af381cf0ecc0f0ab43c2e6839a7d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
The group page for Qt core classes related to I/O include classes from
other modules. Remove these classes from the group; it may confuse
the reader.
Fixes: QTBUG-110020
Pick-to: 6.5 6.4 6.2 5.15
Change-Id: If7df85523ce6b3aa09605bd89d9899ce308d2671
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
It's possible that the window has the WS_THICKFRAME flag but the
Qt::FramelessWindowHint is enabled at the same time. That usually
indicates the user is customizing the window, but it will also
confuse QPA's current logic. We can make the logic more roboust
by reading the Qt window flags as well.
Pick-to: 6.5 6.4
Change-Id: I9894e312a92ef7f5fc0aa93974f216b67fe2cf29
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Qt6's minimum supported platform is Win10 1809, so it should be quite
safe to use DPI_AWARENESS_CONTEXT APIs because they were introduced
in Win10 1607.
This patch removes the use of the PROCESS_DPI_AWARENESS APIs because
they are old (introduced in Win8.1) and most importantly, they can't
handle the new PMv2 and GdiScaled awareness mode.
This refactor also fixed a bug: previously Qt is using GetProcessDpiAwareness()
to get the dpi awareness mode of the current process, however, that API can't
return PMv2, which means even if we are in PMv2 mode, it will still return PMv1
(I've confirmed that locally), and thus Qt is mishandling such cases.
Eg: when judging whether to enable non-client area dpi scaling or not.
Change-Id: I8a8946ba63c863f8c19c27998af2bac97db37ec7
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Break the long sentence to improve the logic readability a bit.
Pick-to: 6.5
Change-Id: I3d0227e616a3c47e14ae7b5cfe4b47a39d778e5e
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Remove comment about lttng not relevant to ctf backend.
Pick-to: 6.5
Change-Id: I4d4432b1075a27d024db38a3cdd7807a1e94e7ec
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
This reverts commit cebcb7991a.
Reason for revert: We need to enable BIC tests again
Pick-to: 6.5
Change-Id: Ibabe2c50547972d040d933a1027833426b018e81
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Input events have a timestamp. When dispatching an event through QPA, a
platform plugin can either provide it, or QPA will use an internal
QElapsedTimer to provide a timestamp.
Windows input messages do come with a timestamp already, so we can use
that instead of the QPA.
The two methods are not equivalent.
For instance: for various reasons, Qt does not honor Windows' "double
clicked" message, but uses the delta between two mouse events to
establish if the second click is actually a double click.
Now suppose that the user double clicks on a widget. On the first click,
the application does something that freezes it for a bit (e.g. some
heavy repainting or whatever). Does the second click register as a
double click or not?
* If we're using Qt's own timer, the answer is NO; the event is pulled
from the WM queue after the freeze, given a timestamp far away from
the last click, and so it will be deemed another single click
* If we use the OS' timestamps, then the second click will be seen as
"close" to the first click, and correctly registered as second click.
This reasoning can be extended to many other QPA events, but looks like
the APIs for some are missing (e.g. enter events), so I'm not tackling
them here.
Task-number: QTBUG-109833
Change-Id: I149361a844feac86cafa885c109a1903b1e49545
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Yuhang Zhao <yuhangzhao@deepin.org>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
A minimal change here would've been just to use value initialization
instead of default initialization. But just go for the kill -- stop
using QScopedPointer.
Change-Id: Ie427a44d13987c2b4a2c881c350df04e935df9d8
Reviewed-by: Yuhang Zhao <yuhangzhao@deepin.org>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This is similar to Q_COMPILER_MANGLES_RETURN_TYPE, except that the
other such compiler, SunPro CC, at least by my cursory reading of
https://archive.org/download/SunWorkshopVol5No1/Sun%20WorkShop%E2%84%A2%20for%20Solaris%202.x%20Volume%205%20Number%201.iso/SPROmrcpl%2Freloc%2FSUNWspro%2FSC4.2%2FREADMEs%2Fmangling.ps
doesn't appear to mangle the access specifier. So it's only MSVC. It's
still better to have a properly-named macro for this than to work with
Q_CC_MSVC and, hopefully, an explanatory code comment.
May come in handy to maintain BC when we find the need to change an
access specifier in the future. The original use-case, in QtPositioning,
was fixed differently. If nothing else, let's have it to raise awareness
of the issue.
Pick-to: 6.5
Change-Id: Ia8b789d2713ec19487a21c6bb0a12cf285e6ba83
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This gets rid of 50% of the casts required to call the function, and
removes the last QtCore QStringView(ushort*) user.
As a drive-by, replace an (allowed, but) fishy &str[0] with
str.data(), the mutable overload of which has been available since
C++17.
Task-number: QTBUG-110403
Change-Id: Iad494025b61c53d991e59cc73198bb014a422a93
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The batcher does not currently work properly with non-qtbase
submodules. Disable them temporarily so that at least the
tests in qtbase are batched. Do this from qtbase so that changes
to each and every submodule are not necessary.
Also, maintain a list of tests that were thus skipped. On any
qt cmake internal function call that refers to such a target,
identify the target as skipped and make the call a no-op.
Fixes: QTBUG-109785
Change-Id: Ib0aa5d39eee8315ffd4ac62f6d1f44fe9bbf7a2f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
More cores allow faster building and reduces variance when cache
is cold.
Task-number: COIN-1001
Change-Id: Idc08f19b788dcf2483342b8ae2c76b663eba537b
Reviewed-by: Simo Fält <simo.falt@qt.io>
Says Clang 15:
tst_qurlquery.cpp:193:11: warning: explicitly moving variable of type 'QUrlQuery' to itself [-Wself-move]
moved = std::move(moved);
~~~~~ ^ ~~~~~
It's amazing how little it takes to throw this warning off guards:
just use an alising reference instead of the same variable. Makes you
wonder whether the time spent on detecting such trivialities in the
compiler is really well spent.
Amends fc8dad2f10.
Pick-to: 6.5
Task-number: QTBUG-109842
Change-Id: I165af2a786aa0ba28b8dcd039a500f3494bc29a9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Align the wheel event handling with other events - move the handler to
wasm window and create a C++ wrapper class for the js wheel event.
Fixes: QTBUG-109622
Change-Id: I915e502de7c0784ec9a6745a90ddcda062e91b2b
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Instead of the System V one. An important difference is that
QSharedMemory does not clean after itself.
Updated the configure summary output to include this information.
Drive-by update to sorting order and I removed cpp-winrt from the
listing because there's a warning at the end if it is not set.
Change-Id: I12a088d1ae424825abd3fffd171e0eadcfd33426
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The MinGW-provided winpthreads has <semaphore.h> and the necessary
functions, though the source seems to implement sem_open() as an
unconditional
errno = ENOSYS;
return SEM_FAIL;
But in case they actually implement it, we enable support.
Change-Id: I3d74c753055744deb8acfffd1723e982d05651b5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
If a previous test in the same process or previously leaked a shared
memory or semaphore handle, tests could fail and cascade down. They
could also interfere with one another. So prevent this issue by
assigning a monotonically-increasing identifier per test function or row
tested and improving how we clean up those we did create.
This shows we need the API to explicitly clean up.
Change-Id: I12a088d1ae424825abd3fffd171db61d6b68a411
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
It's hard to maintain it with multiple backends and I don't see the need
for it.
Change-Id: I12a088d1ae424825abd3fffd171d7bf6bbdf9a99
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
And we particularly want to avoid calling with Create twice.
Change-Id: I12a088d1ae424825abd3fffd171d6ab1fb87221f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>