Commit Graph

67883 Commits (08fb81fb170392d5d6384d4abb4de251f8728362)

Author SHA1 Message Date
Mate Barany 08fb81fb17 Add missing variable to code snippet
Task-number: QTBUG-125985
Change-Id: I841339818a31253c6c7d444cd4ba2e66e965f3fa
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 90a9ab2a472e5a9c796deb989ce5db2e099c4382)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 23:09:59 +00:00
Thiago Macieira 9512f44b46 CMake: disable the GCC -Wstringop-overread warning-error everywhere
We were doing it only for MinGW, but it's now showing up everywhere.

Pick-to: 6.7
Change-Id: Ic0adfa808d28487a8303fffd17d9deab60f6cd0a
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit ae71a00c611ce07965d6a4e54e7a5aee3105da5e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 22:59:09 +00:00
Thiago Macieira fce7a45268 Strings: get rid of the last std::char_traits use
LLVM's libc++ became pedantic and insists on only accepting
instantiations for one of the standard Char types, so remove all uses of
it with a template parameter.

Complements dc2ae08e02.

Pick-to: 6.7
Fixes: QTBUG-126214
Task-number: QTBUG-122753
Change-Id: I8c5c4dba62924541bfb0fffd17d7d8ddc78338bb
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit ab05e05f60253b9be615c09aa340ee75f2e5bcaf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 22:59:08 +00:00
Hatem ElKharashy 28b9a653ea QTextHtmlParser: parse border color correctly
Use QCss::Declaration::brushValues to parse the values into a list. This
will not only lead to correctly parsing the values, but also prevent an
an assertion from firing when ValueExtractor::extractBorder is called.

Fixes: QTBUG-126381
Pick-to: 6.7 6.5 6.2
Change-Id: Ic6f3d722ffe0d72dcb5faa9916a23c804211ce49
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
(cherry picked from commit a37ca7c85933979351d99f1bb22191763a78de46)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 22:59:08 +00:00
Tor Arne Vestbø f0f9cc602f Let QWindowContainer know when its top level is about to be destroyed
When the top level window that a QWindowContainer is in is about to
be destroyed the QWindowContainer must reparent the contained window
into a dummy window, as otherwise the destruction of the top level
will bring down the contained window as well.

We were notifying the window container about this situation when
the window container was moved from being a top level itself, to
being a child widget, but did not have any logic for other ways
the window container could lose its parent QWindow.

An example of this was when RHI-needs would result in recreating
the top revel with a different RHI backend.

We now have a last minute call to toplevelAboutToBeDestroyed in
QWidgetPrivate::deleteTLSysExtra().

Fixes: QTBUG-126303
Pick-to: 6.7 6.5
Change-Id: I5b14e156956ae76a8f53cac31904eaadee9e791f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 006cbf658ea1f5986bbe1baafa7c146780320661)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 19:30:49 +00:00
Tim Angus 94e8419ed5 Fix WASM QtLoader environment variable warning
There is a function throwIfEnvUsedButNotExported in qtloader.js that is intended to warn the user when they attempt to use environment variables without adding ENV to EXPORTED_RUNTIME_METHODS. (Presumably) through various changes this function no longer works. This change fixes it and adds to the warning to give Qt/CMake relevant advice.

Pick-to: 6.7
Change-Id: Ia04c087d43bfe5ba988e0cf98230d796f1aaa069
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit 8e04cb27357ab5dffa3d1fd00a416635c7881bc6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 19:30:46 +00:00
Ahmad Samir 3242676cd0 QDirListing: make the class move-only
Define both move SMF out-of-line, otherwise MSVC complains that the
private class isn't fully defined at the point of destruction of
std::unique_ptr<QDirListingPrivate>.

Both move SMF are = default'ed; GCC didn't show a warning about this
issue... different implementations, I guess.

"partially-formed" docs boilerplate borrowed from other existing
classes.

Found in API review.

Task-number: QTBUG-125859
Change-Id: I98b57a14bd94e407d9bfafa9ef32cf40c978d7df
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 4e32a45d492fb057cc996efc6791030f3dd525d5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 19:30:44 +00:00
Tor Arne Vestbø d69e73b9f9 macOS: Check NSRunningApplication.active instead of comparing pointers
When checking whether the current application was the active one
during launch, we compared the pointers of the frontmost and current
app, but these two can be different even for the same app (PID).

This was not a problem in practice, as the result was just that we
would always activate, just as we did prior to the change that
introduced the code.

We now check NSRunningApplication.active instead.

Amends 6343caae25.

Pick-to: 6.7 6.5
Change-Id: Ib3557e5ea676be5291904aaa444f7ede2160e1fd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 0255d3a9af69c9accb23f7ac2c08b19bec9dd6a0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 19:30:42 +00:00
Łukasz Matysiak 5b5d6dfa49 Skip tst_QFuture::whenAllDifferentTypes and whenAnyDifferentTypes on VxWorks
The VxWorks implementation of std::variant is broken.
std::visit throws std::bad_variant_access when called on a variant with
duplicated types.

Skip the tests that are affected by it.

Pick-to: 6.7
Task-number: QTBUG-115777
Change-Id: I45227cc543ef7db2217b1d53313c2e2b140988d6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 0e9c0c0847bd09c8a2b5166a2bafc103db0d3abc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 19:30:41 +00:00
Morten Sørvig 0dcdca5127 wasm: saveFile(): copy data before returning
Make saveFile(char *, size) make an immediate copy
of the data also for the case where we use a save
file dialog.

Previously it would make a copy after the file dialog
was closed, but at that point the content pointer may
be stale if the calling code did not keep it alive.

This makes the behavior for the two save code paths
be identical: a copy of the data will be made right
away, before the function returns. This is also the
only behavior which makes sense, since the function
has no way of communicating to the caller when it is
done with the data.

Pick-to: 6.7 6.6
Change-Id: I890a4897f20251e9abbf90d0a4b96d8ba12d3740
Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit 4b324202433365ff43f623903beefc4286345839)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 19:30:39 +00:00
Mate Barany cd92f7f069 Pimplify QFormDataBuilder
Same will be done with QFormDataPartBuilder in a follow-up patch.

Found in API review.

Change-Id: I863faad8b59ba16ef35b10afd9990c1b82c8634b
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit e763177209a9b50347acae4ddeb9806145385717)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 19:30:38 +00:00
Kai Köhne 48fd0b3807 Use SPDX ID for Bitstream-Vera license
Bitstream-Vera was added to the SPDX database in v3.17 onwards.
So let's use it.

Pick-to: 6.7 6.5 6.2
Change-Id: Ief4b8614d10d1914eb1cc824e7abce789c07250a
Reviewed-by: Lucie Gerard <lucie.gerard@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 672382cd43d9be578c3a27c00c85f1d51338544e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 19:30:37 +00:00
Volker Hilsheimer 8352306cdc QTranslator: fix loading order when loading from locale
A locale's UI language includes the script, e.g. the QLocale::uiLanguage
list for the Australian locale en_AU is {"en_Latn_AU", "en_AU", "en"}.
The old code iterated over each language in the outer loop, and for each
language tried several times, removing a segment from the back with each
try in the inner loop. The de-facto search order was then

en_Latn_AU
en_latn_au
en_Latn
en_latn
en
en_AU
en_au
en

Usually, translation files are provided for country_Territory, i.e.
en_AU. But if an en file (for a generic English translation) was also
present, then en_AU was never tried.

Fix this by breaking the logic into two loops: first, create a list of
candidates by removing segments from each UI Language. Then sort that
list of candidates so that entries with more segments come first. The
search order is now:

en_Latn_AU
en_latn_au
en_Latn
en_latn
en_AU
en_au
en

This way, en_AU gets loaded correctly, before en is tried.

Adjust the test, which was essentially duplicating the logic from
QTranslator to generate files. This only tested that two identical loops
result in the same thing. Instead of using the system locale, make the
test data-driven, and explicitly try en_US and en_AU, with candidate
files generated based on a hardcoded list for each data row.

Pick-to: 6.7 6.5
Fixes: QTBUG-124898
Change-Id: I6bdcff289d2843e61c9053c116e955b79e09e95a
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit 9a11273b745a30cebb5cd648c89eb224e9704492)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 19:30:33 +00:00
Morten Sørvig 61ad998226 wasm: print error message on missing preload file
We would previously try to json-parse the 404 error
message and then abort with an json parse error.

Throw a custom error instead.

Change-Id: I7240294b2b107cd758f22187ae6f2b1d6923fdd7
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit ce62b60d8590f707a0d011e6b95f1f7c729ba4e1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 19:30:32 +00:00
Juha Vuolle 838a2fde28 Extract Method for escaping name/filename multipart parameters
Task-number: QTBUG-125985
Change-Id: Iab10e7a198d883d66c9862073c737f7e703eddb6
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 14a59bf0bfe7add2b6f5810e49cea77bfe0fba1f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 19:30:30 +00:00
Marc Mutz 36019d9368 [doc] QFormDataBuilder: don't state the obvious
If a function returns a unique_ptr by value, the caller cannot but
take ownership of the payload object.

Change-Id: I0465e4daf42b57aa33203d66fdc3231ae9a88751
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 3d2a194edd7aa758f3df3b2b853929945dbc6659)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 19:30:28 +00:00
Marc Mutz cb65bbf02b [doc] QFormDataPartBuilder: mark private build() as \internal
It makes no sense to document (non-virtual) private functions.

Change-Id: Ifeed52ea5e9a5b8e358277140419c8d68204a45b
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 19b7a08fc24c5947fb1ea921e3d24f4efce4d1fb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 19:30:26 +00:00
Morten Sørvig 30786c02d9 wasm: don't make normal-state windows StaysOnBottom
Setting StaysOnBottom creates a special case where
the first window is always kept at the bottom of the
window stack.

However this becomes confusing if the first window
is not maximized or fullscreen, since it's then not
possible to bring it to front by clicking the title bar.

Add a check on the window state, and set WindowStaysOnBottomHint
for maximized or fullscreen windows only.

Change-Id: I0f43874cfcdc7c951c47cd278f5acdd42368cd5a
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
(cherry picked from commit 1d612c5100a02d3d4f9b1caba3489e76ef6a81fe)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 19:30:24 +00:00
Eskil Abrahamsen Blomfeldt 260685d1ee Make it possible to create distance field with specific size
The distance field size calculation is floating point math
and  sensitive to numerical errors. When used in Qt Quick,
it is vital that the allocated memory is the same as what
we calculate in the cache, otherwise we will get memory
corruption. In certain cases, numerical errors would cause
a qCeil() to round what was actually an integer up, and
we would end up with an allocated size that was off by one.

To avoid this, we allow the user to specify the size to
allocate, so that we can do the calculation in a single
place.

Pick-to: 6.7 6.5 6.2 5.15
Task-number: QTBUG-124572
Change-Id: I14e381952fdf331286f1ae4b51bb5fef9e39d704
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit b959b8f5ed537f530221e0174b723ea39a34cd58)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 19:30:22 +00:00
Morten Sørvig 56d0227a73 wasm: prepend underscore for invalid EXPORT_NAMEs
JS identifiers may not start with a digit:

  em++: error: EXPORT_NAME is not a valid JS identifier: `2dpainting_entry`

Change the regex to match leading digits as well (note it is
inverted).

Prepend an underscore instead of replacing the invalid character;
this makes sure we don't create new conflicts between for example
"2dpainting" and "3dpainting".

Change-Id: If78a87e7ed352b88bc99aee7c5829facf1fc35a0
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit a3ab79ec8cab51255b108646f475c5796448d1a1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 19:30:20 +00:00
Łukasz Matysiak fd1066ad41 Force requested permissions when calling mkdir on VxWorks
Calling mkdir with mode == 0 works just fine on Linux - it creates a
directory and the permissions are set to 0.
On VxWorks, calling mkdir with mode == 0 uses the default mode set in
the system.
This leads to a failing test (tst_QDir::mkdirWithPermissions(0000)) and
potential confusion when the same code does not behave in the same way
when called on Linux and VxWorks.

To keep the same interface between unix-like systems, explicitly set the
permissions to 0 when on VxWorks.

Pick-to: 6.7
Task-number: QTBUG-115777
Change-Id: I75e429c086500cb7c19f9bb14693bb4266e18046
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Michał Łoś <michal.los@siili.com>
(cherry picked from commit 90e79aea8e3f297de65a69d4e6c82a5d753b9c86)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 19:30:18 +00:00
Ahmad Samir ea138d7557 QPaintDevice: inline keyword only on a method's declaration in-class
Putting `inline` on the definition and not the declaration could cause
some issues with some compilers, e.g. MinGW[1].

Putting `inline` on a method's declaration and definition is redundant;
I am not sure if that could cause an issue with MinGW, but just in-class
on the declaration is enough/more-idiomatic.

Amends a5953d20e2.

Found in API review.

[1] https://wiki.qt.io/Things_To_Look_Out_For_In_Reviews#Methods item
1.2

Change-Id: Ieaba422670261330b5558f60dce2fcca2cb2723b
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 77f5846d213b8355d369695c68d585d0d5fa47ce)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 19:30:15 +00:00
Mate Barany 4ca0c6db5e Add move semantics autotest for QFormDataBuilder
Change-Id: If9df38f0afd09218c15587b2864edb957cbbdaac
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 12d2ba9c913d03d637ffb9d123949a5f45e69e5e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 19:30:13 +00:00
Oliver Wolff 679807b506 tst_qfuture::signalConnect: Fix failure condition for MSVC
The test failure seems to be related to code optimizations and not
to the c++ standard that is used. With a recent version of MSVC
(>=19.40) the test fails on both x64 as well as ARM64 if the build
configuration does code optimizations (aka we have a release
build).

Pick-to: 6.7
Fixes: QTBUG-126349
Change-Id: I01781ea5b20f80a6cbd7ccb284d30b5d078ad958
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit d8cb2044e3e86633c732f1f1b28926062b08b76c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 19:30:11 +00:00
Volker Hilsheimer 5c17246188 JNI: add test coverage to confirm assumptions about array validity
When the Java array that we hold a reference to is changed on the Java
side, then our reference continues to be valid, and references a
different object than the new array in Java.

Change-Id: If8743cc1b2fabb254b9c0009f41377455719ec3e
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 37bb00d8507a4def05b5d85a6ef4ea23cca70ab6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 19:30:08 +00:00
Volker Hilsheimer 9cb2200d4f JNI: pre-declare JNI classes for standard Java types
This avoids that we or users have to declare e.g. String or Uri in
several places in Qt. This also prevents problems where multiple
declarations (possibly from different headers) cause build errors.

As a drive-by, remove some unnecessary type declarations (e.g.
UriType, which had the same class string as Uri).

To ease the submodule update process, define a preprocessor symbol
that submodules can use to conditionally declare the type locally.
Once the dependency update is through, the symbol can be removed
and submodules can use the declaration from qjnitypes.h.

Change-Id: I7d96edf644a54246302b5c5cb478e66fa615e73e
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 457a1c973d68e705f9cf72ac72b19fc26cdb2917)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 19:30:06 +00:00
Volker Hilsheimer 1adc8648c1 JNI: Allow list of namespace to be passed into Q_DECLARE_JNI_CLASS
Make the macro variadic. For N > 2 arguments, interpret the first
N-2 arguments as nested namespaces that are declared as inline
namespaces. We can then construct the signature string from those
namespaces, so

Q_DECLARE_JNI_CLASS(String, "java/lang/String")

is equivalent to

Q_DECLARE_JNI_CLASS(java, lang, String)

except that with the second overload, the C++ type will be in the
QtJniTypes::java::lang namespace. Since both the java and the lang
namespaces are made inline, QtJniTypes::String still works.

This helps with avoiding conflicts, as there might be Java classes
in different packages, but with the same name.

Change-Id: I0355239e7fc3c91cb26e041f19c4e0853d3678ac
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 2b1312bc954b72f59d0c1d7b1192e2f029016012)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 19:30:04 +00:00
Alexandru Croitor 7e831c3b66 coin: CMake: Add instructions to generate JSON and verify the SBOM
If the VerifySBOM feature is enabled, pass additional options to
CMake configuration:
- runs syntactic verification of the SBOM
- so it converts the generated SBOM files into JSON files (and
  installs them). This does additional useful validations.
- runs the NTIA SBOM verifier
- shows some of the content in the SBOM in a more user-friendly table
  format via the sbom2doc python app
- runs sbomaudit to show things like packages without a license
  expression, doesn't exit with errors if issues are found.

To ensure the tables are wide enough in the log on the CI, we set
an explicit value for COLUMNS env var, which is used by sbom2doc
to determine the table size.

To ensure the sbom2doc and sbomaudit python applications are found,
we supply additional locations where they can be found, via the
env vars that coin python provisioning sets.

We also make sure to pass the found application paths when executing
the python apps, because they might not be in PATH by default.

Task-number: QTBUG-122899
Change-Id: I0baef8b9c949209b15ab304e1e840b4dcdf5a61c
Reviewed-by: Toni Saario <toni.saario@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 83ff34d1c626759224a95f39bca8337a8390ed52)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 19:29:55 +00:00
Tor Arne Vestbø a9d3a0b47c macOS: Don't use full screen geometry for popups
The fullscren geometry when an application is in full screen includes
the area above the menu bar. Unfortunately, when clicking on areas of
a Qt popup that overlays the menu bare area we get a callback for
NSMenuDidBeginTrackingNotification, and as a result we close all
popups. As macOS for some reason treats the menu bar area as special
and tracks clicks there even if another window is on top, we should
not put our popups there.

This also matches the geometry of windows shown full screen, which
does not overlap the menu bar area either when using the native APIs
to make a window fullscreen (which we do).

This change does not affect the original issue (QTBUG-39403), as the
QScreen::availableGeometry() nowadays does not exclude the area of
the Dock when in fullscreen mode.

Pick-to: 6.7 6.5
Task-number: QTBUG-39403
Fixes: QTBUG-123298
Change-Id: I5890d7fc7a9b95a98b8fd2b9ce58ed9789e7f36e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 7f63b0fabb3f2ae67596cc061f202ddd77ddf56b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 19:28:57 +00:00
Marc Mutz 44a94e03dd tst_QSharedPointer: check QWeakPointer vs. virtual bases
This fell out of my tracking of a failure of the new QPointer
conversion feature, and it would be a waste to throw it away unused.

Pick-to: 6.7 6.5 6.2 5.15
Change-Id: Ie255b4a6432b4763071e5712d92e9ccd57927052
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit 0e40a3f6645a684458cbb09bef1353df2eec5e0b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 19:05:31 +00:00
Topi Reinio 3b1d3db793 Doc: Qt Core: Increase warning limit to 2
Technically the Qt Core documentation builds without warnings, but
testing in CI two warnings are observed:

  warning: Already generated qtcore-attribution-extra-cmake-modules.html
           for this project
  warning: Already generated qtcore-attribution-kwin.html
           for this project

These pages come from a qtattributionsscanner-generated source file,
codeattributions.qdoc.

The warnings do not affect the generated output. Increase the
documentation warning limit temporarily to let integrations pass.

Task-number: QTBUG-126546
Change-Id: Ic8641c69b2818c72af72cdc23161314caf376c27
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit cec470561df663a7ea8f0a0ab65fb80b50cacb12)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 19:05:30 +00:00
Morten Sørvig 72dad27a25 wasm: refactor cmake finalizers
Avoid duplication and move finalizer code to a new
function "_qt_internal_finalize_wasm_app", which can
be called from the add_executable functions.

Change-Id: I4859a3999725ebf61a496d78665b6a259dfeb0f5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit 2116c62256bbf1bc3d516430509a93177572d86f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 12:51:33 +00:00
Morten Sørvig c4106cee7c wasm: set embind option in executable finalizer
This prevents setting it more than once, which will
on recent Emscripten versions cause 'duplicate symbol'
linker errors.

Change-Id: Ie6c2ede0569271cf3a02fc993b14bbf27f69ff57
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit 320cb68ce5c0c718c6434adfefa6c7460e3cb08a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 12:51:30 +00:00
Morten Sørvig 74f8f0102e wasm: remove DEMANGLE_SUPPORT
This linker option is now deprecated (and not needed,
since stack traces always contain demangled symbols).

Change-Id: If42c692c006b214fa3df418c09680aaa07ea2bbd
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit a8b7da59cba56b535393f50cd7432a412021d8d2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 12:51:27 +00:00
Rym Bouabid d06924baef qlibrary_unix.cpp: Make adding 'lib' prefix possible even when the file name starts with 'lib'
Loading QLibrary("library_manager") and QLibrary("lib_example") is not
possible if their binaries are called liblibrary_manager.so and
liblib_examplep.so.

Remove this prefix check: if (!prefixes.at(prefix).isEmpty() &&
			      name.startsWith(prefixes.at(prefix))
,in order to allow calling dlopen() with "lib" prefix added to the name
even if the name starts with "lib".

The drawback of removing the check is that extra dlopen() calls will
take place in other cases such as: "libexample.so". In this case we
will have two extra calls of dlopen() taking "liblibexample.so" and
"liblibexample".

Fixes: QTBUG-23470
Pick-to: 6.7 6.5 6.2
Change-Id: I2c0b1b81edf8253443388aa67d24f4cd64d4123d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 2f11edad9e87311a977cb6edbd908a9fdd86a567)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 09:43:43 +00:00
Mate Barany 7a41956df0 Use fully qualified signal arguments in QDnsLookup
Detected by an Axivion scan.

Task-number: QTBUG-125026
Change-Id: I426ee40d5bfd6c473a90e76d207817596f7aab0f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit ecd38b85dc80f899b685d3c6c031dcabb3c63211)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 09:43:37 +00:00
Mate Barany 766244e033 Use fully qualified signal arguments in QNetworkInformation
Also in QNetworkInformationBackend.

Task-number: QTBUG-125026
Change-Id: I3cc722a9e6db284a393bfddf0dfa4ebbcb6b4d07
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit d9d384b94fba0e15ed7f564309b0fbc48e5f4d7a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 09:43:33 +00:00
Volker Hilsheimer 7225d11156 JNI: don't inherit declared types from JObject
JObjectBase has a protected destructor, but JObject doesn't, so
inheriting from it might result in UB. Declare the Type as an alias to
JObject<TypeTag> instead. Specialize the traits for the TypeTag, and
add a partial specialization of the traits for JObject<T>.

Adjust the return type of the named constructors of JObject.

Change-Id: Ibe74c3cd3b3a2a81779117dd2d228684c365a845
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 691f6b5b0c9dc69f8d019abc53747e7a6bbf6ef8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 06:54:34 +00:00
Sami Varanka 6b2cbb3fd6 Include horizontal scrollbar's size in sizehint
Amends 8c18a245b0

Pick-to: 6.7 6.5
Fixes: QTBUG-123886
Change-Id: I1ae2e29ce12610e10a8c0640458a3812a926c4cc
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 0fa6660352df18134757a9c3f9dd329053e31cab)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 06:54:30 +00:00
Marc Mutz ada5f8b646 tst_QSpan: port to QTEST_THROW_ON_FAIL
Dogfooding the new QtTest 6.8 feature, and greatly simplifiying the
source code.

Change-Id: I0731d7291048e6bbed19666d1b6672e5cccaf27a
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 157fcdf5afbe4e6b421713947ccdb4ee35116ee4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-20 01:55:26 +00:00
Marc Mutz 9a86dba130 tst_QRegularExpression: port to QTEST_THROW_ON_FAIL
Dogfooding the new QtTest 6.8 feature.

Change-Id: I530814c0858565b46f462d5c66038a37140c0617
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 7885d5cb220cee04f892ecdba46a1fc3dc65eeae)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-19 23:32:05 +00:00
Marc Mutz 7e021ab891 tst_QAbstractProxyModel: port to QTEST_THROW_ON_FAIL
Dogfooding the new QtTest 6.8 feature.

This not only helps with the sourceModelBinding() test with its manual
currentTestFailed() calls, but also the old verifySubSetOf() helper
function that's there from Qt 4 times.

Use Ye Olde Scope Guard Trick™ to replace the qDebug() messages
recording where failures occurred.

Change-Id: I4d1460bde5315dfcc3b261b6e09c7293bbd9ff89
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 32fc8b936d1d036ba5b70ec1cac7681e1c9359c8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-19 23:31:58 +00:00
Marc Mutz a9ebd2d64e tst_QAnyStringView: port to QTEST_THROW_ON_FAIL
Dogfooding the new QtTest 6.8 feature.

Change-Id: Ied115f33990040b92f49b319c36d20f7510e6eac
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 757e3d77ac186988a3fe8bed9706c5792caa2666)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-19 23:31:51 +00:00
Marc Mutz df055c0256 tst_QCborValue: port to QTEST_THROW_ON_FAIL
Dogfooding the new QtTest 6.8 feature.

Change-Id: I1415e6af94eab3bb47d3f8d319f84554faa52d45
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit c8e33fc4fd1151edb3df4815f5fbae03eb1ea353)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-19 23:31:45 +00:00
Marc Mutz 5ba8e27800 tst_QCborStreamWriter: port to QTEST_THROW_ON_FAIL
Dogfooding the new QtTest 6.8 feature.

Change-Id: Ie197dc94fb9dfebd5f730c7ca4ef5ce0ed07e9f3
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit eec0a30e5e0c64a8f373b59290b8e6c0bc88c17c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-19 23:31:29 +00:00
Volker Hilsheimer 9b6087b0dd Accessibility: remove compatibility alias for AnnouncementPoliteness
It was only needed to support a smooth submodule update.

Change-Id: I7546b8565bd3f2cb2c5141fc6ea36d1c76f11c48
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit 5ee8ca2e94336e28374308e768f541c58b7725a8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-19 14:14:37 +00:00
Łukasz Matysiak 8f66370ecf Handle VxWorks in QFileSelector
QFileSelector tests fail, because VxWorks is not properly categorized.
Even though it is not a unix-like system, it does provide a
compatibility layer that enables some unix utilities.
It has also been treated as unix on the Qt 5 customer branch.

Solve the issue by assigning VxWorks to the unix category in
QFileSelector and its tests

Task-number: QTBUG-115777
Pick-to: 6.7
Change-Id: Icab80764b66b121995f51ddf149de55dc8c9eb55
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit da5de2926ac9573b13d0d743e43e685cbdb2abaa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-19 14:02:58 +00:00
Łukasz Matysiak 56ec3aa56a Handle VxWorks in QSysInfo
Right now VxWorks is not recognized as a known platform in QSysInfo.
This leads to issues with classes that depend on it to properly handle
the OS specific functionality (like QFileSelector).
Solve the issue by adding vxworks-specific implementation of
kernelVersion, productType and productVersion.

Task-number: QTBUG-115777
Pick-to: 6.7
Change-Id: Ib544d19f604f3f2d1f088f6160dd210cd6743717
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 65b5debe3a22ff47cf77dd25cf1ec85582ca0f6c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-19 14:02:51 +00:00
Toni Saario 9e5759cd2a Coin: Add a way to disable test upload
The use case is where blocking test building is wanted but they cannot
be uploaded due to being static or they would simply be unused.

Pick-to: 6.7
Change-Id: I32ad20fea2ec032fb1f1a9b86025b34f192e0ed2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 6a0c94b62d948d3da0da241cf1e6c15188069169)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-19 13:14:45 +00:00
Alexandru Croitor 27ecdc611c CMake: Mark wasm platform plugin as GPL3 in SBOM
Task-number: QTBUG-122899
Change-Id: I107f4432bf484ea0fb57908db936ab5fda6bd39e
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 877ba5504cb4ed5a9bd0c130ea7547de6425c525)
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-06-19 10:15:40 +02:00