Commit Graph

59948 Commits

Author SHA1 Message Date
Mikolaj Boc
0eea2238f3 Quasi-support for offscreen surface on WASM
Since context sharing is not currently supported with WebGL, offscreen
contexts have a limited usability on Qt for WASM.

If a context is shared, use the same underlaying WebGL context so that
the two can actually share resources. This is not full-blown context
sharing by any means but it makes e.g. the Open GL widget work as the
readback texture for it is 'shared' between the virtual Qt contexts.

If no sharing is desired, we use an OffscreenCanvas and actually create
a separate WebGL context.

Fixes: QTBUG-107558
Pick-to: 6.5
Change-Id: If57e44739ddb57c167d5f8881a74d8dee52531f6
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
2023-01-30 20:10:25 +01:00
Mårten Nordheim
39daa368d4 Torrent example: Use QByteArray toPercentEncoding
The hand-rolled loop produced incorrect output and was subsequently
rejected by trackers.

The torrent example doesn't support modern features though, so it's
still a bit hit-or-miss whether a torrent will work. E.g. downloading an
Arch iso does not work since it relies on DHT, PeX and HTTP seeds.

Fixes: QTBUG-109798
Task-number: QTBUG-110622
Pick-to: 6.5
Change-Id: Ica40fb9205f09d135407a160a28a45d06a418176
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-01-30 20:10:25 +01:00
Mårten Nordheim
6c90c04fb9 Torrent example: don't try to announce to an empty URL
Task-number: QTBUG-109798
Task-number: QTBUG-110622
Pick-to: 6.5
Change-Id: I3603232eb094387388da6421bf5525a3ba54fe03
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-30 20:10:25 +01:00
Timur Pocheptsov
f932be58d5 qnetworkproxy_mac: use API available both on iOS and macOS
To extract system proxies, the one we used previously, was not available
on iOS and thus we could not obtain system proxies there. Support is
limited - no such things, as SOCKS/FTP/etc. proxies, only PAC (auto
configuration), and HTTP/HTTPS. There are no keys to extract info
about HTTPS, so instead we'll use CFNetworkCopyProxiesForURL (
looks like this enables exclusion lists (which are hidden)
functionality and apparently from the system point of view HTTP/HTTPS
are the same.

Fixes: QTBUG-39869
Change-Id: I73af719a2e2b5cded706e6b3faa4b8eaa879352b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-01-30 20:10:25 +01:00
Oliver Wolff
ade96ff644 Revert "Windows: use MSG timestamps for input events"
This reverts commit baa5888807.

The change caused breakages in qtdeclarative's auto tests. Current
assumption is that we need the system timestamps for other events as
well. Reverting now to unblock CI.

Fixes: QTBUG-110596
Change-Id: I9583627bc058ff0d6cadfa622eed119fb41ca4a1
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-01-30 16:39:19 +01:00
Ahmad Samir
817151c70d QString: use a docs snippets for fromStd*String() methods
Change-Id: Ia9c0c965725aa76c5be6353fe0d1d44674a4d4be
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2023-01-30 15:27:11 +02:00
Shawn Rutledge
78ba5056e6 Make tst_QFocusEvent::checkReason_ActiveWindow pass on macOS
It seems that on macOS 13.2 and newer, it requires explicit activation,
just as on the offscreen and minimal platforms.

Pick-to: 6.5 6.4 6.2
Task-number: QTBUG-110703
Change-Id: I519eec872505ea3673111ae300c2494113f85c36
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-01-30 13:19:41 +00:00
Fab Stz
979a21dc4e Add support for MultiABI with custom install dir of the android-build
Right now, "multi abi builds" of android projects works only if the
android-build installation doesn't use custom install dirs
(INSTALL_PREFIX, INSTALL_BINDIR...)

At the same time, it fixes QTBUG-106533. The patches are the same as the
ones in that bugreport.

Add new items to android-*-deployment-settings.json:

    qtDataDirectory
    qtLibsDirectory
    qtLibExecsDirectory
    qtPluginsDirectory
    qtQmlDirectory

Update androiddeployqt to be able to get files from their install location

BTW (fixes QTBUG-106533):
    Install src/android/templates into INSTALL_DATADIR
    Install src/3rdparty/gradle into INSTALL_DATADIR
    Install src/android/java files into INSTALL_DATADIR
    Install all jars into INSTALL_DATADIR

Add missing path to target_qt.conf
    Update target_qt.conf to have all path. Otherwise qmake wouldn't have
    the path when installing the android-build with custom install dirs
    like INSTALL_LIBDIR & friends

Add support for a new cmake variable that can be set at build time of the
android projects: QT_ANDROID_PATH_CMAKE_DIR_${abi} (Name chosen as
brother of QT_HOST_PATH_CMAKE_DIR)

Pick-to: 6.5
Fixes: QTBUG-106533
Fixes: QTBUG-107207
Change-Id: Ia3751362ab1b5f877ecafbe02f263feac167119c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-01-30 14:08:14 +01:00
Kai Köhne
958dc5c1cd Doc: Use \keyword for alternative name of CMake command
\target will let the browser jump right below the title. Instead,
open the page from the start.

Pick-to: 6.5
Change-Id: Ia58664aa2696aca4f299d57b8dbaa9b6cda90f27
Reviewed-by: Pranta Ghosh Dastider <pranta.dastider@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-01-30 13:56:16 +01:00
Mikolaj Boc
d552558170 Allow filtering of test functions to run in WASM testrunner
Just proxy any non-standard arg to the WASM module and let it use
the arg as a filter

Change-Id: Ia77a30ca872497425017edb8fa8961b6d687ca68
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
2023-01-30 13:55:58 +01:00
Marc Mutz
cde904b38a Q<Typed>Permission: don't use external state
There's no point in using the full implicit sharing machinery when the
type's state consists of two enums, a bool or, indeed, if the type has
no state at all. QRect has more state and isn't implicitly shared.

To remain extensible in the future, all that is required is that the
type contains space for an eventual d-pointer and that all access to
members (except swapping, and, as a consequence, the move SFMs, but
including the copy SMFs, ctors and dtor) is confined to out-of-line
functions.

So define a ShortData (name stolen from QDateTime) nested struct in
each of the stateful Q<Typed>Permission classes, of the same size as a
pointer, holding the trivially-relocatable fields we currently have.

If, in the future, fields are added such that the reserved[] space in
any given class' ShortData no longer suffices to hold them, or said
fields are not of Q_RELOCATABLE_TYPE, then the full d-pointer pattern
(with an actually defined Private, and detach()ing) can be implemented
_for that one class_.

The new-style classes are externally indistinguishable from the
implicitly-shared old-style ones, just a lot more efficient.

Inline the move-ctor, now that we can. This doesn't break
encapsulation, even when we eventually activate the d-pointer.

As a drive-by, drop the noexcept on the dtors - dtors are implicitly
noexcept, anyway.

Pick-to: 6.5
Change-Id: Id90a39227277c6554ddd5895e8205485da1e39ca
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-01-26 17:44:19 +01:00
Kristoffer Skau
ce9d708d51 Add missing underlying type and Q_ENUM to QOpenGLWidget enums
The enums are QOpenGLWidget::UpdateBehavior and
QOpenGLWidget::TargetBuffer. The latter is a new addition to 6.5.

Pick-to: 6.5
Change-Id: I9e73413a944bf4b55e8e308055d79e560ac8668d
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-01-26 17:39:10 +01:00
Vladimir Belyavsky
de704b633d Windows: fix warning on opening FileDialog after changing filters
Destroy native file dialog on Windows as soon as it closes.
Currently the instance of native file dialog on Windows may stay live
even when a FileDialog control was closed and won't be opened anymore
in the app session. At the same time, when the FileDialog is opened
again, the instance of native file dialog is recreated so we don't
need to keep previous instance, because this may lead to situation
when QQuickFileDialog configures old instance of the native dialog,
which is causing problems.

Fixes: QTBUG-61042
Fixes: QTBUG-77211
Pick-to: 6.4 6.5
Change-Id: Ia537264e8494b83dec7d5139744838242b281f1f
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-01-26 15:07:47 +00:00
Jan Arve Sæther
2db23e151f Adhere to https://wiki.qt.io/Qt6/Example-Guideline
* Remove "Example" suffix in title

Pick-to: 6.5
Change-Id: I5da311850ab8f725da363969d7a8d8a1a85f8d70
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2023-01-26 16:07:47 +01:00
Tor Arne Vestbø
780813d9b6 rhi: Remove manual release of autoreleased NSString
The [NSString stringWithUTF8String:] function returns an autoreleased
object, so we don't need to manually release it. Doing so results in
a crash when the surrounding autorelease pool is drained.

Pick-to: 6.5 6.4 6.2
Change-Id: I3dca01e2771d4010e582c2bf770f3d2281343dc3
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-01-26 15:19:33 +01:00
Fabian Kosmale
6854d35393 headersclean: Check fno-operator-names
KDE Frameworks tests this in one build configuration. Verify that we
do not break it in public Qt headers.

Task-number: QTBUG-110585
Change-Id: I5c976d00d7b1aba026e99acb9bad176103e23b0b
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-01-26 14:19:33 +00:00
Volker Hilsheimer
80cb1426aa API review: disable copy for new mime converters classes
These classes are polymorphic, so shouldn't be copyable.

Pick-to: 6.5
Change-Id: I80b6b3de5f5594e00c4011f64846841e3344c152
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-01-26 12:45:37 +00:00
Mikolaj Boc
7d7de4b2e8 Disable the process feature on WASM
Processes are unsupported. processenvironment is kept intact.

Pick-to: 6.5
Change-Id: Ic2023be408adff9f8b034e9184bed620397be9bf
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-01-26 13:45:37 +01:00
Peter Varga
a61d537f05 xcb: Fix QXcbCursor for secondary screen
QXcbCursor is created for each screen in a multiscreen setup. Make sure
xcb cursor context is created for all QXcbCursor instances otherwise
xcb can't load cursor for non-primary screens.

Amends commit 012132c60d

Pick-to: 6.5
Fixes: QTBUG-110434
Change-Id: I85da73a1069b681437b29c3e272d85f5d2dde130
Reviewed-by: Liang Qi <liang.qi@qt.io>
2023-01-26 10:48:21 +01:00
Edward Welbourne
75ae8869fb Use case-insensitive comparison to compare codec with UTF-8 and utf8
Given that the two candidate "counts as UTF 8" values for codec differ
in case, it seems prudent to use a case-insensitive comparison, in
case we hit UTF8 or utf-8.

Pick-to: 6.5 6.4 6.2
Change-Id: I279f83eafa90dd2685c306144c99ec97177d1d3b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-01-25 13:28:42 +01:00
Friedemann Kleint
f4e212b9c4 QtNetwork: Remove duplicated QT_DECL_METATYPE
It causes conflicts in CMake Unity (Jumbo) builds:

qnetworkreplyimpl_p.h:161:1: error: specialization of QMetaTypeId<QSharedPointer<char> >after instantiation
  161 | QT_DECL_METATYPE_EXTERN_TAGGED(QSharedPointer<char>, QSharedPointer_char, Q_NETWORK_EXPORT)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
qtbase/src/network/access/qnetworkreplyimpl_p.h:161:1: error: redefinition of struct QMetaTypeId<QSharedPointer<char> >
qtbase/src/corelib/kernel/qmetatype.h:1711:1: note: previous definition of struct QMetaTypeId<QSharedPointer<char> >
 1711 | QT_FOR_EACH_AUTOMATIC_TEMPLATE_SMART_POINTER(Q_DECLARE_METATYPE_TEMPLATE_SMART_POINTER_ITER)

Task-number: QTBUG-109394
Pick-to: 6.5
Change-Id: I91d13a99dd0f5602ba8d4d8f3baf7659cf63aeef
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-25 12:27:18 +01:00
Marc Mutz
26bb750292 QSharedMemory: fix -Werror=deprecated in C++20 build
Capture of *this by reference in [=] is deprecated in C++20. Use the
perfectly adequate [&] instead.

Amends 0740ab56d7.

Change-Id: I3035a29baf63c22a32aafdcbd4425a3f7b45472f
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-25 10:27:08 +01:00
Marc Mutz
ef1059b141 QSystemSemaphore: fix -Werror=deprecated in C++20 build
Capture of *this by reference in [=] is deprecated in C++20. Use the
perfectly adequate [&] instead.

Amends 32a06e9830.

Change-Id: I6f8a127f3a777099f9c93d932ee3105e852c4fd5
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-25 10:27:08 +01:00
Marc Mutz
66767eea46 ODBC SQL driver: deal with different sizes of SQLTCHAR correctly
Neither the UTF-32, nor the UTF-8 recoding of a UTF-16 string is
necessarily of the same length as the input. The UTF-32 version may
be shorter, if surrogate pairs were encountered. The UTF-8 version
will be longer whenever the string contains non-US-ASCII characters.

Split toSQLTCHAR() into three functions, templated on sizeof(SQLTCHAR),
and use QVLA's range-append instead of manual memcpy()s.

This patch specifically doesn't use constexpr-if, as that's not
available until C++17, which Qt 5 doesn't require.

Pick-to: 6.5 6.4 6.2 5.15
Change-Id: I0bfcb66eb321598908ef00ac34c888fdbccf9316
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-25 06:37:22 +00:00
Thiago Macieira
05e7d09eb3 QSystemLocale/Win: use LOCALE_RETURN_NUMBER to get numbers
Instead of parsing from a QString, which actually recurses back into
QSystemLocale.

Pick-to: 6.5
Change-Id: I3c79b7e08fa346988dfefffd171f9b78e1d8d6ce
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-01-24 18:06:56 -08:00
Tasuku Suzuki
b33016a492 Doc: remove {{ }} for an enum value
https://doc.qt.io/qt-6.4/qurlquery.html#encoding

Pick-to: 6.5 6.4
Change-Id: I328274d37182d3884bc65b8bccfec5052c1dce8e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-25 07:32:40 +09:00
Mikolaj Boc
783b63ce51 Set the cursor in QWasmWindow
Also, trim QWasmCursor as some of it was dead code.

Change-Id: If6fee3390e4c2a2c66ceaef5917d7387f8dbd46c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-01-24 20:30:43 +01:00
Mårten Nordheim
5006fddd33 HTTP Example: Add proxy handling
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>
2023-01-24 20:11:53 +01:00
Mårten Nordheim
d18b5195c1 HTTP example: remove needlessly unset-ing window flag
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>
2023-01-24 20:11:53 +01:00
Mårten Nordheim
c89c37b52f HTTP example: Fix missing translation and improve others
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>
2023-01-24 20:11:53 +01:00
Mårten Nordheim
7c90881a8e HTTP example: rename to HTTP Client
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>
2023-01-24 20:11:53 +01:00
Mårten Nordheim
5bc644c951 Fortune* Example: Rename and add category/tags
Task-number: QTBUG-108875
Pick-to: 6.5
Change-Id: I8eeff88187be4f85514d9871eb5009c51ad6de64
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-01-24 20:11:53 +01:00
Sze Howe Koh
a97dbbd1a0 Doc: Fix usages of deleted QVariant constructors
Finish the job started at 879d30394a

Pick-to: 6.5 6.4 6.2
Change-Id: I217a4830ac8e17d5d1f8900e2d3134fbabf8b9a2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-01-25 02:48:15 +08:00
Edward Welbourne
10117f78d7 Restore Android-conditioning on nl_langinfo() definition
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>
2023-01-24 19:48:15 +01:00
Edward Welbourne
1cd7bdeceb Decode file-name to pass as QString to QFile::exists()
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>
2023-01-24 19:48:15 +01:00
Edward Welbourne
7d45117571 Cast away [[nodiscard]] values in runtime support checks
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>
2023-01-24 19:48:15 +01:00
Edward Welbourne
372dc4c6a1 Fix bash-ism in configure; /bin/sh doesn't handle +=
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>
2023-01-24 18:48:15 +00:00
Joerg Bornemann
854986836a Fix configure -no-rpath for CMake < 3.18
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>
2023-01-24 18:54:58 +01:00
Ahmad Samir
3027e49893 QDateTimeParser: don't shadow member variable
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>
2023-01-24 19:54:58 +02:00
Assam Boudjelthia
b49e2bb084 Android: add build dirs/files of Android templates to .gitignore
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>
2023-01-24 17:01:05 +02:00
Laszlo Agocs
3bad6d5970 QOpenGLContext: Handle versionFunctions like other data
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>
2023-01-24 16:01:05 +01:00
Laszlo Agocs
f045ef4ab6 Sanitize the order of things in QOpenGLContext destroy()
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>
2023-01-24 16:01:05 +01:00
Antti Määttä
f766e60519 CTF: Fix static constant types and names
- 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>
2023-01-24 16:13:41 +02:00
Nicholas Bennett
a0ca5f433f Docs:Android: Add docs notes about support for content Uris
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>
2023-01-24 11:10:30 +00:00
Eirik Aavitsland
b44f222dbe Support the scaling factor of some Windows pdf print devices
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>
2023-01-24 11:00:16 +00:00
Mikolaj Boc
025659a18c wasm testrunner: Join output into batches
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>
2023-01-24 08:34:42 +01:00
Amir Masoud Abdol
897579edab Remove the extra quote, now that we use cmake_parse_arguments(PARSE_ARGV
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>
2023-01-23 20:21:10 +01:00
Friedemann Kleint
97a7e7b2d0 uic: Refactor options parsing
- 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>
2023-01-23 19:25:06 +01:00
Tor Arne Vestbø
457300ff60 permissions: Don't try to read usage descriptions from non-existing plist
Task-number: QTBUG-110356
Pick-to: 6.5
Change-Id: I8078556fbe67e98af2fcfe8222a8ce097df69f08
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-01-23 19:25:06 +01:00
Oliver Wolff
b2c1237b45 Introduce qt_winrtbase_p.h
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>
2023-01-23 18:53:34 +01:00