Commit Graph

58045 Commits

Author SHA1 Message Date
Timur Pocheptsov
8e21844683 tst_QSslKey - make OpenSSL v3 detection fully runtime
Otherwise, checks are useles in non-developer build.

Pick-to: 6.4 6.3 6.2
Fixes: QTBUG-106036
Change-Id: I41b6d8f250021ff9fa4981f9df9244c269ed2999
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-09-01 20:10:03 +02:00
Mikolaj Boc
67deefbaaa Build in test data on WASM
Local file system files are difficult to reach on WASM. Build the test
data in so that it's reachable to WASM tests nevertheless.

Change-Id: I65022db7645248d040434759fb60c3076fd65bd8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-09-01 19:44:20 +02:00
Edward Welbourne
6dd6bf3467 Fix two trivial defects in testlib docs
A fragment of inline code wasn't wrapped in \c{}.
Doing so made the quotes it was wrapped in redundant.

Documentation of of QSKIP's parameter claimed it does something it
should, but it's up to the client code using it to write a description
that lives up to that.

Pick-to: 6.4
Change-Id: Ib355b9b85c9986f244ae01479134245f182c912c
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2022-09-01 19:44:19 +02:00
Edward Welbourne
8814fb5f4f Provide CMake guidance for skipping whole tests
The testlib docs on how to skip whole tests was qmake-specific, so add
the missing details for CMake.

Pick-to: 6.4
Change-Id: I247d08262302dcedb98ffbf301932d6dd84d7ff7
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2022-09-01 19:44:19 +02:00
Sona Kurazyan
711105058a Apply Q_CONSTINIT where beneficial
Applied Q_CONSTINIT to variables with static storage duration, but
skipped the POD types with core constant initializers.

Task-number: QTBUG-100486
Change-Id: Iaabf824e9cb0f29a405a149912200d4e4b3573c1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-09-01 19:44:19 +02:00
Edward Welbourne
44a1782a9b Clarify QLocale's documentation around names and uiLanguage()
Change-Id: I703c4dd8e6f0e70bed3a73567091548aabafb340
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2022-09-01 19:44:19 +02:00
Laszlo Agocs
c681c7c23f rhi: metal: Add support for tessellation
Change-Id: Ie8d226a6a959aa5e78284ea72505fd26aec1e671
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2022-09-01 19:44:19 +02:00
Øystein Heskestad
855a9ca217 Add CBOR documentation
Add documentation of usage of CBOR in convert and cbordump examples,
add a CBOR overview, and add links to them other places in the
documentation.

Task-number: QTBUG-85912
Change-Id: I518792db63647bf9ddd4507d8d4b7ef056192f82
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2022-09-01 19:03:00 +02:00
Jonas Kvinge
2e8c84cda2 macdeployqt: Fix deploying libraries with reexport
Fixes deploying libgcc, currently it fails to change the rpaths with the
following error:

ERROR: Could not parse otool output line:
"\t/usr/local/opt/gcc/lib/gcc/11/libgcc_s.1.1.dylib
(compatibility version 1.0.0, current version 1.1.0, reexport)"

Pick-to: 6.3 6.4
Change-Id: I5c866a375f88e3b222cbdbebc167b04174f753b2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-09-01 19:03:00 +02:00
Mikolaj Boc
9e05c9ad86 Add error message & format selection capability to batched test runner
Change-Id: I6686bf951204672c3542148e85e59e14e83e73c4
Reviewed-by: David Skoland <david.skoland@qt.io>
2022-09-01 17:29:30 +02:00
Marc Mutz
334c27dad1 [docs] Fix ints that should be qsizetype [src/corelib/text]
For the constructors, replace int with qsizetype. For the incorrect
return type in \fn of length(), drop the return type, the presence of
which violated DRY, stressing the importance of that SOLID principle.

Fixes: QTBUG-103531
Pick-to: 6.4 6.3 6.2
Change-Id: Ic7a8e1953333c28a2722fd7f753a0b5af6777395
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-09-01 15:51:48 +02:00
Marc Mutz
812a0d3125 QAnyStringView: construct from any T implicitly convertible to QString/QByteArray
This includes QDBusReply, QProperty, and QStringBuilder expressions.

The new constructor subsumes the QStringBuilder case without requiring
jumping though hoops to delay the definition of the ctor the way we
had to for the explicit QStringBuilder constructor, so remove the
explicit QStringBuilder one again.

[ChangeLog][QtCore][QAnyStringView] Can now be constructed from
anything that implicitly converts to either QString or QByteArray.

Fixes: QTBUG-105389
Change-Id: I0e584dd3e20d591381609a3329ef47cec7356ecc
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2022-09-01 15:51:48 +02:00
Marc Mutz
24e8a693cd QLocale: port to qsizetype [2/N]: remainder (qlocale_win.cpp partial)
Port ints to qsizetypes where they're not blatantly wrong. This
includes indexed loops that don't require the additional range,
because int these days is a code smell, so if we can save the next
code reader a few moments of digging to convince herself that the int
is ok even in 64-bit builds, then let's do it.

The Windows implementation only has the most obvious occurrences
ported, because I lack platform access. Created QTBUG-105100 to track
the missing changes. OSX should be fine, provided sizeof(long) == 8 on
64-bit OSX.

Pick-to: 6.4 6.3
Task-number: QTBUG-103531
Change-Id: I679183f28ed42e89e2879e29457e6a4e487fed0d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-09-01 13:51:48 +00:00
Morten Sørvig
df76a0585f wasm: set ALLOW_MEMORY_GROWTH for multi-threaded builds
Unify the settings for single-threaded and multi-threaded builds;
Qt now always enables heap growth by default.

This means we don't have to reserve a large (1GB) fixed memory
size, but can instead set the smaller (50 MB) initial memory size,
like the single-threaded build does.

Enabling threads + memory growth can potentially cause
a performance regression when accessing heap memory from
JavaScript (https://github.com/WebAssembly/design/issues/1271).
We leave it for the application to decide if this applies,
and if the switch to fixed memory should be made.

Change-Id: I96988b072506456685086e55aca4007a146bd70f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2022-09-01 15:42:28 +02:00
Sona Kurazyan
50b05e3e2a Move qVersion() from qglobal.h to qlibraryinfo.h
Since qVersion() might be called also from C code, disable the parts of
qlibraryinfo.h that are relevant only for C++ code if __cplusplus is not
defined.

[ChangeLog][Potentially Source-Incompatible Changes] qVersion() is
moved from qglobal.h to qlibraryinfo.h, '#include <QtCore/QLibraryInfo>'
needs to be added where it's used.

Task-number: QTBUG-99313
Change-Id: I3363ef3fa4073114e5151cb3a2a1e8282ad42a4d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-09-01 13:26:30 +02:00
Sona Kurazyan
b077c419ea Move QMacAutoReleasePool from qglobal.h to qcore_mac_p.h
And include qcore_mac_p.h where needed.

Task-number: QTBUG-99313
Change-Id: Idb1b005f1b5938e8cf329ae06ffaf0d249874db2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-09-01 13:26:30 +02:00
Mikolaj Boc
1e8316958a Hit test only the visible controls in WASM window
The existing code did not take into account that some of the controls
might be missing. Clicking on the window frame, just to the right of
the close button, would then maximize a window, even though this was
not the desired behavior.
Also, simplified most of the checks for existence of controls as
different idioms were used, which were equivalent. Now, all visibility
is computed at the makeTitleBarOptions stage and a single idiom of
tb.subControls.testFlag is used for checking control visibility.

Pick-to: 6.4
Change-Id: I5a94f20fbf527243ff1ae5e6886688d2dd793a6c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-09-01 09:53:24 +02:00
Mitch Curtis
2d7b67d491 Doc: fix example repo URL
qtquickcontrols2 was merged into qtdeclarative in Qt 6.2.

Fixes: QTBUG-105004
Pick-to: 6.2 6.3 6.4
Change-Id: Icbec8a74f1269b270be42b6a93930fb28d64af37
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2022-09-01 12:23:55 +08:00
Lorn Potter
b515fa56a3 wasm: add Emscripten version check for apps
This will tell developers if they are using the wrong version which may
not build or might cause other issues.

Pick-to: 6.4
Fixes: QTBUG-105922
Change-Id: Ic5c4549d5637182dce380e415f131e33a4da416f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-09-01 11:17:30 +10:00
Kai Köhne
4a29ee770f Restore signature of qt_handleTouchEvent()
The function return value changed in commit e1f25b1c8. Anyhow, this
breaks the AUT probe of Squish on Windows, as long as it is built
against an older Qt version.

Squish can of course be adjusted eventually, but let's allow some
grace period.

Pick-to: 6.4
Fixes: SQUISH-15324
Change-Id: I289ed43bffcf292aa2eae3962a4661ed5c29100e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-08-31 22:58:24 +02:00
André de la Rocha
0d3f09ac02 Fix tree/table/list accessibility state
The accessibility class associated with trees, tables and lists was
reporting a default/empty state, causing issues with accessibility
tools.

Fixes: QTBUG-92964
Pick-to: 6.4 6.3 6.2
Change-Id: I9c8ee5e7e582fd6b6a59cd70437eeddad0f4eb8e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-08-31 22:58:24 +02:00
Thorbjørn Lund Martsum
f082458c46 Fix dragging a docked QDockWidget [REG-fix]
In 54f328f0e8 issues with dragging
dock widgets between screens were solved. However, it only
worked well if the widget was floating. It worked wrong when
dragging out a docked widget. That is fixed by this patch.

Pick-to: 6.4 6.3 6.2 5.15
Fixes: QTBUG-106064
Change-Id: I8d486d30a334719a2931828464ccaceb8ba2e019
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-08-31 21:55:00 +02:00
Thiago Macieira
f123212880 RCC: fix zlib compression when --no-zstd was specified
Since we had code to default to zstd as the default algorithm instead of
"Best", we ended up not compressing anything.

[ChangeLog][rcc] Fixed a bug that caused rcc not to compress files with
any compression algorithm if the --no-zstd option was present.

Pick-to: 6.2 6.3 6.4
Fixes: QTBUG-106012
Change-Id: Ic6547f8247454b47baa8fffd170fddae429f82d2
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2022-08-31 16:55:00 -03:00
Timur Pocheptsov
0f2397f03d QSslCertificate::toText(): add a file to compare against
With OpenSSL 3.0.5 we see X509_print giving us the text representation
not matching any of previous ones - mostly a question of spaces
and formatting. Let's add a proper version to compare against and
remove useless 0.9.8, 1.0.0, 1.0.1, - we don't support them anymore
and thus QSslCertificate::toText() will never give a match.

Pick-to: 6.4 6.3 6.2 5.15
Task-number: QTBUG-106017
Change-Id: Ida11321c23e74c7313acc682237ab78408cf2803
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-08-31 21:55:00 +02:00
Timur Pocheptsov
0206eb137f tst_QSslCertificate::pkcs12 - skip the test if OpenSSL version >= 3
leaf.p12 is using RC2 for encryption and it's disabled by default
in openssl v3.

Pick-to: 6.4 6.3 6.2 5.15
Fixes: QTBUG-106017
Change-Id: I4edd0d29506d1e50b2b618b6a00cceeb4b156204
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-08-31 21:55:00 +02:00
Niclas Rosenvik
6d93053303 Fix possible undefined behavior in clear_thread_data
Fix possible undefined behavior in clear_thread_data.
The key used in pthread_setspecific must be obtained
from pthread_key_create or undefined behavior occurs.
Use set_thread_data to clear it since it ensures that
the key has been obtained using pthread_key_create
by calling pthread_once using
create_current_thread_data_key.
Fixes crash when closing threaded qt apps on NetBSD.

Pick-to: 5.15 6.2 6.3 6.4
Change-Id: I1c7d2628f4248e00a12724a952568f7d92011986
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-08-31 19:55:00 +00:00
Mikolaj Boc
619cb795b2 Plug the WASM batched test runner into the build system
The new batched test runner is now used for running the tests instead
of the wasm shell, which runs for single test cases.

Change-Id: I7b7e6dd7993ba7937124c5843356b6891301b893
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-08-31 16:53:52 +02:00
Alexandru Croitor
cd4a3a1dc7 CMake: Fix tst_qlibrary to work on macOS with debug builds
The test expects the helper libraries to contain the .dylib suffix
rather than .so.

Replace glob copying of the libraries (which depends on the underlying
shell) with manual copy calls.
This also ensures the libraries don't contain a _debug postfix in the
file name even in a debug build, which would break the tests.

Amends f8c1909320
Amends 1dff26dd95

Change-Id: I20361c33c4a1b9dd4b5273fcdb8cc79c9f266327
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-08-31 14:12:00 +02:00
Eskil Abrahamsen Blomfeldt
d86ab16a86 directfb: Fix compilation
The DirectFB QPA plugin has not built since Qt 6, because it used
deprecated API which has been removed and private API which has
changed.

This change updates the handleMouseEvent() and
handleWheelEvent() calls with the contents of the deprecated
overloads the way they were in Qt 5.15.

In addition, it updates usage of GlyphAndSubPixelPosition to default to
vertical subpixel position of 0, and adds override qualifiers where
necessary.

Fixes: QTBUG-105061
Change-Id: Id7516f8e3c0a466d15b754f8e5f6df15a5f9526a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-08-31 14:12:00 +02:00
Timur Pocheptsov
267d923ed9 tst_QDtls::verifyClientCertficiate - update certs for OpenSSL v3
Because this version does not seem to like MD5 which old cert was using.

Fixes: QTBUG-106019
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: Id354d1e32acb0528685b2788ee9c7326c43397bd
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-08-31 13:29:11 +02:00
Mikolaj Boc
3c9a12934e Implement new features in qt-wasmtestrunner
The script is now able to:
- kill a test that is not responding after certain timeout
- multicast output to files/streams (tee-like, but not only on posix)
- forward requested format (xml/txt/etc.) to the test executable
- run a batched test from a batch test package
- interop with the js batched test runner

Change-Id: Ia189d78a078e11b9efd25865c5a0ddc6a62d9b85
Reviewed-by: David Skoland <david.skoland@qt.io>
2022-08-31 12:47:40 +02:00
Mikolaj Boc
11c19ac6e2 Request frame when a window has been moved
Whenever a window's geometry changes, the scene has to be redrawn.
This has not been the case if the size didn't change.

Pick-to: 6.4
Change-Id: Ic85e1d75221134788ab2cf2e76bf2ba121f3335e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-08-31 12:47:40 +02:00
Tobias C. Berner
b1c57d13ee qthread.h: fix logic for Q_OS_FREEBSD and add support for 32bit FreeBSD
Fails to compile on i386 on FreeBSD with:

In file included from /wrkdirs/usr/ports/devel/qt6-base/work/qtbase-everywhere-src-6.3.1/src/corelib/thread/qmutex.cpp:49:
/wrkdirs/usr/ports/devel/qt6-base/work/qtbase-everywhere-src-6.3.1/src/corelib/thread/qthread.h:201:13: error: invalid operand for instruction
    __asm__("movq %%fs:%c1, %0" : "=r" (tid) : "i" (2 * sizeof(void*)) : );
            ^
<inline asm>:1:14: note: instantiated into assembly here
        movq %fs:8, %edi
                    ^~~~
1 error generated.

Pick-to: 6.2 6.3 6.4
Change-Id: I0a71e4631d7b6d452083d3ca8e35759e5dc563d4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-08-31 06:51:59 +00:00
Thiago Macieira
fe92b08065 QMetaObject: add a new, variadic invoke/invokeMethod/newInstance
[ChangeLog][QtCore][Meta Objects] The QMetaObject::invokeMethod() taking
a method name by string, QMetaObject::newInstance(), and
QMetaMethod::invoke() now support more than 10 arguments.

[ChangeLog][QtCore][Meta Objects] The use of the Q_ARG and Q_RETURN_ARG
macros is now optional with QMetaObject::invokeMethod(),
QMetaObject::newInstance(), and QMetaMethod::invoke(): the type name
will be obtained from the C++ type (the same as QMetaType). The function
qReturnArg() can be used in place of the Q_RETURN_ARG macro. The macros
are still useful in rare conditions where the type was typedef'ed from
its original name.

Change-Id: I36b24183fbd041179f2ffffd17022a2b48c7639b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-08-30 22:29:07 -03:00
Heikki Halmet
191419e980 Blacklist: tst_QGraphicsAnchorLayout::layoutDirection for Ubuntu 22.04
Task-number: QTBUG-87728
Pick-to: 6.4 6.3 6.2
Change-Id: Ic78a17146c265ffe6baf6f08a0f9c29750bd0d58
Reviewed-by: Liang Qi <liang.qi@qt.io>
2022-08-31 00:39:25 +03:00
Thiago Macieira
ab3342c26f 3rdparty/zlib: backport the fix to CVE-2022-37434
Qt isn't known to be affected by this.

Pick-to: 5.15 6.2 6.3 6.4
Change-Id: Ic6547f8247454b47baa8fffd171025f5a435a209
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-08-30 18:27:42 -03:00
Michael Weghorn
8b947bae72 a11y: Don't reassign unique ID to other object right away
For the case that a newly created and registered accessible
interface gets removed again from the cache before another one
gets registered, the next registered interface was
previously assigned the same "unique ID" again, which e.g. breaks
assistive technology when using caching
with AT-SPI, since that relies on the assumption
that the ID is actually unique for each object.
(But here, the new object was using the same object path
as the old one, so data from the old object would be
used for the new one.)

To prevent that from happening, increment the
counter for the next ID to try at the end of
QAccessibleCache::acquireId, so the next time
the method gets called, it doesn't try again
whether the same ID as used previously is
available again.

For consistency, also rename the variable used
for the counter from lastUsedId to nextId.

This also adds a corresponding test case.

Fixes: QTBUG-105962
Pick-to: 6.4
Change-Id: Iddf4f3b35c57895bcfbb623a5377edf8344ab6c2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-08-30 22:53:09 +02:00
Ivan Solovev
56ec6a392a tst_qguiapplication: guard the usage of deprecated signals
The paletteChanged() and fontChanged() signals were deprecated
in Qt 6.0, but the test was still using them unconditionally.

This patch guards the usage of the deprecated signals with
the usual QT_DEPRECATED_SINCE(6, 0) check, so that the test
can be built and run with QT_DISABLE_DEPRECATED_UP_TO >= 0x060000

This commit amends 68ea9c0227

Task-number: QTBUG-104858
Change-Id: Idb2da6d91afcdb664f325f23ec625947c9a7fac0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2022-08-30 22:46:35 +02:00
Ivan Solovev
2e69ef6af9 Rest of QtBase tests: port away from deprecated methods
Small changes to fix builds with
QT_DISABLE_DEPRECATED_UP_TO >= 0x060500

Task-number: QTBUG-104858
Change-Id: Ia531a3cee97f13827e36b3d63f28eed879fe9a40
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-08-30 22:46:35 +02:00
Ivan Solovev
95542b386a tst_qobject: port away from deprecated methods
The patch includes the following replacements:
* QMetaType::type("name") -> QMetaType::fromType<Type>().id()
* QMetaProperty::type() -> QMetaProperty::typeId()
* QVariant::Type -> QMetaType::Type
* qRegisterMetaType<T>("name") -> qResigeterMetaType<T>()
* The static QMetaType::{load,save} methods are replaced with
  non-static versions
* Replace QCOMPARE(property.type(), QVariant::UserType) with
  QCOMPARE_GT(property.typeId(), QMetaType::User), because the
  deprecated type() method was treating each custom type
  (id >= QVariant::UserType) as QVariant::UserType, while the
  typeId() method simply returns the actual id.

As a drive-by: remove unneeded QMetaType registration tests
as we have tst_QMetaType to check it.

Task-number: QTBUG-104858
Change-Id: Ia08e002efdf07ff83366a5193164dba96a956f9a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-08-30 22:46:35 +02:00
Ivan Solovev
ad12d779cc tst_qvariant: port away from deprecated methods
The most common changes are:
* guard the tests for deprecated APIs with QT_DEPRECATED_SINCE
* QVariant(QVariant::Type) ctor -> QVariant(QMetaType) ctor
* QVariant::type() -> QVariant::typeId()
* QVariant::canConvert(int) -> QVariant::canConvert(QMetaType)
* QVariant::convert(int) -> QVariant::convert(QMetaType)
* QVariant::Type -> QMetaType::Type

Task-number: QTBUG-104858
Change-Id: I00584acb24d29b461faa1115f8f8d36a0b443883
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-08-30 22:46:34 +02:00
Ivan Solovev
91eec59b87 tst_qmetatype: port away from deprecated calls
The most common changes are:
* Replace QMetaType::type("name") with QMetaType::fromName("name").id()
  or QMetaType::fromType<Type>().id()
* QMetaType::typeName(int) -> QMetaType(int).name()
* QMetaType::typeFlags(int) -> QMetaType(int).flags()
* QMetaType::metaObjectForType(int) -> QMetaType(int).metaObject()
* The static QMetaType::{load,save} methods are replaced with
  non-static versions
* The static QMetaType::{create,destroy,construct, destruct} methods
  are guarded by QT_DEPRECATED_SINCE calls. The tests are also
  extended with non-static calls where they were missing. Fixed
  potential memory-leaks in these tests.

Add separate unit-tests for deprecated APIs and guard them with
QT_DEPRECATED_SINCE

As a drive-by: use nullptr instead of 0 in some places

Task-number: QTBUG-104858
Change-Id: I4b0cdd29bc197c186b835002372240aae3098c33
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-08-30 22:46:34 +02:00
Ivan Solovev
35a50491e7 QtBase tools: port away from deprecated qSetGlobalQHashSeed(0)
Use QHashSeed::setDeterministicGlobalSeed() instead

Task-number: QTBUG-105102
Change-Id: Ib7d4b6e7bca89870913a140d68bbdd6018e8f8ed
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2022-08-30 22:46:34 +02:00
Ilya Fedin
c81d5ec19a QDBusTrayIcon: add xdg-activation support
[ChangeLog][QtGui][Linux/Wayland] StatusNotifierItem tray implementation
supports getting window focus token from desktop environments supporting
the ProvideXdgActivationToken extension (e.g. KDE)

Pick-to: 6.4
Change-Id: Idcd79a4224b74d6eedfcf1b90129b1a2d3e14312
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2022-08-31 00:27:07 +04:00
Liang Qi
c3c4d4dda9 widgets: avoid setting X11BypassWindowManagerHint in QToolBar
when restoring state

With X11BypassWindowManagerHint, the floating tool bar was created
without control from window manager, which causes it stays on top
at all virtual desktops.

Pick-to: 6.4 6.3 6.2 5.15
Fixes: QTBUG-105591
Change-Id: I1868f4e75e1b84f9e81c05d2e927a183a0c635ee
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-08-30 22:27:07 +02:00
Mikolaj Boc
337a853cb5 Adapt tests/auto/wasm for batching
Use consistent defines across both tests in the directory

Change-Id: Idd84603135c8c164d09ae41d5faa7ca3a5fc7c3c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-08-30 22:27:07 +02:00
Mikolaj Boc
505673ee06 Don't call QPlatformWindow::setGeometry twice in QWasmWindow
QWindowSystemInterface::handleGeometryChange already does that

Pick-to: 6.4
Change-Id: I983bf6bbee2e1099e6a15fe77a7647b3d05eb52e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-08-30 22:27:07 +02:00
Mikolaj Boc
7f4433b13d Use the focus window to determine which window is drawn as active
window::isActive() is very lenient - it can determine that several
windows are active at the same time, based on the active status of
their parents, including transient parents. Use a stricter approach
and only paint the window that has input focus as active.

Fixes: QTBUG-105620
Pick-to: 6.4
Change-Id: I50ba45f633f693da2050c44415d8b6b154fc3099
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-08-30 22:27:07 +02:00
Mårten Nordheim
a901afcd79 QDateTime: work around bitfield bug on msvc x86
Somehow, when mixing types in a bitfield, MSVC will use a lot
more space than expected. So ShortData ended up being 16 bytes
causing various static_asserts to trigger.

Pick-to: 6.2 6.3 6.4
Change-Id: Ia0032e71621772db27e2917d9c71598046730107
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-08-30 21:46:13 +02:00
Sona Kurazyan
0f2079efb8 Extract header qdarwinhelpers.h from qglobal.h
Task-number: QTBUG-99313
Change-Id: Ia25270d381de99c5fcbb205d750e7bf86d4438dc
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-08-30 20:56:46 +02:00