Commit Graph

49522 Commits (5ea248155654b58fcb52ef326dc4d94de83d0409)

Author SHA1 Message Date
Christian Ehrlicher 5ea2481556 QWidget: fix render() in RTL mode
Rendering a widget to a paintdevice via QWidget::render() did not pass
the LayoutDirection mode of the widget to the paintdevice which lead to
wrong rendering of text.
This is especially visible with the windows 11 style which does not draw
some widgets directly on the screen but through a QGraphicsEffect on a
QImage.

Pick-to: 6.7 6.5 6.2
Fixes: QTBUG-124931
Change-Id: If2cfa326d2ca45c42e203a4ae91fd857afa5c69c
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
2024-05-08 19:58:17 +02:00
Kai Uwe Broulik c587eeef11 Mark QGuiApplication::platformName property as CONSTANT
It cannot change at run-time once the platform
has been initialized.

Pick-to: 6.7
Change-Id: Ib5ec049d799cbc54f184ebc8a6531f22c02b6b5b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-05-08 17:58:17 +00:00
Tor Arne Vestbø 6c36e21bec iOS: Always call setParent during QIOSWindow construction
We rely on setParent for parenting top level windows into our desktop
manager view, so we can't condition the call on having a parent window,
like we do on other platforms.

This was a regression from 988039729f.

Fixes: QTBUG-125142
Pick-to: 6.7
Change-Id: I2884d77db09cba5371ccd77eabda7ce38c0292de
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2024-05-08 19:51:25 +02:00
Ahmad Samir c878a51509 QLatin1StringMatcher: add indexIn(QStringView) overload
Drive-by changes, remove a redundant typedef.

[ChangeLog][QtCore][QLatin1StringMatcher] Added indexIn(QStringView)
overload.

Task-number: QTBUG-117054
Change-Id: I5a8426cb0f9d9111f086015902ffe2185a267c86
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
2024-05-08 19:22:46 +02:00
Joerg Bornemann 519a47e870 CMake: Record static libs and target type in for deployment
In <build-dir>/.qt/QtDeployTargets.cmake we recorded deployable targets
and their file path. We skipped static libraries, because we don't
consider these deployable.

However, we need information about static library targets too when
deploying QML plugins: we need to know that they are "built by us" in
order to properly skip them.

Now, we record STATIC_LIBRARY targets too and also record the type of
each target.

Pick-to: 6.7
Task-number: QTBUG-124771
Change-Id: Ic1ef33a3295458c372c2bc9f24ecce43f17e7321
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-05-08 18:59:22 +02:00
Edward Welbourne 669f7e3b97 Disambiguate a QDateTime construction
When compiling removed_api.cpp, both the removed QDateTime(QDate,
QTime) constructor and the one taking a transition resolution with a
default are visible. The inline fromStdLocalTime() was thus ambiguous
as to which it was calling. So make the transition resolution overt.

Fixes: QTBUG-125079
Pick-to: 6.7
Change-Id: I0c498bed2831afee0adc41c4575f3ed1bc244122
Reviewed-by: Tim Blechmann <tim@klingt.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-05-08 13:14:11 +02:00
Lucie Gérard 00a04dddaf Add REUSE ignore comment
For those files, reuse fails to process the copyright and licensing information. The information is written to .reuse/dep5 file and reuse is told to ignore what is in the file.

Task-number: QTBUG-124453
Change-Id: If593c713026d9d349055cb6e8e73500966a05d9b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-05-08 11:09:28 +00:00
Even Oscar Andersen 1530c475e9 wasm: Fix nullptr access in QWasmScreen::allwindows
If the QWindow::handle() has not been created yet we will add
a zero page pointer to the allwindows list.
One possible symptom is that emscripten::val complains
in context2d() that it is accessed by the wrong thread.
what happens is that the this pointer points to the first
page.
Seen in the documentviewer example

Change-Id: I2b08176ebdd7c35d5105194f7fd9f4f6d45b77e5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2024-05-08 06:47:16 +00:00
Thiago Macieira 1ed0dd88a3 QThread/Unix: make QThreadPrivate::finish() be called much later
We need it to run after all the thread-local destructors have run, to
ensure that some user code hasn't run after QThreadPrivate::finish() has
finished. We achieve that by making it get called from a thread-local
destructor itself, in the form of a qScopeGuard.

This ought to have been done since C++11 thread_local with non-trivial
destructors became available. However, it only started showing up after
commit 4a93285b16 began using thread_local
inside Qt itself. The visible symptom was that QThreadPrivate::finish()
had already destroyed the thread's event dispatcher, but some user code
ran later and expected it to still exist (or, worse, recreated it, via
QEventLoop → QThreadData::ensureEventDispatcher).

Fixes: QTBUG-117996
Pick-to: 6.7
Change-Id: I8f3ce163ccc5408cac39fffd178d682e5bfa6955
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-05-07 14:22:27 -07:00
Thiago Macieira 3fc5ee5c2e QThread/Doc: update the docs on setStackSize()
There's some confusion about minimum and maximum.

Pick-to: 6.7
Fixes: QTBUG-109512
Change-Id: I262c3499666e4f4fbcfbfffd17cc1d592bc658b3
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Philip Van Hoof <philip@codeminded.be>
2024-05-07 14:22:27 -07:00
Thiago Macieira ed70faf87a QCoreApplication: make removeNativeEventFilter() remove from main thread
installNativeEventFilter() always installs on the main thread, so match
it.

[ChangeLog][QtCore][QCoreApplication] Fixed a mismatch on which event
dispatcher was modified between installNativeEventFilter() and
removeNativeEventFilter(). Now both functions in QCoreApplication access
the main thread's event dispatcher. To access the current thread's
dispatcher, use QAbstractEventDispatcher's functions.

Fixes: QTBUG-124783
Pick-to: 6.5 6.7
Change-Id: I6979d02a7395405cbf23fffd17ca09e1ac43f1f3
Reviewed-by: David Faure <david.faure@kdab.com>
2024-05-07 21:22:27 +00:00
Carl Schwan ab2f4ef8fa QTextDocument: Add support for responsive images
Add support for the max-width css attribute in image. This allows images
to be responsive: it adapts their size to the size of the QTextDocument
so that they never grow bigger than the QTextDocument pageSize.

This is implemented for the image handler used in QTextEdit and other
QtWidget text related classes.

[ChangeLog][QtGui][CSS] The max-width style can now be applied to
<img/> to set the maximum width in pixels or percentage.

Task-number: QTBUG-12283
Change-Id: Ic94e16279a1240ab4a509823de59dc0bfc920bb9
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2024-05-07 12:28:59 -07:00
Lena Biliaieva c68b20477f QNetworkReplyHttpImpl: simplify setting headers in postRequest()
Task-number: QTBUG-107751
Change-Id: I33bbad1d7dadc058af52f8a81766762f0de1d812
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-05-07 21:28:59 +02:00
Orkun Tokdemir 545b84b93c CMake: Add `qt_add_ui` API
This commit introduces a new `qt_add_ui` CMake API to be used instead
of AUTOUIC, due to several hard-to-fix bugs it has.

* Resolves the issue where Ninja required two passes to correctly build
`.ui` files.
* Avoids build folder leakage, in contrast to `AUTOUIC`
* Prevents unnecessary recompilation of unchanged source files when a
`.ui` file is modified with Ninja.
* Since `qt_add_ui` does not scan source files, it provides a faster
build than `AUTOUIC`.

These changes aim to streamline the build process and improve
efficiency when working with `.ui` files.

This addresses the following issues:
https://gitlab.kitware.com/cmake/cmake/-/issues/16776
https://gitlab.kitware.com/cmake/cmake/-/issues/25436
https://gitlab.kitware.com/cmake/cmake/-/issues/25195

Task-number: QTBUG-110369
Fixes: QTBUG-114563
Change-Id: I34cd3df70542becf6e08502f0cbcd1c11eeeadd6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-05-07 21:12:29 +02:00
Doris Verria 0678a8a00d QWindowPrivate::setFocusToTarget: Add focusReason parameter
The focusReason is also important when setting focus to the target, so
ammend 8c44064f62 and add this parameter
to the virtual method.

Change-Id: Id7800a366cbc1ce2ac26b3fec1e47ec9267a57bb
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-05-07 21:12:29 +02:00
Lena Biliaieva 0fef8f53c3 Use QHttpHeaders: Update internal users of QNRequest, QNReply, QNProxy
Replace QNetworkHeadersPrivate's main headers storage, which was
RawHeadersList, with QHttpHeaders. Replace internal usage of raw and
cooked header methods with the QHttpHeaders API.

[ChangeLog][QtNetwork][QNetworkRequest] Header value added by
QNetworkRequest::setRawHeader() method is trimmed now.

Task-number: QTBUG-107751
Change-Id: I8882978afa430651e6c798a4fed00beef6c4cfd2
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
2024-05-07 12:39:23 +02:00
Tatiana Borisova a32c152d39 QSocketDescriptor: use modernize comparisons
Change-Id: Ic0389ab7f8578a0c224072097420cfd8cac508be
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-05-07 12:38:13 +02:00
Eskil Abrahamsen Blomfeldt 9928ebd26a doc: Update note about variable axes on Windows
Since Qt 6.8, the DirectWrite backend is the default, so we need
to invert the warning.

Change-Id: I0d32c06c3507664ecd5b1bc3ae3fcabeedee12b7
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2024-05-07 12:16:30 +02:00
Alexey Edelev e820ff8301 Make version_tagging the full-functional feature
This feature allows to explicitly disable the version tagging for Qt
libraries and have the precise feature-based guarding in C++ code.

Task-number: QTBUG-124346
Change-Id: If109adb2f6a998c58825a2449cfb936ea278b2ad
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-05-07 12:10:22 +02:00
Volker Hilsheimer 31de589906 Docs: fix warning from old QCheckBox::checkStateChanged overload
The overload carrying the new state as an integer is deprecated, but
still documented, so we need to document the parameter as well. Bring
the full documentation back to silence the warning.

Amends 5a96d13bb5.

Pick-to: 6.7
Change-Id: I5253e68e4ad7b42fc552feb958cc0ac40d685609
Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-05-07 07:14:25 +02:00
Thiago Macieira 4a984c15dd QResource: add support for duplicating mapped memory on macOS
Similar to the Linux solution, this avoids allocating heap memory in the
implementation of QFile::map() calls with MapPrivateOption.

Unlike the Linux solution, the macOS one cannot duplicate resources
present in read-only sections of binaries, only those loaded from files
with mmap() (QResource::registerResource()), because the max_prot
setting on the source does not have the VM_PROT_WRITE bit set and I
could not find a way to reset it to force a copy-on-write.

Change-Id: I6979d02a7395405cbf23fffd17c951949c71ec20
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-05-06 14:32:55 -07:00
Thiago Macieira 1b64b7c672 QResource: add support for duplicating mapped memory on Linux
This makes QResourceFileEngine avoid allocating heap memory in the
implementation of QFile::map() calls with MapPrivateOption. We do that
by asking the kernel to duplicate the mapping to the same memory pages,
which increases our virtual memory space but doesn't initially take up
any more RAM.

We have to be careful to ensure the resulting mapping is copy-on-write
and that this setting is independent of the original map's. The former
is easy: the mremap() system call with MREMAP_DONTUNMAP only works on
private memory blocks, so by definition any private + writable block is
copy-on-write.

The latter is slightly more difficult: if the original block was already
writable, then the kernel could give us a new map to the exact same
pages[*], which isn't exactly helpful. Therefore, we need to check if
the QResourceRoot points to a private, read-only block.

[*] in those conditions, mremap() is documented to replace the original
    mapping with a zero page, which means we have a near certainty of
    crashing, instead of accidentally, silently corrupting memory.

Change-Id: I6979d02a7395405cbf23fffd17c90fb1f1612ed7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-05-06 14:32:55 -07:00
Tatiana Borisova ecb0878cbc QVersionNumber: use new comparison helper macros
Replace public friend operators operator==(), operator!=(),
operator<(), etc of QVersionNumber to friend methods
comparesEqual() / compareThreeWay().

Task-number: QTBUG-120304
Change-Id: Ib94a1a28ca9843ca5d5a8d07f41c63de9fe584bb
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-05-06 22:47:55 +02:00
Christian Ehrlicher 77c6b0c66f QLineEdit: set object names for actions
Set object names for actions created by createStandardContextMenu() to
be able to access them from the outside. Use the same naming schema as
by QWidgetTextControl::createStandardContextMenu() (used by QTextEdit
and others).

Pick-to: 6.7 6.5
Fixes: QTBUG-112721
Change-Id: Id92f1ba13e7f7e8b1d531678895902374114d167
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-05-06 22:13:29 +02:00
Tor Arne Vestbø f16036fc18 rhi: Replace deprecated MTLRenderPipelineDescriptor.sampleCount
Change-Id: I47c64416e9ba089c2f23dcebf63a26988bb1d0a7
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2024-05-06 20:27:42 +02:00
Volker Hilsheimer 5b41046813 JNI: Mark tech preview API as such
Retrofit the QT_TECH_PREVIEW_API macro into the JNI classes and
helper constructs that are not yet documented, and which can only
become publicly documented once the full JNI type system with the
type registration infrastructure is documented.

We can remove the tagging in dev once we have documentation and
are ready to move this functionality out of TP, presumably for Qt 6.8.

Pick-to: 6.7
Change-Id: I235e57b8e57c2d04be72b4c842131d99a5f83d9e
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-05-06 20:27:42 +02:00
Edward Welbourne a2566e139f Extend QTest::failOnWarning() to a no-parameter fail-on-any-warning
Many users (albeit mostly in qtdeclarative) of failOnWarning() are
passing a catch-all regexp, which is only supported when regular
expression support is enabled. Make their lives easier and those
checks independent of the feature by adding a third overload, taking
no parameter, that fails on any (unanticipated) warning.

Implementation is trivial - just put a null QVariant in
failOnWarningList; it won't match either check on the entry that might
exempt a test from failing on a warning, so any warning at all will
trigger failure.

[ChangeLog][QtTest] QTest::failOnWarning() now has a no-parameter
overload to support the common case of fail-on-any-warning, without
needing to construct a match-everything regular expression.

Change-Id: Ic693f1c8619fd6e495543b85737d566134cf9d20
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2024-05-06 20:27:41 +02:00
Edward Welbourne 5a09ade176 Pass QDateTimeParser::SectionNode by value, not const ref
It's trivially copyable and fits into a (128-bit) register.
Delete one spurious line from a \internal doc in the process.

Task-number: QTBUG-122619
Change-Id: I55bd39f176f58e0dcd0ecc86e88bd29d449c7fd7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-05-06 20:27:41 +02:00
Edward Welbourne 33cc653288 Document calendar setting of QCalendarWidget and QDateTimeEdit
It seems this was neglected in 5.14, when the methods were added.
The calendar setting is also not a Q_PROPERTY; and hadn't been tested
until recently.

This follows up on commit 2dee006216

Pick-to: 6.7 6.5
Task-number: QTBUG-115200
Change-Id: I9625bf54d05a55a40867847bd58130be90e78271
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2024-05-06 20:27:41 +02:00
Mårten Nordheim 439b20eb46 QBuffer: resolve todo / use QByteArray::assign
It no longer lacks assign

Change-Id: Ib96dec54e8d9fd0f182a9a26692a5504993fb622
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-05-06 20:27:41 +02:00
Doris Verria 270846a831 QIOSDocumentPicker: Directly add UTTypes to document types array
We don't need to create UTTypes from identifiers when we can now
directly add the UTType to the array. In fact this way was causing an
exception since it couldn't cast a UTType to a NSString type.

Change-Id: I34d44422c102df84a625945af218b9c25c1a6895
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-05-06 18:34:22 +02:00
Doris Verria 1ffa41d04d QIOSTextInputOverlay: Use new presentationWindow to access keyWindow
Accessing the keyWindow through UIApplication keyWindow was causing a
crash.

Fixes: QTBUG-125089
Change-Id: Ie02afd7875b490c1f72ff2e827ffa2204d0e9e81
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-05-06 16:01:24 +00:00
Mårten Nordheim 23f983fa09 QMetaProperty: limit QMetaEnum resolution to enums known to QMetaType
Since we don't know ahead of time if a property's type is an enum
or a flag we have to resolve it at runtime.

In a QMetaProperty-heavy application this overhead can be quite dramatic
given that we mark anything that is not a built-in as a potential
flag/enum.

However, QMetaType already knows if it's an enum, so we can use that to
return early if it's not known to the meta-type system.
To add to this - Q_PROPERTY requires that a type is fully defined, so
there are no issues with forward declarations for the enums.

Change-Id: Ifecc7f1e6cdef416e3ce72ee705eb26e682071cc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-05-06 16:52:05 +02:00
Volker Hilsheimer edfcc53171 Docs: silence documentation warning in QFusionStyle
QFusionStyle::iconFromTheme is not a reimplementation of a
virtual function, so document it as internal instead of \reimp.

Change-Id: I676de4aa68c41af8982e55d8bcf24a7cdc202c7c
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-05-06 16:52:05 +02:00
Jari Helaakoski 30cc8a28de Fix test compilation issues with QtLite configuration
Now developer build tests compile, but some are not working.
Functional fix will come later via separate tasks.

Task-number: QTBUG-122999
Change-Id: I70487b46c1b32ba4279cb02a4978e4f55ac0d310
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-05-06 14:29:02 +00:00
Piotr Wierciński 5441180ec7 wasm: Enable building WebAssembly platform plugin as shared library
Fixes: QTBUG-121924
Change-Id: I20a4a41a16ac3d7855f359df020564bfc7435c57
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
2024-05-06 16:01:28 +02:00
Tatiana Borisova 7b738ffc58 QRegularExpression: use modernize comparisons
Replace class operators operator==(), operator!=() of
QRegularExpression to friend method comparesEqual() and
Q_DECLARE_EQUALITY_COMPARABLE macro.

Use QT_CORE_REMOVED_SINCE and removed_api.cpp to get rid of
current comparison methods and replace them with a friend.

Task-number: QTBUG-120304
Change-Id: Ib6fc83d29ad9bc710c2fdf32a3d60131fbf298b6
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-05-06 16:01:28 +02:00
Christian Ehrlicher 0e5d551327 QDialogButtonBox: properly clear buttons in setStandardButtons()
When setting new buttons with setStandardButtons(), the old ones are
deleted by iterating over d->standardButtonHash. But this hash is
modified when a button is destroyed and therefore sometimes not all
buttons were deleted.
This amends df735d794f.

Fixes: QTBUG-123939
Pick-to: 6.7 6.5
Change-Id: I867086855cfde88a7b22a5579662f250b9db0042
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-05-05 10:03:27 +02:00
Lena Biliaieva 65fef44ddf Add QHttpHeaders methods to QNetworkProxy
[ChangeLog][QtNetwork][QNetworkProxy] Added headers() and setHeaders()
methods to QNetworkProxy to provide an interface to work with
QHttpHeaders.

Task-number: QTBUG-107751
Change-Id: I8a82f56f0262c9f44d0cb52b2e411bf75626b926
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-05-03 21:48:36 +02:00
Christian Ehrlicher bbff35a343 QCommonStyle: Fix painting arrows when size is even
Rework the painting code to not use floating point numbers and make sure
the tip of the arrow is painted with one or two points (depending on the
size is odd or even) so the arrow is always symmetric. Therefore also no
anti-aliasing is needed. Sadly the dpr scaling and also
QPainter::drawPolygon() screw things up a little bit with such small
sizes, therefore do the dpr handling by ourself to get nice results.

Pick-to: 6.7
Fixes: QTBUG-124554
Task-number: QTBUG-114539
Change-Id: I8ab8c2ce3ceb90af5d7c3a0dfeec7f7445e92a4d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-05-03 20:53:34 +02:00
Mate Barany 3377b74df9 Add QDebug support to QHttpPart
As part of QTBUG-114647 we are planning to introduce a deduction
mechanism that could deduce the contentType header and the
contentDisposition headers based on the arguments (and the MIME
database).

In case of non-trivial types this deduction may give the wrong result
and without QDebug support it might be a bit tedious to check.

The debug output displays some information about the body device if
one is attached, otherwise it displays the size of the body.

Task-number: QTBUG-114647
Change-Id: Ia693b078ff5b9f8ea57fbf3c385edaec47886ff1
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-05-03 15:16:14 +00:00
Ivan Solovev 2352fa0040 QDataStream::readBytes: guard against integer overflow
The step variable changes in the geometric progression, which means
that it may overflow at some point. Since it is a qsizetype (signed 64
or 32 bit integer), the overflow would be UB, so we need to avoid it.
Add an extra check that the step is lower than the safe threshold
before increasing it.

Amends a1bfac287e.

Pick-to: 6.7
Change-Id: I6097986e614937fa88b31b3dd1e53ecff22533d7
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-05-03 14:04:52 +02:00
Volker Hilsheimer 5cdac10b46 Windows 11 style: simplify code to polish palette
There are two cases in which we let the style polish a palette:

- after merging the system palette and the style's standard palette
- or when a widget-class specific palette gets set

A style needs to know which colors of the palette it can safely
overwrite with style-specific preferences. For that to work, we
need to reset the resolve mask of the synthesized palette (first
case) to 0 before polishing. Palettes set explicitly by application
code will then have resolve bits set, and the polishing can
respect those colors and not overwrite them.

Simplify the polish() implementation then to check whether the
respective color's resolve bit is set, and only overwrite it with
the style's preferred color if the bit is clear. Move that logic
into a macro for simplification.

This amends b733d31f27 and makes
sure that colors that are set by the application explicitly don't
get overridden by the style.

Task-number: QTBUG-124490
Task-number: QTBUG-124286
Change-Id: I69e1e3da93f661ebdafee0b62adbb3d411322443
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-05-03 14:04:51 +02:00
Volker Hilsheimer cee94658d6 Windows: handle theme changes synchronously when settings change
The handleSettingsChange handler is usually already executed through the
event loop. And if it is called directly e.g. when changing settings
programmatically, then all side effects of the change should be in
effect immediately.

Task-number: QTBUG-124490
Change-Id: I243772860b1137ef9fe712c4b0d1c88593d2bdb4
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2024-05-03 12:04:51 +00:00
Volker Hilsheimer 2c5f5bf2e8 Windows: simplify setting the dark border
A round trip through querying the window attribute to avoid a
call to the setter is overkill, we can assume that the setter won't
do anything if the value of the attribute doesn't change.

Also, don't check whether QWindowsIntegration::darkModeHandling
is overridden before calling setDarkMode, which checks that flag
already. The flag will be very rarely cleared (and we might want
to remove support for this obscure mechanism soon).

Task-number: QTBUG-124490
Change-Id: I7e027fd53f556200edfd127eaf5f2b97f027528e
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2024-05-03 14:04:51 +02:00
Laszlo Agocs a1371783ac rhi: metal: Reduce staging copy size for full-width texture uploads
Pick-to: 6.7 6.6 6.5
Task-number: QTBUG-120565
Change-Id: I3f11796e0cfd7261885cec04695665b2266082f8
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2024-05-03 12:39:40 +02:00
Laszlo Agocs 690bb2e0c4 rhi: gl: Avoid a copy in partial texture uploads
Pick-to: 6.7 6.6 6.5
Task-number: QTBUG-120565
Change-Id: I7f1f8c42b98c5743708c4ff80e401070d8ab24ac
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2024-05-03 12:39:40 +02:00
Juha Vuolle 33ea383e0e Update macOS URL handling documentation
macOS has now similar support for https and custom uri schemes as iOS.

Fixes: QTBUG-124340
Change-Id: Ie17237c9625bac5cf110f06df99f1b94bf5ded42
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-05-03 11:17:17 +03:00
Juha Vuolle 664c7ffb21 macOS: Add support for custom uri scheme handling
With this support applications can claim to be handler for
specific custom scheme URLs such as "com.my.app"

This requires that the scheme is listed in the plist file
(CFBundleURLTypes and CFBundleURLSchemes).

One notable usage example is the use of OAuth redirect_uris.

[ChangeLog][macOS] Added support for custom uri scheme handling

Task-number: QTBUG-124340
Change-Id: Ia04e9b89b53ee6f24129f9dd5ee8fbc5c0f0516c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-05-03 08:17:17 +00:00
Juha Vuolle e8e881ba35 macOS: Add support for universal links / https uri scheme handling
With this support applications can claim to be handler for
specific https URLs. This requires that an appropriate AASA
(apple-app-site-association) JSON file is hosted and accessible.

One notable usage example is the use of OAuth redirect_uris,
which are often required to use "https" URI scheme.

[ChangeLog][macOS] Added support for https/universal links handling

Task-number: QTBUG-124340
Change-Id: I91c725fcf209b295dc1b2687a52cd0a547aff1c8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-05-03 08:17:16 +00:00