74309 Commits

Author SHA1 Message Date
Kai Köhne
e89912460f Doc: Rewrite paragraph concerning OpenSSL 1 compatibility
Qt 5 compatibility details are not relevant for Qt 6.
Instead, make it explicit that the binary builds require
OpenSSL 3.

Pick-to: 6.9
Change-Id: I610254026e35def8f8206cd7c7e3015b2197852c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alexei Cazacov <alexei.cazacov@qt.io>
2025-05-21 06:07:33 +00:00
Ahmad Samir
1b66b6533e QString/QByteArray: add tests for replace() with negative lengths
Change-Id: I6bb67a65fdb0d61e1e1e36dd271c98df7849a305
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-05-20 23:30:49 +03:00
Ahmad Samir
ef0b8bc730 tst_QString: don't cast index/length to uint in replace() tests
Most of QString's API take by signed values, so let the tests match
reality.

Also, as pointed out in the code review, use qsizetype instead of int.

Pick-to: 6.9 6.8 6.5
Change-Id: I03cba8e35d080454506a35a956ad106fd9bb3246
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-05-20 23:30:32 +03:00
Christian Ehrlicher
3252e1808c QWidget: don't re-polish when style did not change
Don't call style->unpolish()/polish() when the old and new style did not
change which might happen when setting a style sheet as this might
create an infinite loop and the style (re)sets some window attribute.
Bailing out early is not an option here as newStyle might be a nullptr so q->style() will fall back to the application default style.

Pick-to: 6.9
Fixes: QTBUG-133332
Change-Id: Ifa9ee4fdfa64b2768337e2d90b7bbaac5f3fcd70
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2025-05-20 21:00:41 +02:00
Magdalena Stojek
263f06ae8b QXmlStreamWriter: add option to stop writing after an error
By default, QXmlStreamWriter continues writing even after encountering
an InvalidCharacter, EncodingError or CustomError, which contradicts
expected behavior.

This change introduces property stopWritingOnError with two new
functions: setStopWritingOnError() and stopWritingOnError(), allowing
users to control whether output halts immediately after the first such
error.

[ChangeLog][QtCore][QXmlStreamWriter] Added setStopWritingOnError() and
stopWritingOnError() functions.

Fixes: QTBUG-135861
Change-Id: Ia3ba894fc5bd8c5ff3a548e2585af9d435dec9b2
Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2025-05-20 20:33:49 +02:00
Marc Mutz
603499d2e7 QPainter: make ownership transfer more explicit
The push_back(get()) / Q_UNUSED(release()) was an attempt to separate
the reallocation from the release of the unique_ptr, to avoid memory
leaks in case the reallocation fails inside push_back(), at a time
when unique_ptr::release() had already been called.

Coverity doesn't understand this pattern (and many human readers
won't, either), so change this into an emplace_back(), followed by a
release() into the return value of emplace_back().

Since assignments evaluate right to left, we need to separate these
two actions into separate statements, otherwise we'd end up in the
same situation as described for push_back(release()) above. Add a
comment explaining the problem.

Amends the start of the public history.

Coverity-Id: 425479
Pick-to: 6.9 6.8 6.5
Change-Id: I727aaf791d7b523cd6e7301c49c152b4b6e80dd2
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2025-05-20 20:33:49 +02:00
Lars Schmertmann
ed76f816e6 Android: Avoid deprecation warnings (Space-assignment syntax)
Space-assignment syntax in Groovy DSL has been deprecated.
This is scheduled to be removed in Gradle 10.0.

Pick-to: 6.9
Change-Id: I2029af79b25351337c32db96053548ce5f4f47ae
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2025-05-20 20:33:49 +02:00
Marc Mutz
1285dbeb3c tst_QDataUrl: add a test with spaces around the charset parameter
Requested by Ivan Solovev in review.

Pick-to: 6.9 6.8 6.5 5.15
Change-Id: I2f3dee8aad16af6748faa7660e2508e8ecd1709f
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2025-05-20 18:33:49 +00:00
Matthias Rauter
64693034ae Replace long for-loop-headers with short modern version
Change-Id: I0bf037e0a2483cc6e98a3336f878c46b31f92447
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2025-05-20 19:19:34 +02:00
Rami Potinkara
f9af480ed2 Android: update clang compiler detection
This patch updates the clang compiler detection to
allow Clang version 2010 and above to use C++26
macros.

This will allow Qt Android x86_64 build on dev to compile.

Fixes: QTBUG-136968
Pick-to: 6.9
Change-Id: I0988169e6e10357f0e210c3911843e6d04a43c0d
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2025-05-20 19:27:54 +03:00
Samuli Piippo
c18a773355 CMake: fix __qt_internal_collect_additional_module_paths
When the additional path did not point to cmake path, the
loop was using non-existing variable.

Pick-to: 6.9 6.8
Change-Id: Ie9599231599c3b90125825414956e345634c85ef
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-05-20 16:27:53 +00:00
Liang Qi
7cde375513 gui: support to build wayland on FreeBSD
Change-Id: I597b8d485307c9ba21499dc1a51d8567361530bc
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-05-20 16:24:55 +02:00
Laszlo Agocs
97f7819f1d offscreen: Enable backingstore images with alpha
Grabbing a QQuickWindow (software backend) cleared to something
semi-transparent is not going to be correct otherwise.

Pick-to: 6.9 6.8
Task-number: QTBUG-136755
Change-Id: I59f378b177154af25b1d7bff878435c715e3d114
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2025-05-20 13:58:39 +02:00
Aurélien Brooke
44b5602536 QMetaType: use sized delete to deallocate a value
When destroying a value created by QMetaType::create(), pass the size
to operator delete. This allows allocators to potentially optimize the
deallocation.

The size passed is always the one used during allocation, iface->size.

As a drive-by, make the operator() function const.

Change-Id: I3224af525671d98327d21033d059f52620fbb837
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-05-20 08:04:29 +02:00
Ahmad Samir
bee20b2137 tst_QByteArray: create separate tests for replace() overloads
Change-Id: I576230a3e130ddf8e0124a8a1174a99a64dc691e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-05-20 02:50:03 +03:00
Ahmad Samir
a15639a3ab QByteArray: make replace(pos, len, view) consistent with QString's
Return early if `pos` is out-of-bounds.

Amends 57d91d8029064b592dee8adf819bde676763df28 (also part of this
commit message was borrowed from it).

[ChangeLog][QtCore][Important Behavior Changes][QByteArray] replace()
is now consistent with QString::replace() in its treatment of
out-of-bounds indexes.

Change-Id: Iae8cf795364654fd6438b2a4ed3162925a73cb9e
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-05-20 02:50:03 +03:00
Thiago Macieira
2da64908c2 QTest::CrashHandler: ask GDB for the memory mapping layout on crash too
Processes usually crash due to invalid pointers, but sometimes it's hard
to know if a given value is valid or not just by eyeballing it. So let's
ask GDB to print it.

I don't think LLDB has a way to do it.

Pick-to: 6.9
Change-Id: I35e35bd3b79eeba49192fffd61474054cd089301
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2025-05-19 14:46:36 -07:00
Kai Köhne
a6070847f0 qlogging: Journal: Log thread id, suppress empty fields
The TID field can be used to differentiate the threads of a process
where the message originates from. This allows to create a timeline
of events when identical messages are created from multiple threads,
or filter out messages from "uninteresting" threads in post-processing.

The file/line/func fields are typically empty for non-debug builds, so
storing these in the journal with dummy values is a waste of CPU time
and storage.

Use sd_journal_sendv instead of sd_journal_send, as that allows to vary
the number of sent fields, and skip the ones without actual information.
It is also slightly more performant, as it avoids the var-arg handling,
sprintf parsing and formatting etc. done by sd_journal_send.

[ChangeLog][QtCore][Logging] Qt now logs the thread id (TID) in journal,
allowing separation of identical messages from multiple threads.

Fixes: QTBUG-120047
Fixes: QTBUG-120048
Change-Id: Iccf3fe708dc4b896161693e13fb9012686bd1871
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-05-19 18:50:25 +00:00
Ivan Solovev
927798f5de QXmlStreamReader: try to keep the source encoding of the added data
The QXmlStreamReader(QAnyStringView) constructor, as well as the
QXmlStreamReader::addData(QAnyStringView) method were almost always
converting the UTF-16 and Latin1 data to UTF-8.

This commit tries to avoid unnecessary conversions by storing the
data together with its encoding.

As a result, we now have two decoders:
* a chunkDecoder is used when the encoding of the provided chunk
  is supplied along with the data;
* a document-global decoder is used when decoding raw data that
  is provided by QBA overloads. It tries to infer the encoding
  from the content, or explicitly uses the "encoding" attribute,
  if it was provided. This is the pre-existing behavior.

This patch has several corner-cases, mostly related to the fact
that the XML parser tries to read the XML prolog and extract the
encoding from it.
For example, what happens if we pass a QString (UTF-16 encoded)
that has an XML prolog with Latin1 encoding?

  const QString data =
      u"<? xml encoding=\"iso-8859-1\"?><foo>ÄÖÜ</foo>"_s;
  QXmlStreamReader reader;
  reader.addData(data);
  reader.readNextStartElement();
  const QString text = reader.readElementText();
  QCOMPARE(text, u"ÄÖÜ"_s);

The data inside the "<foo>" block can be represented by Latin1,
but because we used QString to store it, it's already in UTF-16.

This patch uses UTF-16 chunkDecoder to decode the data, but at
the same time sets the document-global decoder to Latin1, so
that the next raw data will be interpreted as Latin1.

At the same time, if the provided encoding is not recognized,
the document-global decoder is set to UTF-8, for backwards
compatibility.

The code path that uses an underlying QIODevice is unmodified.

The patch does not add any new public APIs, so theoretically can
be cherry-picked to older branches, but I'd prefer to have some
testing on the current dev to make sure that it does not introduce
any regressions.

Fixes: QTBUG-124636
Change-Id: I89bf0cbbcf21d7533d99e56b2522dcced9f675eb
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2025-05-19 20:50:25 +02:00
Tor Arne Vestbø
2a9444920b macOS: Make NSServicesMenuRequestor implementation rich-text aware
The protocol is used by services that interact with content in the
application on behalf of the user.

So far we have only been able to deal with plain text content,
which resulted in wiping any formatting if the user tried to
use a service to rewrite text in a rich text document.

We now support rich text, by teaching our IM protocol how to
deal with rich text for both reporting of the current text
selection, as well as text insertion (commit).

Unfortunately this doesn't help us for Writing Tools, as in
15.2 it no longer uses the NSServicesMenuRequestor protocol
for insertion if we also implement NSTextInputClient. As
a result we get insertions via insertText:replacementRange:,
which is not prepared for rich text yet.

[ChangeLog][macOS] Text services via the Services menu now
support rich text extraction and insertion.

Task-number: QTBUG-126238
Change-Id: I3d2933d766af8fe29e4f17636f703a257bf389fd
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2025-05-19 19:42:30 +02:00
Even Oscar Andersen
5c82db79d9 wasm: ignore keypresses if alt and numeric keyboard
When left-alt + num lock activated + number pressed the number
was inserted in the text. However in this input mode a 4 digit
keycode is used to insert a special character, it is wrong to
insert the individual digits in addition

Fixes: QTBUG-136799
Pick-to: 6.9 6.8
Change-Id: Iebafd1dfe5df1701a87a824ed99a440b122f0c57
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2025-05-19 18:03:29 +02:00
Even Oscar Andersen
ac710784af wasm: Handle exceptions in promise
Fixes: QTBUG-136962
Change-Id: I2d33b0132a83945b476f0f47fa4697ddaa2374b3
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2025-05-19 18:03:29 +02:00
Even Oscar Andersen
c3c51dd5d1 wasm: a11y - move to describedbycontainer
aria-description is more rarely supported than aria-describedby.
So switch to the latter. Create a new container inside the
a11yContainer.

Handle DescriptionChanged to update description in one place only

Task-number: QTBUG-134657
Change-Id: I0d025e5739451e6fab133c2590fd20ea13e2d946
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2025-05-19 18:03:29 +02:00
Piotr Wiercinski
a13d84b56a wasm: Fix parsing HTTP header values that contain colon (:)
According to RFC 7230 header values can contain colon(:). Fix
parsing HTTP headers to handle such cases correctly.

Fixes: QTBUG-136812
Pick-to: 6.5 6.8 6.9
Change-Id: I371342c5d84744e0427eb23fb1b648f8c0f0c9fe
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2025-05-19 16:03:29 +00:00
Morten Sørvig
a65554044c wasm: enable previously disabled tests on WebAssembly
The supported configurations for running tests on WebAsssembly
are:

  * -device-option QT_EMSCRIPTEN_ASYNCIFY=1" [old way]
  * -feature-wasm-jspi -feature-wasm-exceptions.  [new way]

(Non-asyncify/JSPI configs may work for some tests, especially
non-GUI tests).

In general all tests are now enabled for the wasm build so that
we can run the tests locally, even tests which fail/crash/hang.

Use QT_BUILD_WASM_BATCHED_TESTS to disable tests which should
not run on CI.

Task-number: QTBUG-121822
Change-Id: I20fac091d4d55bd1c947eeeb128a42a382dc11f0
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
2025-05-19 16:03:29 +00:00
Samuli Piippo
68346b2d1c CMake: try to find qmltestrunner from additional paths
Use QT_ADDITIONAL_PACKAGES_PREFIX_PATH to look for qmltestrunner.
Needed if module install is using separate staging prefix, like is
done on Yocto builds.

Change-Id: Icfe972a7ab1d0c99518383eab1c885e490cdb4d6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-05-19 16:03:29 +00:00
Laszlo Agocs
d22660a09d offscreen: Return the requested window format
Not the default constructed QSurfaceFormat.

If the window had alphaBufferSize set to some value, we want that
value returned from the platformwindow too.

Pick-to: 6.9 6.8
Task-number: QTBUG-136755
Change-Id: Ie0b51b773e0127cac797607a52947bba7ec5eba0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2025-05-19 11:04:06 +00:00
Mårten Nordheim
b0b9adf066 Http2: remove any reference to HttpReply when deleted
Prior to switching the protocol handler to use QHttp2Connection this
particular issue (see bugreport) was not a problem because the handling
of the IO-device being destroyed was simply to drop any pointer to
it.
QHttp2Stream, however, also has to keep track of the lifetime of
the IO-device, because it needs to abort the stream if the data
it's uploading is destroyed earlier than expected.

Now, since QHttp2Stream might also have other errors come up, we
have to connect to the generic 'errorOccurred' signal from it and
handle whatever issues arise, notifying our users that the request
for some reason cannot be fulfilled.
It's thanks to this part that we were now, in certain cases,
grabbing a stale pointer to the HttpNetworkReply and trying to
call functions on it.

We fix this somewhat indirectly. Because, after a HttpReply is
destroyed, we shouldn't even have any references to it in the
first place. And while it would usually be done as part of
handling the deleted() signal, we actually disconnect from
HttpNetworkReply's signals when we have processed one of the
finished*() functions. But since we were still connected to the stream's
signals we would still try to handle it.
For the http1 protocol handler this was already handled in
QHttpNetworkConnection::removeReply, which the HttpNetworkReply itself
calls at start of destruction. The function will go through any place
that the reply can be referenced and removes it. For http/2 it would
remove it from the list of requests yet to be sent, but not from the
in-progress list. So, we now add a new virtual function to the
AbstractProtocolHandler and specialize it in Http2 to handle exactly
this.

Fixes: QTBUG-136549
Pick-to: 6.9.1 6.9
Change-Id: Ie41863677a3b163f77d10bc3904ca515f6840be3
Reviewed-by: Mate Barany <mate.barany@qt.io>
2025-05-19 13:03:27 +02:00
Inho Lee
7be5b47617 wayland textinputv3: initialize missing internal states
When entering surfaces, there are some internal states which
should be initialized before update.

When updating states, 'commit' will always be called by needsCommit
without checking flags.
It amends ea32a4946ac517031b70237a831c99e02acc4361,
but surface enable will make needsCommit true when 'enter'.

Moved from 4cc415157d09534aede41829c5c7cf0aac578720

Fixes: QTBUG-135921
Task-number: QTBUG-131983
Change-Id: Id48d64579adc49e4ecb929a892f9dfe742578dad
Reviewed-by: Liang Qi <liang.qi@qt.io>
2025-05-19 12:17:14 +02:00
Inho Lee
a25054d33d wayland keyboard: suppress a warning for NO_KEYMAP
Some compositor calls send_keymap with WL_KEYBOARD_KEYMAP_FORMAT_NO_KEYMAP
and it repeatedly makes "unknown keymap format" warnings.

Moved from 7f78afdc9657d2393e98a8244bafc076b569d845

Change-Id: I92564fbe579bac5a56f0a842ac1b065330343ab5
Reviewed-by: Liang Qi <liang.qi@qt.io>
2025-05-19 12:17:14 +02:00
Eskil Abrahamsen Blomfeldt
306e68939c Fix regression when selecting special font styles
The fix for QTBUG-131574 aimed to make it possible to have
multiple fonts in the same family with the same style name.

It, however, inadvertedly made it impossible to have multiple styles
of a font for which the typical font properties did not differ. This
was especially bad for variable fonts.

So in the case of e.g. Roboto Flex, where the "Italic" is not
recognized as an italic font, as it does not set the "ital"
axis, we would overwrite the default subfamily (Regular) with
the Italic, because these would be seen as the same.

This was not intentional, and this patch fixes it so that when
we enter fonts into the database, they have to match both on
style name and properties, otherwise we will register them as
a new font. So identical subfamilies will still be supported.

Pick-to: 6.8 6.9
Fixes: QTBUG-135977
Fixes: QTBUG-135315
Change-Id: I9fd673e7b1061af69cd27049311565a14a145aa4
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
2025-05-19 07:27:29 +02:00
Elias Toivola
52fe1d9d9e Windows 11 24H2: skip crashing tst_qnetworkinformation_appless
Current Windows 11 24H2 build version is 26100. It is assumed Windows 11
25H2 build version will be >26200, this is added to the if-condition so
>25H2 will not be skipped.

Task-number: QTBUG-136628
Task-number: QTBUG-135599
Change-Id: I2d39fd4f9db546f2d7c7db17f6569708255579b3
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2025-05-18 18:40:00 +03:00
Elias Toivola
0cd5788ab3 Windows 11 24H2: mark tst_QDnsLookup::lookupNxDomain as expected to fail
Task-number: QTBUG-136627
Task-number: QTBUG-135599
Change-Id: Ib336f6e8018d210a80d50fdd4c1c50f691232104
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2025-05-18 17:40:00 +02:00
Nodir Temirkhodjaev
bdb46a306c plugins/styles/modernwindows: Fix build with -no-feature-commandlinkbutton -no-feature-inputdialog
Change-Id: I320c3b7ae29fba31c4929a31d05e47bdbb5a5472
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2025-05-18 17:31:11 +05:00
Tor Arne Vestbø
876bf141cf Windows: Update layered state on creation instead of backingstore flush
The WS_EX_LAYERED state of a window can be determined on creation, and
the logic to do so should be centralized to QWindowsWindow::setWindowLayered,
so that we don't have divergence.

This fixes an issue where child windows would only support transparency
if they had Qt::FramelessWindowHint set, as the QWindowBackingStore had
a different idea about when to enable WS_EX_LAYERED than QWindowsWindow.

Task-number: QTBUG-122590
Task-number: QTBUG-135859
Pick-to: 6.9 6.8
Change-Id: I453967a5a2ce8974cdd1dbf6e36327e97384c33d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Zhao Yuhang <2546789017@qq.com>
Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io>
2025-05-18 00:37:05 +02:00
Tor Arne Vestbø
369d975c90 Add QPlatformTheme::ScrollSingleStepDistance theme hint
The hard coded value of 20 used in various QAbstractScrollArea
subclasses does not represent the default behavior on all of
our platforms. On macOS e.g. the native NSScrollView has a
default line scroll value of 10 pixels.

The default value isn't changed for macOS in this patch, as it
has to be done in coordination with other changes to make the
behavior change atomic.

Task-number: QTBUG-130667
Change-Id: I532dbd3e2e946a00f426475adfa851d35a656c1b
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2025-05-18 00:37:02 +02:00
Thiago Macieira
498ae026e9 QCharacterSetMatch: extend it to support larger ranges
An array of 1 or 2 quint64 will be the typical case for ASCII searches.

Change-Id: Ic144352cbb5746c1a353fffd410ffad4168684d1
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2025-05-17 08:37:04 -07:00
Inho Lee
c3c572b108 wayland textinputv3: reset cursorRect when enableSurface
When enabling a surface(including entering a surface),
set_cursor_rectangle can be missing if the previous value
is the same as the current one.

Moved from 31762ec9b7ee9de84d85cb9be77c9f50a3c8d2e7

Done-by: lilydjwg li
Fixes: QTBUG-135341
Change-Id: I2356a24fcc44a71211b53a3a8c73192895a0de02
Reviewed-by: Liang Qi <liang.qi@qt.io>
2025-05-17 11:40:38 +02:00
Tor Arne Vestbø
16916d9290 iOS: Update RLIMIT_STACK when running with user-main stack
When running the user's main() we retarget the stack pointer to a custom
stack, with half the size of the main thread stack (i.e 512K instead of
1MB). During execution of the user's main() we want code that reads
RLIMIT_STACK to be aware of the limited stack space, as this might impact
where memory guards are placed, or how stack overflow is detected, such
as in the V4 QML engine.

Once we return from the user's main() we restore back to the original
stack size limit. We also handle re-entry into app.exec() as well as
app termination, by always making sure RLIMIT_STACK reflects the available
stack space.

Unfortunately we can't do the same for pthread_get_stacksize_np, as once
the main thread has been created we can't tweak the stack size, and the
pthread_get_stacksize_np function does not query the rlimit on iOS, as
it does in some cases on macOS.

Change-Id: I48e92e762e125cff0f7da2003c7a1e796835d391
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2025-05-17 11:40:38 +02:00
Artem Dyomin
546192a6fe QGIM: move tree and table implementations to the impl header
It improves readability of the public header significantly.
No functional changes.

Change-Id: I47aee378dddf2c08890d55f8bd617f577eb151bd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2025-05-17 10:50:13 +02:00
Daniel Trevitz
1cd7e01c90 For qdebug operator<< of pointer types, always check for nullptr
Also, use a consistent syntax for when the pointer is null.

Fixes: QTBUG-135856
Change-Id: I2f5c80a5650b1be6cc0d70cde7cd1e1c1990df9a
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2025-05-17 04:26:29 +00:00
Oliver Eftevaag
bc20065cf3 windows11style: improve style when using high contrast themes
High contrast themes not only change the colors that native applications
use, but they also make various UI controls look different by adding
additional outlines and other elements.

The following improvements are made in this patch, for users using high
contrast themes:

* Menus have an outline, similar to native applications.
* Selected MenuItem's text and background uses different palette colors,
  in order to look more similar to native applications.
* The ComboBox popup menu will have an outline.
* ComboBox will highlight the outline with the accent color when
  hovering over it with the mouse.
* MenuBarItem's have an outline, similar to native applications.

Pick-to: 6.9 6.8
Task-number: QTBUG-133595
Fixes: QTBUG-134978
Change-Id: Ic99a76a6986bc987e6b6b9f6a6db4d3efc432b33
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
2025-05-17 00:21:23 +02:00
Alexandru Croitor
ac02ad23f2 CMake: Include WaylandCompositorMacros for qtbase in-tree tests
Amends 2d790125429123aec4fb3dbee8335732f2d122eb

Change-Id: Ie1c9f10d9fb03cb6397b70470f8671b4c0a5eb26
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-05-16 21:25:01 +02:00
Jarek Kobus
13fcffa4d6 TaskTree: Fix some coverity scan issues (use const ref)
Coverity-Id: 462756 462761 462769 462773
Pick-to: 6.9
Change-Id: I70db1a0084da78bd1d51aa5bdba94675be5757a4
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2025-05-16 20:40:58 +02:00
Kai Köhne
efaca381c9 Doc: Fix broken link in qmake manual
Pick-to: 6.8 6.9
Change-Id: I2d90f450fa9a8bb41a2517022546f561fd7feeeb
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2025-05-16 16:06:45 +02:00
Magdalena Stojek
8b67e93694 Mark QTimeZone as security-critical:
- qtimezonelocale.cpp: matchOffsetFormat() and findLongNamePrefix()
  dereference potentially untrusted string.
- qtimezoneprivate.cpp: findUtcOffsetPrefix() accesses untrusted string
  data.
- qtimezoneprivate_tz.cpp: loadTzTimeZones() parses POSIX
  zone-descriptor format.

Fixes: QTBUG-135197
Change-Id: Ib5ec53ad8210bd872b06be8b1f71459f8b48b2ab
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2025-05-16 15:41:00 +02:00
Lu YaNing
0de9b81a8c Client: Optimize set_window_geometry calls by caching last geometry
When a QtWayland client window is initialized or resized, set_window_geometry
may be called multiple times with the same geometry, resulting in redundant
protocol messages to the compositor.

According to: 904a00fc9e8e0547dce3f70b5b205f6c70cfd414

Fixes: QTBUG-136723
Change-Id: I2e993e2b185f30d57503b5a3ce7ab63ba46afec2
Reviewed-by: David Edmundson <davidedmundson@kde.org>
2025-05-16 16:13:26 +08:00
Eirik Aavitsland
c9ab69d4e3 Update bundled libpng to version 1.6.48
[ChangeLog][Third-Party Code] libpng was updated to version 1.6.48

Pick-to: 6.9 6.9.1 6.8 6.5 5.15
Change-Id: I31762d38fc15db5649623300c3e6ac8c5e79cf67
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2025-05-16 04:14:51 +00:00
Eskil Abrahamsen Blomfeldt
f17a8ac6fb Upgrade Harfbuzz to 11.2.1
[ChangeLog][Third-Party Code] Upgraded Harfbuzz to version
11.2.1.

Task-number: QTBUG-136745
Pick-to: 5.15 6.5 6.8 6.9
Change-Id: Ie3f67e84447f30579933d92677908f3606e557a4
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2025-05-16 06:14:33 +02:00
Christian Ehrlicher
e34db561cf Windows11/VistaStyle: pass dpr to QIcon::pixmap()
Pass the correct devicePixelRatio to QIcon::pixmap() to make sure the
best pixmap is used for the current dpr.

Pick-to: 6.9
Change-Id: I70014b649457cee819228fa0ead7beb7de944471
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
2025-05-16 00:16:45 +02:00