Commit Graph

66728 Commits (db240d99cffbc3af2eb39a5f7d48e68e57b85271)

Author SHA1 Message Date
Marc Mutz db240d99cf androiddeplyqt: fix more missing pclose() on early returns
Found by Coverity.

This code predates the move of androiddeployqt to qtbase.

Pick-to: 6.7 6.6 6.5 6.2 5.15
Coverity-Id: 378442
Change-Id: Icc24918159132c55a3817eaf19c96ea212dfa6dc
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2024-04-18 10:31:01 +01:00
Marc Mutz c64b30129d androiddeplyqt: fix missing pclose() on early return
Found by Coverity.

Amends 5bb178c479.

Pick-to: 6.7 6.6 6.5 6.2 5.15
Coverity-Id: 378357
Change-Id: I8839280ce15d8e7d9e1f4024ca796c2d8b4ed930
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2024-04-18 10:31:01 +01:00
Marc Mutz 1cfe42235c QEglFSKmsGbmScreen::framebufferForBufferObject: release() at the correct time
It's the gbm_bo_get_user_data() function that takes ownership of the
FrameBuffer object, not the caller of the function, so release() into
gbm_bo_set_user_data() not into the return. This threw Coverity off,
which complained about a leak of the return value in the caller.

Amends 2f0fa59d59, but not picking
through all the refactorings the code has since seen.

Pick-to: 6.7 6.6 6.5
Coverity-Id: 444117
Change-Id: I5f058e4a42942349193eecfd8c00ec9499ef4886
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-04-18 10:31:01 +01:00
Marc Mutz d2436f7294 QSignalSpy: make verify() methods static
... because they can be. We call them without a value object and while
they don't touch *this, ubsan complained (rightfully):

  qsignalspy.h:29:28: runtime error: member call on address 0x7ffdfaab2b20 which does not point to an object of type 'QSignalSpy'
   0x7ffdfaab2b20: note: object has invalid vptr
    00 00 00 00  00 00 00 00 00 00 00 00  00 2b 00 00 c0 60 00 00  60 14 00 00 60 60 00 00  70 14 00 00
                 ^~~~~~~~~~~~~~~~~~~~~~~
                 invalid vptr

Amends e68edd6a07.

Task-number: QTBUG-123544
Change-Id: I8e9ba3270a35777a704e68130d2f2bccb658a536
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-04-18 11:31:01 +02:00
Marc Mutz 3afcfbc400 Port QVersionNumber to QSpan
The new ctor could replace all existing ones. However, keep the QList
ctors to participate in implicit sharing, but mark them as weak
overloads in order to break the ambiguity for arguments that convert
to both QList and QSpan. Also keep the initalizer_list ctor because
it's implicit, and should be.

[ChangeLog][Potentially Source-Incompatible Changes] We have begun to
port APIs to QSpan, replacing overload sets of concrete container
classes. This breaks code that relied on concrete container class
overloads and passed types that implicitly convert to such a
container, but not to QSpan. The backwards-compatible fix is to make
the conversion explicit.

[ChangeLog][QtCore][QVersionNumber] Added construction from QSpan,
replacing the QVarLengthArray constructor.

Fixes: QTBUG-121480
Change-Id: I9be173d0471872ddc449c876465c6a01abc49ff4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-18 09:31:01 +00:00
Marc Mutz 063e31209b QRestReply: micro-optimize optional<QStringDecoder> handling
Use optional::emplace() instead of assignment from an rvalue.

Saves the move constructor and destructor calls, both of which are not
trivial (due to cleanFn).

Pick-to: 6.7
Change-Id: Ief77626c77d0c8c2ce17e3b1a21496a7da969761
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
2024-04-18 11:31:00 +02:00
Santhosh Kumar 26e75d452e Support rendering CSS 'border' property for html table
We supported CSS 'border-width', 'border-style' and 'border-color'
for HTML tables since 8a9bec35fb0c60a0e5990c1a12ffe6f39fdbf2d.
Now we also support the 'border' property, which is shorthand to
set all four borders' width, style and color.

Fixes: QTBUG-123167
Pick-to: 6.7 6.6
Change-Id: I5f29b94ab9facf412a9c230d554efb5c69368b6b
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2024-04-18 10:57:50 +02:00
Eirik Aavitsland ade33a9144 Avoid overflows in gradient calculations
Avoid the optimized fixed-point function for vertical gradients if the
parameters are out of range for that. Fall back to the general
gradient function in that case.

Fixes: QTBUG-120331
Pick-to: 6.7 6.5 6.2
Change-Id: Idf116f0077403531d9ea414e3043fdc92b6fe4a9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2024-04-18 09:46:08 +01:00
Eirik Aavitsland b05ea7279e Add QPainter benchmark case re clipping primitives exceeding device
Task-number: QTBUG-123054
Change-Id: I7f3af505245817ea7030ff29d6244e4d5ce78e6c
Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
2024-04-18 10:46:08 +02:00
Juha Vuolle 900d17263d QInotifyFileSystemWatcherEngine: change to QObject::connect PMF syntax
Task-number: QTBUG-122619
Change-Id: I624d282791a561ebd0d70cadc9bf17594cc1eb5c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-04-18 06:01:02 +03:00
Juha Vuolle 113f76cffb QNonContiguousByteDevice private classes: add Q_OBJECT macro
Task-number: QTBUG-122619
Change-Id: If50e051d5c6eed04ed03a97f0a1dafc7b47d551e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-04-18 06:01:02 +03:00
Juha Vuolle 299a9ac49c QSignalMapper: change to use QObject::connect PMF syntax
Task-number: QTBUG-122619
Change-Id: I148e4ec77d16f62015c19c641b181e653219d132
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-04-18 06:01:02 +03:00
Juha Vuolle db818849c1 QByteDeviceWrappingIoDevice: change to use QObject::connect PMF syntax
Task-number: QTBUG-122619
Change-Id: I1128f2bd42ba6dc1227e62264427418ecbf80b27
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-04-18 06:01:01 +03:00
Juha Vuolle 8250f6f1ee QEmptyItemModel: add Q_OBJECT macro
Task-number: QTBUG-122619
Change-Id: Ie84e13d64071d2735e0f873b26a73e476d761742
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-04-18 06:01:01 +03:00
Juha Vuolle c193030c7c QDefaultAnimationDriver: change to use QObject::connect PMF syntax
Task-number: QTBUG-122619
Change-Id: Ide82014e3b9803ae091be3432ba61b37a2607403
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-04-18 06:01:01 +03:00
Tor Arne Vestbø d5bf42f75b Add preliminary support for Qt for visionOS
Qt already runs on Vision Pro as "Designed for iPad", using Qt
for iOS. This change enables building Qt for visionOS directly,
which opens the door to visionOS specific APIs and use-cases
such as volumes and immersive spaces.

The platform removes some APIs we depend on, notably UIScreen,
so some code paths have been disabled or mocked to get something
up and running.

As our current window management approach on UIKit platforms
depends on UIWindow and UIScreen there is currently no way to
bring up QWindows. This will improve once we refactor our
window management to use window scenes.

To configure for visionOS, pass -platform macx-visionos-clang,
and optionally add -sdk xrsimulator to build for the simulator.

Change-Id: I4eda55fc3fd06e12d30a188928487cf68940ee07
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-04-18 05:00:57 +02:00
Volker Hilsheimer bf2ed62409 Baseline tests: improve focus setting and clearing
Set focus on the test window so that the tested widget doesn't have it.
Remove the "PublicWidget" hack, we have public QWidget APIs to find the
next widget in the focus chain that we can use to transfer focus
reliably. Use TabFocusReason to maintain existing behavior, and to
test that widgets that handle that specifically appear correctly. Clear
the focus on the test widget by setting it back to the window after
taking the "focused" snapshot.

Add QCOMPARE and QVERIFY to assert that the test is in the right state
before taking screenshots.

Pick-to: 6.7
Change-Id: Icef6ce1bb1c63c9f6cde7d0ddca82e693cace420
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-17 21:17:34 +02:00
Joerg Bornemann 2cd79cc1c3 CMake: Add _qt_internal_get_i18n_catalogs_for_modules
This function finds the translations that belong to the Qt modules that
are used by the project. "Used by the project" means just all modules
that are pulled in via find_package for now.

This code was in Qt6CoreDeploySupport.cmake before. Now, we can call it
in other places too like Qt6LinguistToolsMacros.cmake.

Task-number: QTBUG-110444
Change-Id: I338d54d93cf285190b1430608b32334692ae4c07
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-04-17 21:17:30 +02:00
Thiago Macieira a7b9ec7f6f CBOR: Remove dead code: len[12] are not used with UTF-16
The lengths are only needed to check if one of the two strings is empty
and in the direct 8-bit comparisons with memcmp(). So we don't need this
division by 2, which was here since the initial commit.

Amends d4c7da9a07.

Pick-to: 6.7
Change-Id: Ie28eadac333c4bcd8c08fffd17c5ecbce564ccd1
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-04-17 11:41:36 -07:00
Thiago Macieira 85d74a417e CBOR: implement UTF16-to-UTF8 comparison without memory alloc
This is similar to the UTF16-to-UTF16 comparison code added in commit
d4c7da9a07, but instead of converting to
UTF-32, we convert to UTF-8 so we only need to convert one string.

This change allows us to mark the entire recursive comparison sequence
as noexcept.

Change-Id: I5f663c2f9f4149af84fefffd17c07971d8b368cc
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-04-17 11:41:36 -07:00
Thiago Macieira af9f3c5da2 CBOR: fix the UTF8-and-UTF16 detection
This isn't a bug, it just removes dead code. The code to compare
US-ASCII to UTF-16 was never engaged because this conditional was wrong
and effectively catching everything. Fortunately, because that
comparison code is now wrong with the unit tests added to tst_QCborValue
in the past few commits.

Pick-to: 6.7
Change-Id: If1bf59ecbe014b569ba1fffd17c4ce184948e646
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-04-17 11:41:36 -07:00
Tor Arne Vestbø 0533d1d544 QWidget: Remove un-needed nullptr check for oldtlw
Added in 1bd755465e

We already access oldtlw and oldtlw->d_func() in other places,
and the source of oldtlw is a call to QWidget::window(),
which returns the widget itself if it doesn't have a parent.

This should also fix a CodeChecker issue where it thinks
that the other unchecked accesses to oldtlw are suspicious.

Add assert just in case, so we catch it explicitly if for
some reason this assumption doesn't hold in the future.

Pick-to: 6.7 6.5
Change-Id: Iefa9b2df6b25a993afe87e4ee90fe9d2075ebbd0
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2024-04-17 20:41:36 +02:00
Alexey Edelev 0075672da3 Remove the headersclean feature
'headersclean' shoudn't be a feature. The respective flag should behave
like command-line switch that affects the only repo that it was passed
for. This also avoids propagating of the headersclean feature between
the different repos when qtbase was built with the headerclean enabled.

Fixes: QTBUG-121722
Change-Id: I304cbc980b06030513c015a2016678a6a0965fed
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-04-17 20:41:35 +02:00
Anton Kudryavtsev a868c6947a qicc: avoid double lookup
Change-Id: I9da3b37927650ab9dee928156f907ea5c58fc500
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2024-04-17 21:41:35 +03:00
Allan Sandfeld Jensen 7febd6df65 Make possible code-paths asserted
Makes it more obvious to code-checker what is possible.

Change-Id: I8b2bbc55a600e8b570644135867a3244c6d57be7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-04-17 20:41:35 +02:00
Edward Welbourne 880d1aef99 Revise CLDR-generated data header files to use Unicode-3.0 for SPDX
This is the correct license for the data they contain. The types that
are used to package them can be made available under the same.

Pick-to: 6.7 6.5
Task-number: QTBUG-121653
Change-Id: I7fb5f332f9e7f4f6db0f1f0c3964a36ce03bccb2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-04-17 18:30:37 +00:00
Tatiana Borisova 3059f14524 QNativeIpcKey: use new comparison helper macros
Replace public friend operators operator==(), operator!=() of
QNativeIpcKey to friend methods comparesEqual() and
Q_DECLARE_EQUALITY_COMPARABLE macro.

Task-number: QTBUG-120304
Change-Id: If18d86fb18e44f8d2210cba7ca93e4ac478a2a48
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-04-17 20:30:37 +02:00
Tatiana Borisova 7f3e43b32c QKeyCombination: use new comparison helper macros
Replace public friend operators operator==(), operator!=() of
QKeyCombination to friend method comparesEqual() and
Q_DECLARE_EQUALITY_COMPARABLE_LITERAL_TYPE macro.

Task-number: QTBUG-120304
Change-Id: I679f3fa5fcc4c675a763cc5a5fe0e0880439a64f
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-04-17 20:30:37 +02:00
Mårten Nordheim d5d9317c31 QHttpNetworkConnectionPrivate: mark NO_COPY_MOVE
To get clang-tidy to stop complaining about missing
copy/move-ctor/assign

Task-number: QTBUG-102855
Change-Id: Iefc19da324090db3a38d017859ad0a32ae7d6ff5
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-04-17 20:30:37 +02:00
Mårten Nordheim 60ff037364 QHttpNetworkConnectionPrivate: reflow ctor
Task-number: QTBUG-102855
Change-Id: Idcb67b434f9f627a408d730d9cec8d749094728e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-04-17 20:30:36 +02:00
Mårten Nordheim c9e6cdc19e QHttpNetworkConnectionPrivate: NSDMI
Initialize the hardcoded things inside the class.

Task-number: QTBUG-102855
Change-Id: I06da0a615ec066e63d9cd0359313e8e8f588718e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-04-17 20:30:36 +02:00
Mårten Nordheim 28bff27b85 QHttpNetworkConnectionPrivate: move some init logic into a function
Now we can nicely initialize it as a member-initializer.
Do channels at the same time, NSDMI follows.

Task-number: QTBUG-102855
Change-Id: I59c1fe044687500ed3a9d5878c6e4fc137114542
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-04-17 20:30:36 +02:00
Mårten Nordheim e88a2ed83b QHttpNetworkConnectionPrivate: fix clang-tidy mismatching argument
It complains about the declaration arg. name differing from the definition name

Task-number: QTBUG-102855
Change-Id: I005ab69b0f41db0bda3ef64f2c779c3cb3f6fd38
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-04-17 20:30:36 +02:00
Mårten Nordheim 791455c039 QHttpNetworkConnection: Remove redundant/unused ctor
Task-number: QTBUG-102855
Change-Id: Ifcd25c241f2e331b0c271d3462b5a2896797d101
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2024-04-17 20:30:36 +02:00
Mårten Nordheim b85acc8356 tst_QHttpNetworkConnection: Move to use only one ctor
We want to get rid of the other one, it's all internal
API anyway.

Task-number: QTBUG-102855
Change-Id: I2b621c20f4dd7c8bf5f07db8db908c2b7b86976f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2024-04-17 20:30:36 +02:00
Ahmad Samir 785a4a7149 QCompilerDetection: move qsystemdetection.h to inside the include guard
Pick-to: 6.7 6.6
Task-number: QTBUG-124120
Change-Id: Ia3ca4392945a793289fb9c75f50fba1bca1c691c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-17 20:07:48 +02:00
Mårten Nordheim d807a9ebb1 QSaveFile[win]: remove fallback to old renameOverwrite
Our new way of doing it is atomic, so while conflicts can
still happen that leads to e.g. access denied, those will be
because the _target file_ is already accessed for some reason.
The fallback might be lucky enough that it happens after this
other access is done, but probably not. So remove the fallback
and just do the atomic rename.

Change-Id: I13f6b4b70974500b8dd9309138b9052b6a5acc62
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-17 20:07:48 +02:00
Mårten Nordheim 5cf94bcc2f QSaveFile[win]: store error in nativeRenameOverwrite
We want to drop the fallback path, so we need to set an appropriate
error when the native rename fails.

Change-Id: I2746d79b9e5666f54c35ff7ac29a74191cf22740
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-17 20:07:48 +02:00
Mårten Nordheim b26ec1f5dd QSaveFile[win]: only use SetFileInformationByHandle when opened with DELETE
SetFileInformationByHandle only works when we have opened the file with
DELETE access. Since the code is shared with QTemporaryFile it is not
necessarily always a given. Since it was anyway falling back to the old
way of doing it it was not a problem, but it is cleaner to only use it
when we know it will work.

Pick-to: 6.7
Change-Id: I3c744734d45272c41e49bb6971adf4f82213d97d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-17 20:07:47 +02:00
Mårten Nordheim 171ac8aa4e QSaveFile[win]: remove const from nativeRenameOverwrite
I accidentally copied const from another signature.
It's not changing any members so it's technically fine,
but it leaves a bad feeling and we will change members soon.

Pick-to: 6.7
Change-Id: Ib0236d7e7dda84834ba35907d75c52cf77fb3843
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-17 20:07:47 +02:00
Alexey Edelev 36a1fb7256 Expose the qversiontagging.h header file unconditionally
The header file is not guarded properly in qglobal.h. This installs
it unconditionally in systems where version tagging is not supported.

Task-number: QTBUG-124346
Change-Id: I130b7d016e28a7a03d8929bc17fad50c80648f49
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-17 20:07:47 +02:00
Mårten Nordheim fad8d71262 QSslConfiguration: add documentation for HTTP/2 alpn variable
It was missing for a long time

Pick-to: 6.7 6.5
Change-Id: I209838a3c7b45c8c2e8da21efea306fafddea891
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mate Barany <mate.barany@qt.io>
2024-04-17 20:07:47 +02:00
Marc Mutz 7cf57cffbc QByteArrayView: make starts/endsWith(char) constexpr
Their implementations call only constexpr functions, so they should be
constexpr, too.

[ChangeLog][QtCore][QByteArrayView] The startsWith(char) and
endsWith(char) functions are now constexpr.

Change-Id: I41f57ce3428a8de441e3c230aafc7bf426651c9f
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-04-17 20:07:47 +02:00
Giuseppe D'Angelo 7466831509 Long live [[nodiscard]] QFile::open
Having already caught some bugs in real code because of unchecked calls
to QFile::open, this commit marks QFile::open (and open() in other
file-I/O classes) as [[nodiscard]].

Since it's going to raise warnings, the plan is to keep the existing
behavior up to and including the next LTS. Then the warnings will switch
on by default. All of this is protected by system of macros to opt-in or
opt-out the behavioral change at any time.

A possible counter-argument for doing this is that QFile::open is also
used for opening files in the the resource system, and that opening
"cannot fail". It clearly can, if the resource is moved away or renamed;
code should at a minimum use a Q_ASSERT in debug builds. Another
counter-argument is the opening of file handles or descriptors; but
again, that opening may fail in case the handle has been closed or if
the flags are incompatible.

---

Why not marking *every* open() override? Because some are not meant to
be called directly -- for instance sockets are supposed to be open via
calls to `connectToHost` or similar.

One notable exception is QIODevice::open() itself. Although rarely
called directly by user code (which just calls open() on a specific
subclass, which likely has an override), it may be called:

1) By code that just takes a `QIODevice *` and does something with it.
   That code is arguably more rare than code using QFile directly.
   Still, being "generic" code, they have an extra responsibility when
   making sure to handle a possible opening failure.

2) By QIODevice subclasses, which are even more rare. However, they
   usually ignore the return from QIODevice::open() as it's
   unconditionally true. (QIODevice::open() doesn't use the protected
   virtual pattern.)

I'll try and tackle QIODevice in a future commit.

[ChangeLog][QtCore][QFileDevice] The open() functions of file-related
I/O classes (such as QFile, QSaveFile, QTemporaryFile) can now be marked
with the "nodiscard" attribute, in order to prevent a category of bugs
where the return value of open() is not checked and the file is then
used. In order to avoid warnings in existing code, the marking can be
opted in or out, by defining QT_USE_NODISCARD_FILE_OPEN or the
QT_NO_USE_NODISCARD_FILE_OPEN macros. By default, Qt will automatically
enable nodiscard on these functions starting from Qt 6.10.

Change-Id: Ied940e1c0a37344f5200b2c51b05cd1afcb2557d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-04-17 20:07:47 +02:00
Milla Pohjanheimo 067e3ec1bf Add binary compatibility file for 6.7.0
Binary compatibility file added.

Task-number: QTBUG-123281
Pick-to: 6.7
Change-Id: I9fa0f828edc810d1523eb75e242590253c7d7d35
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2024-04-17 10:18:37 +00:00
Morten Sørvig 7f320dddc1 Fix feature dependencies for sharedmemory
The sharedmemory example depends on systemsemaphore
as well.

Change-Id: I0937e6429589f715ec446ac1337e21cb23cdf92b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
2024-04-17 10:06:44 +00:00
Morten Sørvig 7ba4486e7e wasm: log using emscripten_log() by default
Log using emscripten_log by default, unless
QT_FORCE_STDERR_LOGGING has been set.

It is now possible to log at different levels:

   qDebug() -> Info
   qWarning() -> Warning
   qCritical() -> Error

#ifdef out functions which are now no longer in use
on Q_OS_WASM

Change-Id: I0485e5c070069998a8dfc6759c02bc3b7d6a8a4b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-04-17 10:06:19 +00:00
Morten Sørvig d570293bb8 Warn on setHighDpiScaleFactorRoundingPolicy misuse
The rounding policy is used to calculate QScreen geometry
during startup. Changing it afterwards is not supported
since we don't have an update mechanism.

This restriction is already documented but printing
a warning makes sense since this is easy to miss.

Fixes: QTBUG-123102
Change-Id: Ib88511e61abbf97436a13dc5d38d3d1fbd5aab2c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-04-17 10:06:10 +00:00
Morten Sørvig b4090305d0 wasm: introduce QT_BUILD_WASM_BATCHED_TESTS
We are selecting a subset of the tests for batching/CI,
however this is done for the WASM configuration which
interferes with non-batched tests.

- we can only build and run tests which are in the
batching subset
- we are enabling threading tests which breaks the
no-thread configuration.

Add QT_BUILD_WASM_BATCHED_TESTS and enable for WASM and
batching. There's then no restrictions on which tests
can be selected for CI.

Change-Id: I59a67b63e80cd00676cb28f916951d2a52b0ee2c
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2024-04-17 12:02:09 +02:00
Andrei Golubev 0f5f1bfeff Extract metatype information as part of library finalization
Make qt_finalize_target call qt6_extract_metatypes() on any library
targets if the finalization is deferred and the target uses automoc.

This makes sure the metatype information is always available when
necessary (e.g. in QML's foreign types setting).

[ChangeLog][CMake][Important Behavior Changes] With CMake 3.19 or later
qt_extract_metatypes() is automatically called during target
finalization for libraries that use automoc now. This has no
effect if you've already manually called qt_extract_metatypes() before,
but it does make sure that the metatypes are also generated if you
haven't.

Task-number: QTBUG-121199
Fixes: QTBUG-101143
Fixes: QTBUG-99051
Change-Id: If72ce5887a9cd71a4c15e9509b2eaab5af271adf
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-04-17 11:53:13 +02:00