Commit Graph

66121 Commits (6901ad665daba4dfdaf06fee1be332fc8a018efd)

Author SHA1 Message Date
Axel Spoerl 6901ad665d QDockWidget: add notification signal to floating property
The toplevelChanged signal notifies about changes of the floating
property.

Add it in property declaration.

Change-Id: I06be59a24e2732030be26d87ce38f6ce58bdebbc
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2024-03-08 05:23:31 +00:00
Mitch Curtis d130886997 configure-cmake-mapping.md: add -qt-host-path and -DQT_HOST_PATH
Pick-to: 6.5 6.6 6.7
Change-Id: I6deb7b648c39adb8fb2765de5be29b0743ef2836
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-03-08 10:30:10 +08:00
Axel Spoerl 78a3301372 QDialogButtonBox: Don't set focus in a dialog with StrongFocus children
A QDialogButtonBox with the first accept button becoming default, didn't
explicitly set focus on such a button in a QDialog.
d44413d526 implemented this missing
functionality. It set focus to the automatic default button, unless the
QDialog had a focusWidget() set.

That has caused a regression, in cases where
- the QDialog has a QWidget child with a Qt::StrongFocus policy, and
- the QDialog is not yet visible, so focusWidget() returns nullptr.

Amend d44413d526ec12ed83acd7343c2005782178c7ad:

Implement a helper in QWidgetPrivate, that returns true, if a child
with a given focus policy is found.

Do not set focus to a QDialogButtonBox's automatic default button, when
- not located inside a QDialog, or
- a focusWidget() exists, or
- the dialog has QWidget child with Qt::StrongFocus, that is not a
child of the QDialogButtonBox.

Add an autotest function.

Pick-to: 6.7 6.6 6.5
Fixes: QTBUG-121514
Fixes: QTBUG-120049
Change-Id: I3c65ae36b56657f9af4a3a4b42f9b66e8bc5c534
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-03-07 23:00:33 +00:00
Allan Sandfeld Jensen 8a6d9ac7bc Add A2B tables, and PCSLab support to QIcc
This finishes off ICC color space support in Qt (short of the
optional multi process elements), and includes necessary parts for
potential CMYK support (PCSLab and A2B support)

[ChangeLog][QColorSpace] ICC profiles that are not three-component
matrix based are now supported.

Task-number: QTBUG-108175
Change-Id: Ie29b17a366d9ba0ea8135e1752530d6bb19e7520
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2024-03-07 23:42:41 +01:00
Michał Policht 5010eda534 Windeployqt: introduce --include-soft-plugins command line option
Some plugins may have dependencies on additional Qt modules. This is
handled by deployPlugin() function. Existing code does not look for plugins
associated with these modules however, because the loop iterates over
plugin directories only once. This change introduces an option that will
make windeployqt take into account all such soft dependencies by making
recursive calls to findQtPlugins().

Pick-to: 6.7
Task-number: QTBUG-121583
Change-Id: Id6535426a47f9b92a3035e864dfdd7577b82c9ad
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Timothée Keller <timothee.keller@qt.io>
2024-03-07 23:42:41 +01:00
Juha Vuolle d8f6425fef Add a QHttpHeaders convenience method for unique header name setting
The function replaces one of the found entries with the new value,
and removes any other entries. If no entries are found, a new entry
will be appended. The replacement search is done for performance
reasons; it's cheaper to replace an existing value.

All in all the function is a more convenient and performant
alternative for this sequence (which proved to be common while
porting QtNetwork internals to QHttpHeaders):
header.removeAll(<headername>);
header.append(<headername>, <value>);

[ChangeLog][QtNetwork][QHttpHeaders] Added replaceOrAppend()
convenience method, which either replaces previous entries with
a single entry, or appends a new one if no entries existed

Fixes: QTBUG-122175
Change-Id: I03957645d7e916a732ac7b8d3ae724bb6b16af87
Reviewed-by: Lena Biliaieva <lena.biliaieva@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-03-07 23:38:09 +02:00
Cristian Adam 269187bfa2 Android: Add Thread.sleep before loading main in Debug mode
This helps with the jdb debugging settling, and the native debugger
can hit breakpoints at the beginning of main() function or in case
of unittests at initTestCase() function.

By default in debug mode the delay is 1000ms. This value can be changed
with the environment variable: QT_ANDROID_DEBUGGER_MAIN_THREAD_SLEEP_MS

Fixes: QTCREATORBUG-30425
Pick-to: 6.7 6.7.0
Change-Id: Ica0c6080c55468579a28eecf8f45cff68d99c3a8
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-03-07 21:34:00 +01:00
Wladimir Leuschner 91b04d5cf1 QWindows11Style: Draw ScrollArea opaque in QAbstractItemView
Pick-to: 6.7
Change-Id: Ica2c62355a576dda4eaefacbc41b8609009d0073
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2024-03-07 15:13:38 +00:00
Inho Lee 50c81f5490 Fix offscreen rendering in QOpenGLWidget
Amends 68a4c5da9a

In a case sharing QOpenGLContext,
offscreen renderings cannot get QOpenGLContext from Rhi.

Fixes: QTBUG-123005
Pick-to: 6.7 6.6 6.5
Change-Id: I9baae5e5c77878885f73ee39df5cd39117e8f1c2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2024-03-07 16:10:02 +01:00
Lucie Gérard f9136fd0db Correct wasm util file
License is set to that of the other files in the directory

Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: I9922feb2a520a549ab9cc1d82a85417202ad83c3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-03-07 16:10:02 +01:00
Friedemann Kleint 8cd7a3d472 Fix menu size in multiscreen setups
During QMenuPrivate::popup() and QMenuBarPrivate::popupAction(),
QMenuPrivate::popupGeometry() is called from updateActionRects() with
screen = 0 several times (from sizeHint() and various event handlers
triggered), which causes it to return the primary screen geometry
always.

To fix this for the non-QGraphicsView case, use the screen of
the menu when it is visible or the screen stored in a newly introduced
popupScreen member variable, which is set from a few places
in QMenuPrivate::popup().

Fixes: QTBUG-118434
Pick-to: 6.7 6.6 6.5
Change-Id: I6b18593d313719d628b0856004197ac59f46c270
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-03-07 15:09:58 +00:00
Giuseppe D'Angelo 9069b7fb20 Realign columns in the configure-cmake-mapping
Change-Id: Ie7c3c35b6e5a8d02d05650b86f6c2d47b72c3835
Pick-to: 6.7 6.6 6.5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-03-07 16:09:57 +01:00
Piotr Wierciński c2b359721d wasm: Temporarily disable selenium tests
Task-number: QTBUG-122729
Change-Id: I923edcd10d410e7836b5e3868d11d14dcd3e1c13
Reviewed-by: Simo Fält <simo.falt@qt.io>
2024-03-07 11:39:17 +01:00
Lucie Gérard d5d1bfd8e8 Add a licenseRule.json file for checking of SPDX license identifiers
The license test in qtqa reads this file
in order to check the validity of the license used.
This file reproduce the QUIP-18 [1] rules, with some exceptions.

Each entry in the file corresponds to a set of licensing rules.

A set of licensing rules can depend on the file ending,
registered in "file_pattern_ending". The last entry in the
file has no "file_pattern_ending", it sets the rules for the
files whose licensing does not depend on their ending.

The license to be used depends on the location
of the file within the Qt module repository.
Let's call this "<true_location>".
The  "<true_location>" can also correspond to a file name,
offering flexibility for exceptions to the rule.
The "<true_location>" are registered in "location".

For each "<true_location>" there is a
"file type" entry and a "spdx" entry.
The "spdx" entry gives the rule:
the expected license tag(s) in SPDX format
for the file ending (if applicable) and "<true_location>".
The "file type" informs on the QUIP-18 type
the tested file corresponds to. It is purely informational
for the reader.

The set of rules are tested in order of appearance
in the json file. For this reason, a more constraining
ending (like "special.txt") needs to appear in
a "file_pattern_ending" located before
the "file_pattern_ending" of a less constraining ending (like ".txt").
Also, a file ending cannot be present in two "file_pattern_ending".

"file_pattern_ending" and "spdx" should list strings.
"<true_location>" can be regular expressions.

During the test the deeper "<true_location>" are
checked first. The order is which they appear in the json file
does not matter.

To test this file, run
QT_MODULE_TO_TEST=../qtbase perl tests/prebuild/license/tst_licenses.pl

[1]: https://contribute.qt-project.org/quips/18

Pick-to: 6.7
Task-number: QTBUG-121039
Change-Id: I720800507622701b80c76e78e68817c6c39c2407
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-03-07 11:08:18 +01:00
Lucie Gérard c2333f312f Correct license for examples files
Example takes precedent over build system file type.
According to QUIP-18 [1], all examples file should be
LicenseRef-Qt-Commercial OR BSD-3-Clause

[1]: https://contribute.qt-project.org/quips/18

Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: Id348a89884bb309b96abb31077f14a51086b5d0c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-03-07 11:06:43 +01:00
Wladimir Leuschner f75e554c6a QWindows11Style: Update font size in menubar items and spacing between items
Reduce the spacing between menu bar items and change
font size to 10pt.

Fixes: QTBUG-120639
Pick-to: 6.7
Change-Id: Ic16e74f4a2426be6d6ef40904919d92785d96ce5
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2024-03-07 10:05:38 +00:00
Juha Vuolle 68ae776e73 Remove 'const' from variable that may be moved
std::move on const object is ineffective, and the code will
use a performance-wise costlier SMF

Amends: 0c05d2b43e

Pick-to: 6.7
Change-Id: Id4a639d9a037c3f1d79ea60faa2715075462fea1
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-03-07 07:21:58 +02:00
Eirik Aavitsland 210f2004df Update bundled libpng to version 1.6.43
[ChangeLog][Third-Party Code] libpng was updated to version 1.6.43

Pick-to: 6.7 6.6 6.5 6.2 5.15
Fixes: QTBUG-122989
Change-Id: Id439e64010bc3f6752f5589d663827a91f009173
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2024-03-06 23:40:12 +01:00
Thiago Macieira c0ac143114 Doc: fix warning "class Qt::TimerId' specified with '\enum'"
Amends 4bc0834bc1.

Change-Id: I6818d78a57394e37857bfffd17ba0f3897b2a5f5
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-03-06 05:42:21 -08:00
Volker Hilsheimer 10afa38aa4 JNI: Fix error with overload resolution when passing string types
The variadic templates are supposed to be removed from the
overload set when any of the parameters is a literal string type,
as otherwise we get conflicts with the legacy overload taking
class names and signatures as const char *. The detection of
a literal string types was missing a few specializations, so that
we ended up with the wrong overload being called, and class
names getting interpreted as method names instead.

Add the missing specializations, and add more test coverage
for using the old overloads.

Task-number: QTBUG-122235
Pick-to: 6.7
Change-Id: I5488f2009c8f62d74fac6754844f57cf64011414
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Lauri Pohjanheimo <lauri.pohjanheimo@qt.io>
2024-03-06 13:00:19 +00:00
Rym Bouabid 8103d29e94 QUrl: Use new comparison helper macros
The class had operator==(), operator!=() and operator <() defined as
public member functions, so use QT_CORE_REMOVED_SINCE and
removed_api.cpp to get rid of these methods and replace them with hidden
friends.

Use QT_TEST_ALL_EQUALITY_OPS macro in unit-tests.

Use new \compares command in the documentation to describe the
comparison operators provided by QUrl.

Task-number: QTBUG-120303
Change-Id: Ic4fa2335292cc4b75ad2373832c0b89d768f529c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-03-06 11:09:21 +01:00
Thiago Macieira 907e9a8b29 Move qAbort from qglobal.cpp to qassert.cpp
It makes more sense there, as all the other functions in that file are
about early termination. This allows us to remove qglobal.cpp from the
bootstrap library, because qglobal.cpp now only has the callback tables.

Amends 8f13af5d7b.

Change-Id: I01ec3c774d9943adb903fffd17b7ea92404bdbd3
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2024-03-06 02:09:16 -08:00
Thiago Macieira 1560e0161a QtPrivate::equalStrings(): enforce matching size where applicable
Commit 8a7b74f6e7 added these functions
and already placed the checking for the size in the inline code. Aside
from the operators==, the only other place that calls equalStrings()
directly is QAnyStringView::equal() and that also checks the size for
the non-UTF-8 string views do match. Unfortunately, the size checking
for UTF-8 was only added in 52e0a91fbc.

This reverts commit e0eb93d9a2
("QLatin1StringView: delegate operator== to QByteArrayView") because
that would compare the sizes again.

Change-Id: I83dda2d36c904517b3c0fffd17b38e422b5e2c25
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-03-06 02:09:16 -08:00
Thiago Macieira a6a5681470 QLibrary: remove the unnecessary parentheses around dlerror()
We don't need a message like:

"Cannot load library nosuchlib: (nosuchlib: cannot open shared object file: No such file or directory)"

Pick-to: 6.7
Change-Id: I01ec3c774d9943adb903fffd17b76599cea47502
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2024-03-06 04:09:16 -06:00
Thiago Macieira 24245d2a85 tst_toolsupport: make the i386 case really about i386
Specifically, don't use it for either of the x86-64 ABIs (LP64 and
ILP32). The generic case below should work for everyone.

Fixes: QTBUG-122720
Pick-to: 6.7
Change-Id: I01ec3c774d9943adb903fffd17b75fc79095e089
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-03-06 11:09:16 +01:00
Marc Mutz ff7e5987ec Revert "QStringView: simplify the constructor from QString"
This reverts commit 7d18ad49a3.

Reason for revert: This changes the constructor from being a template
to being a normal function, so changes overload resolution. The commit
message gave no indication on why this is safe. Since it's just a nice
to have, revert instead of running the risk of breaking code.

Pick-to: 6.7
Change-Id: Icd506e7221bb50c99f276f6a43c15403ec0be7a9
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-03-06 11:09:16 +01:00
Giuseppe D'Angelo 7f7b5ff3a1 QSpan: add construction from initializer_list
P2447 has been merged in C++26, backport the same functionality.

This makes QSpan<const T> a proper replacement for a const QList<T>&
parameter, because now both can be built via a braced-init-list.

  // void f(const QList<int> &l); // old
  void f(QSpan<const int>);       // new

  f({1, 2, 3});                   // now OK

This is, technically speaking, SiC: in the presence of both `f`
overloads, the code above would have called the QList one. Now instead
the call is ambiguous.

We've been there already -- this is QString and QStringView all over
again, and the solution is the same: get rid of the owning container
overload. I'd rather have this construction *sooner* rather than *later*
in order to minimize the fallout.

And just like QString vs QStringView, there's nothing really doable to
prevent instant-dangling situations:

  QStringView v = getString();    // dangles
  QSpan<const int> s = {1, 2, 3}; // ditto

except for using QSpan (QStringView) as a *parameter type only*.

Note that QSpan with dynamic extent was already convertible from
std::initializer_list through its ranged constructor. However this fact
alone doesn't unlock the above syntax. QSpan with a static extent was
also convertible for the same reason. (This is non-standard:
std::span's range constructor for static extents is explicit, but QSpan
doesn't follow that design choice and makes the constructors implicit
instead.)

Found in API-review.

Pick-to: 6.7
Change-Id: I160ab5b292b0c2568cd9a7ad1b4430085f475c29
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-03-06 08:44:46 +00:00
Juha Vuolle a83248dd9f Add include for QT_CONFIG
To not rely on transitive includes.

Pick-to: 6.7
Change-Id: I116483f94bba4a6edb0a78941da676b1a3e6e1bd
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-03-06 06:41:11 +02:00
Juha Vuolle 033b52c0ad Add QT_CONFIG(signaling_NaN) around the signaling_NaN limit function
Amends: 398a51686e

Found in API-review.

Pick-to: 6.7
Change-Id: Ia9be5bc5bdcf7aa2960e9c88f961bf8168435a70
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-03-06 06:41:07 +02:00
Shawn Rutledge d14eec536d QTextMarkdownImporter::import(): don't crash if file has only yaml
If a markdown file has FrontMatter, we look for the end of the newlines
after the `---` marker to begin parsing the actual markdown. But check
bounds in case the file contains only front matter and not markdown.

Fixes: QTBUG-122982
Change-Id: I09c4ae90c47ebd84877738aecc1d1cad0b0bfca2
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-03-05 16:12:33 -07:00
Shawn Rutledge 81f174d796 Add categorized log message in QTextMarkdownWriter::writeFrontMatter()
There is logging in QTextMarkdownImporter::import(); in case something
goes wrong, it's useful to compare the size during reading and writing.
Amends bffddc6a99

Task-number: QTBUG-120722
Change-Id: I5f60305ca84d48f91bbb18e9c10ea4010005b356
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-03-05 16:12:23 -07:00
Nodir Temirkhodjaev 1e836fff18 QFutureInterface: Rename "interface" variables to "iface"
On Windows the "interface" is defined as "struct".
Do not #undef it to fix a unity build.

Task-number:  QTBUG-122980
Pick-to: 6.7
Change-Id: I9379c996d8b67b16a8b825af0ff3469111533291
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-03-05 19:58:15 +03:00
David Redondo 986de654b8 Map drag event positions to global during dock/toolbar drag
Drag event positions are window relatives, QMainWindowLayout::hover
expects global coordinates however.

Fixes: QTBUG-122949
Pick-to: 6.7 6.6
Change-Id: I28469ba1b5ef88661e744d4cf87f6acab3eb2c72
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-03-05 17:58:15 +01:00
David Redondo d7fe948fdb Handle drag leave when performing platform drag of docks or toolbars
The existing widget machinery works through mouse positions. In order to
correctly update state  when a drag moves outside of a window it needs
to see a move outside of the window. When the platform drag leaves the
window a move to the outside of the window is now faked to not keep the
layout in the hovered state of the last move event.

Fixes: QTBUG-122944
Pick-to: 6.7 6.6
Change-Id: I348f5281a200b78e6be4f11b3c25339d052783a5
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-03-05 16:58:14 +00:00
Even Oscar Andersen d8a6a9bfcb wasm: Make sure we can add screen after releaseRequestUpdateHold has been called
Before this fix, such screens would not render due to requestUpdateHold
is initialized to true and never reset.
 The fix is to change the requestUpdateHold member to be a static
variable, so that it can be read by screens added after
requestUpdateHold has been called.

Also, add a test that would fail without this fix

Change-Id: Idf2ac916766a03480272cd550f9d1ab7fc5c5158
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2024-03-05 17:58:14 +01:00
Marc Mutz e06c67d448 Revert "Fix export of QDeferredDeleteEvent, should be Q_CORE_EXPORT"
This reverts commit bc3b18764a.

Reason for revert: QDeferredDeleteEvent changed the size in 6.7. It is
more important to protect the casual user that relied on the mention of
the otherwise undocumented class in the QEvent::Type::DeferredDelete
documentation than to be convenient for one tool, developed by experts
who know how to replace their dynamic_cast with a type() check and a
static_cast and/or extract information from an unexported class.

In fact, not even the autotest-export is needed, as there are no
mentions of the class outside of comments outside QtCore. 

Found in API-review.

[ChangeLog][QtCore][QDeferredDeleteEvent] Made this undocumented class
private and unexported. You will still be able to see the definition in
qcoreevent_p.h, but you won't be able to create objects of the class
anymore.

Change-Id: I8a47c69d356a0bef260e7987bc4eab96430e8072
Pick-to: 6.7
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-03-05 15:14:51 +00:00
Øystein Heskestad 18620ef85f QLocalServer: add protected addPendingConnection function
Add addPendingConnection for subclasses to add socket to queue
of incoming connection for use with newConnection,
hasPendingConnection, and nextPendingConnection.

Task-number: QTBUG-75081
Change-Id: Id242a0c3573ee511b403d18af25864add9a3b684
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-03-05 14:43:29 +00:00
Laszlo Agocs 818f8de64a drm: Fix having more than window over the screen's lifetime
...when not using atomic.

On the non-atmic path the fb is passed in to drmModeSetCrtc.
Here we need a new call to it if a new QWindow gets created
after the previous one is destroyed. Previously this was
not done, so it ended up with Device busy errors. Atomic
does not need this since there the flip commit always
contains framebufferPropertyId.

Change-Id: Ie68152cad50438807ef45adfba65e74c8f30c956
Fixes: QTBUG-122663
Pick-to: 6.7 6.6 6.5
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2024-03-05 15:43:29 +01:00
Laszlo Agocs 0a3b5042a5 drm: atomic: Avoid device busy when flipping after creating a new window
Task-number: QTBUG-122663
Change-Id: I168930428e8d09a9a042401460d678e20f3b82d5
Pick-to: 6.7 6.6 6.5
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2024-03-05 15:43:29 +01:00
Timothée Keller 82e8f9e457 Windows QPA: Include custom margins in atypical margins
When calculating atypical margins that are used with
ExtendsContentIntoTitleBar, the margins were checked against
systemmargins, and then custom margins were added later. Instead, add
the custom margins immediately and take them into account during
calculations.

Pick-to: 6.7 6.6 6.5
Change-Id: I44af663c85b8bdf080d769e3b38431cbe5df64f3
Reviewed-by: David Faure <david.faure@kdab.com>
2024-03-05 15:43:29 +01:00
Wladimir Leuschner c785d56ae0 QWindows11Style: Draw frames HighDPI aware
Draw frames and lines on sub-pixel coordinates to be HighDPI aware.

Pick-to: 6.7
Change-Id: Ie4eed73b3e5780216fad0b6a919cbe18391f2b79
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-03-05 15:43:29 +01:00
Axel Spoerl 46502f9705 Revert "QAndroidPlatformInputContext: send composition text and cursor jointly"
This reverts commit be3b9b2ab1.

Reason for revert: Caused QTBUG-121561

Fixes: QTBUG-121561
Pick-to: 6.7 6.6 6.5 6.2
Change-Id: I4b59d97ede6c50d2575a7d7cebbe2291983dd19f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-03-05 14:29:20 +00:00
Allan Sandfeld Jensen e9f5bb7cbe Improve QColorTrc::isLinear and rename it isIdentity
Pick-to: 6.7
Change-Id: Id697fa3844610606c202e3fa717d631a3621e774
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2024-03-05 15:29:20 +01:00
Morten Sørvig cee8a11d73 wasm: remove DISABLE_EXCEPTION_CATCHING workaround
Qt no longer sets DISABLE_EXCEPTION_CATCHING and can
use the common logic here.

Task-number: QTBUG-121822
Change-Id: If02feafe9eeac49fa2861d2357b358a19e756438
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2024-03-05 14:29:20 +00:00
Lucie Gérard 8741e4a60c Correct license for files
According to QUIP-18 [1], all tests file should be
LicenseRef-Qt-Commercial OR GPL-3.0-only

[1]: https://contribute.qt-project.org/quips/18

Task-number: QTBUG-121787
Change-Id: Iee9f4fca676e77ab9d8ed485a28ce5ea8803be15
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-03-05 14:39:33 +01:00
Lucie Gérard bf1e76408e Change license for .in files
According to QUIP-18 [1], all build system files
should be BSD-3-Clause.
The files in this patch are part of the build system.

[1]: https://contribute.qt-project.org/quips/18

Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: Ibc6a60a9b009fab0c953e8e3269533c121e4511e
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-03-05 12:59:21 +01:00
Alexandru Croitor aacc31815d CMake: Fix assignment in internal_get_build_vars_for_external_projects
The check and variable name were incorrect after a refactoring.

Amends ba96238600

Pick-to: 6.6 6.7
Task-number: QTBUG-84884
Task-number: QTBUG-90820
Change-Id: I33b6b81695a6352c7869ef6186e00881b47bd6f3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-03-05 12:59:21 +01:00
Alexandru Croitor 375f386930 CMake: Don't add default rpaths to qt qml plugins when requested
qt_add_qml_plugin has code to set a sensible install rpath for user
project qml plugins.

If Qt was configured without rpath support, we should not add any
rpaths to qt qml plugins:
- qt-computed rpaths added by qt_apply_rpaths
- user-project rpaths added by qt_add_qml_plugin

This is done by setting QT_NO_QML_PLUGIN_RPATH to TRUE as part of
QtSetup, effectively applying the option to any qml plugin that is
built by internal qt api.

User projects will still be able to use the default rpaths added
by qt_add_qml_plugin, even if qt itself was configured with no rpath
support.

Pick-to: 6.7
Fixes: QTBUG-122687
Change-Id: I8178b527553dd00436d0abb3b44061ea16edc121
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-03-05 12:59:21 +01:00
Joerg Bornemann 110f656da9 configure: Translate only boolean options to features
This amends commit be009c6857.

The configure option -no-opengl was mistakenly translated to the CMake
argument -DFEATURE_opengl=no. The command line option "opengl" however
is defined as
    qt_commandline_option(opengl
        TYPE optionalString
        VALUES no yes desktop es2 dynamic
    )
which is not boolean. And only boolean command-line options may
automagically control features of the same name. It just happens that
the values "no" and "yes" look boolean.

Setting FEATURE_opengl instead of INPUT_opengl broke feature conditions
that check the INPUT_opengl value.

Fix this by checking the type of the corresponding command line option
instead of guessing the type from the INPUT_* value.

An option (e.g. force-asserts) can be diverted to a differently named
input (e.g. force_asserts) with the NAME argument of
qt_commandline_option. In this case, we cannot deduce the option name
from the input's name. To handle this, we store the input's type in
commandline_input_${name}_type and read it when translating feature
values.

Fixes: QTBUG-122914
Change-Id: Ibb4b0633b6635bd2ef6f26ed8f4b19d239bf5854
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-03-05 12:59:21 +01:00
Alexandru Croitor c88b86fcc4 CMake: Document -init-submodules option of the super configure script
And mention the init-repository --help section for additional options
that can be passed to adjust the cloning process.

This should only be merged after the qt5.git change is merged.

Task-number: QTBUG-120030
Change-Id: I16c36f8d5d5d75521ca3f4a476dd921537f9db9c
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-03-05 12:59:21 +01:00