Commit Graph

49182 Commits (d4c7da9a07dc1434692fe08a61ba22c794574c4f)

Author SHA1 Message Date
Thiago Macieira d4c7da9a07 CBOR: fix sorting of UTF16-to-UTF16 strings
This amends commit 394788c68e (its
ChangeLog applies to this commit too). That fixed sorting of UTF8-to-
UTF16, but when adding more unit tests, I've discovered that some UTF-16
strings also sorted incorrectly. There were two problems:

First, we were assuming that we could rely on the UTF-16 length as a
proxy for the UTF-8 one, but that's not true for some cases:
* both 1-, 2- and 3-codepoint UTF-8 sequences are 1 codepoint
  in UTF-16, so some strings would have identical UTF-16 length
* 4-codepoint UTF-8 sequences shrink to 2-codepoint UTF-16 ones
  (2:1) but 3-codepoint UTF-8 sequences shrink to 1 (3:1), so
  some strings would be longer in UTF-16 but shorter in UTF-8.

Second, QtPrivate::compareStrings performs UTF-16 codepoint comparisons
not Unicode character ones, so surrogate pairs were sorting before
U+E000 to U+FFFF.

To fix all of this, we need to decode the UTF-16 string into UTF-32 and
calculate the length of that in UTF-8 to be sure we have the sorting
order right.

Since this is a slight behavior change with a performance penalty, I am
choosing to backport only to 6.7. The penalty mostly does not apply to
6.8 due to commit 61556627f2.

Pick-to: 6.7
Change-Id: If1bf59ecbe014b569ba1fffd17c4c4ddcc874aac
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-04-12 21:41:16 -07:00
Thiago Macieira 8e5ce9cd36 CBOR: implement faster comparison for equality in strings
If we don't need to sort, then we can use QtPrivate::equalStrings() to
get a few cycles of performance per string comparison.

Change-Id: I5f663c2f9f4149af84fefffd17c03d9b52ca696e
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-04-12 21:41:16 -07:00
Jarkko Koivikko 223b92490e print: windows: Fix setting page orientation
Previously when PPK_Orientation property was set, updateMetrics() was
called before doReinit() and updateMetrics() used physical dimensions
of the DC initialized with previous orientation, which resulted in
miscalculation of m_paintRectPixels, origin_x and origin_y variables.

This bug manifested itself as all sorts of weird behavior, such as
unexpected margins when changing paper size and printing beyond paper
margins.

Pick-to: 6.7 6.5
Change-Id: I2d0e104bee11165e3541e7f3119b29edd4b882c8
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2024-04-12 19:55:46 +00:00
Gary Wang 5a775fc5f7 WindowsIconEngine: Use the correct icon for document-properties
Currently the icon used by document-properties is a gear icon, on
Windows, the actual icon used by explorer's context menu for the
properties menu option is the wrench icon. This patch change the icon to
the wrench icon.

Fixes: QTBUG-124085
Pick-to: 6.7
Change-Id: Ife49ad64d23b73b7676bc39330887e2cb320dcf9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-04-12 19:55:30 +00:00
Allan Sandfeld Jensen 25c96d547b Add CMYK support to QColorSpace
[ChangeLog][QtGui][QColorSpace] Support for CMYK color spaces has been
added.

Change-Id: I2c684dbeee8b97fc90ca4e2a892349a7fa465d06
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2024-04-12 21:53:54 +02:00
Even Oscar Andersen e794894ece :wasm Fix not possible to type tab character in TextEdit
qinputcontrol refused to accept the character since
text part of key was empty

This caused the tabkey to always switch focus instead

Fixes: QTBUG-12423
Change-Id: I9ea7f02831cc88479b4e15d25eac278547f6f711
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2024-04-12 17:31:51 +00:00
Tatiana Borisova 92cc21b389 QCborMap iterators: use new comparison helper macros
New comparison macros are used for following classes:
- QCborMap::Iterator
- QCborMap::ConstIterator

Replace public operators operator==(), operator!=(), operator!<(), etc
of classes to friend methods comparesEqual(), compareThreeWay();

Use *_helper methods to have an access to protected members of
QCborValueConstRef class from friend functions.

Task-number: QTBUG-120300
Change-Id: I71b6febaf3f31ea7ba668d91c375b0a7b6827d21
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-04-12 19:31:51 +02:00
Tatiana Borisova de2a467a77 QJsonObject iterators: use new comparison helper macros
New comparison macros are used for following classes:
- QJsonObject::iterator
- QJsonObject::const_iterator

Replace public operators operator==(), operator!=(), operator!<(), etc
of classes to friend methods comparesEqual(), compareThreeWay();

Use *_helper methods to have an access to protected members of
QCborValueConstRef class from friend functions.

Task-number: QTBUG-120300
Change-Id: I308e2c0a549ff186c1d6339b38e989b80dc388a3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-12 19:31:51 +02:00
Hatem ElKharashy aabb133d07 Tweak the margin value of QOutlineMapper clip rect
The original change was introduced to fix performance regression due to
the increased value of QT_RASTER_COORD_LIMIT. The optimization was done
by clipping anything outside the device rect plus a small margin.
However, setting the margin to a small value caused a regression, where the
rasterization became slightly different from the previous implementation.

Fixes: QTBUG-123054
Pick-to: 6.7 6.5 6.2
Change-Id: Ic4fddea89cd5f6e5760dc4a91b1f2f59527e8e5c
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2024-04-12 20:12:18 +03:00
Jan Arve Sæther ddc80cc63d Implement QWindowContainer::minimumSizeHint()
It will return the minimumSize of the underlying QWindow.
The container can then be put inside QLayouts without risking to be
shrunk to a smaller size than the QWindow::minimumSize.
Whenever the QWindow::minimumWidth or QWindow::minimumHeight changes, we call QWindowContainer::updateGeometry(), which will make the layout re-query QWindowContainer::minimumSizeHint() again.

Task-number: QTBUG-121798
Change-Id: Ib7ece7d9d75f2e4964ca9042d8d8b95ce3b17739
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-12 17:12:18 +00:00
Rym Bouabid 7d44817fc0 PRNGLocker: disable copy and move
Axivion (SV61) points out based on Qt-RuleOfThree the lack of copy and
move constructors and operators.
We don't need them, so tell the compiler not to create them.

As a drive-by change mark the constructor as explicit and not
discardable.

Task-number: QTBUG-122619
Pick-to: 6.7 6.5
Change-Id: I466f5cedea427608b434b71fda0d1e50619b9b20
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-12 15:01:38 +02:00
Mårten Nordheim 4c286d6f6c QHash: Add note about reference/iterator invalidation
It is mentioned in the porting docs, and in the class description
of the _iterators_, but none of those are really natural places to
look for the behavior of the container.

So, let's add a general note/warning to the functions in question.

Fixes: QTBUG-124195
Pick-to: 6.7
Change-Id: Ic95e56f166df2c8067232dfb6b9cb5b05d6a4361
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-12 14:59:44 +02:00
Mårten Nordheim 9d8e233284 QSaveFile[win]: Use SetFileInformationByHandle for atomic rename
With our previous setup we would CloseHandle the file handle and then
MoveFileEx the file to the final destination. This opens up the
opportunity for other processes to open the file in the meantime and
cause the MoveFileEx to fail.

With SetFileInformationByHandle we can, without closing the handle,
rename the file to the final destination.

Fixes: QTBUG-122208
Pick-to: 6.7
Change-Id: Id3c8e0b5703da280c84e466ed88287e99788d077
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-12 14:59:40 +02:00
Christian Ehrlicher efd6786e52 SQL/ODBC: convert QVariant to QDateTime only once
... instead three times in a row.

Pick-to: 6.7
Change-Id: If08b4c092cfb5b7d224f9a94afb7d395ce2b2eca
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-12 13:34:10 +01:00
Axel Spoerl 2ec2c54e05 uic: use qOverload for ambiguous slots
qOverload was used only for ambiguous signals and slots with no
arguments. Connections to ambiguous slots made in widget designer's
signal/slot editor, lead to an unresolved ambiguity when compiling
the generated code in ui_xxx.h. One example is QLabel::setNum(), which
can either take a double or an int.

Always using qOverload is not an alternative, because signatures are
normalised. E.g. const QString & / QString can't be distinguished.

Add a map with all ambiguous signals and slots to customwidgetsinfo.cpp.
Hardcode the map, because uic lives in QtCore and can't access meta
objects of gui/widget classes.

Use this map in isAmbiguousSignal() and add isAmbiguousSlot().

Change OverloadUse enum into an enum class in language.cpp. Change
enum values to reflect the new condition for slots to use qOverload.

Rename existing enum values and remove default argument in
language::formatMemberFnPtr() to improve code readability.
Apply const T& syntax for all types starting with Q, except QSize and
QPoint.

Revert 94c16517b3, which was a hack
forcing for QLCDNumber::display() to a string based connection.

Add a new baseline to tst_uic, to test the above.

Fixes: QTBUG-93413
Task-number: QTBUG-124241
Pick-to: 6.7 6.6 6.5 6.2
Change-Id: I49ccc1688cfc08970cce3e56adf18e5ac49a77e1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2024-04-12 12:32:16 +00:00
Pavel Dubsky a204417600 Unseal overridden methods on QComObject
There are cases where overriding AddRef, Release, and/or QueryInterface
and adding additional functionality besides commonly required might be
beneficial.

Change-Id: I4407960164edf0441d1d054356f74abba6becbe7
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
2024-04-12 12:31:17 +00:00
Christian Ehrlicher 30ac79464c SQL/IBase: use categorized logger
Use the categorized logger qt.sql.ibase

Change-Id: Id7cdc54b8b01ee5af0526e3c522c2511697380d3
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-12 12:06:03 +02:00
Christian Ehrlicher 46b387f3bd SQL/OCI: use categorized logger
Use the categorized logger qt.sql.oci

Change-Id: Ib143cfa3136a7382adbabfe4bc421b94e2a25bda
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-12 12:06:03 +02:00
Christian Ehrlicher c39fb9035c SQL/Mimer: use categorized logger
Use the categorized logger qt.sql.mimer

Change-Id: I1b0d149a1a6317eec3b821dee99d952ef1000c28
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Fredrik Ålund <fredrik.alund@mimer.com>
2024-04-12 12:06:02 +02:00
Christian Ehrlicher c7c8b8f25d SQL/ODBC: Don't allow default argument for SqlStmtHandle
To avoid usage errors like fixed with
7e5a0b54f0

Pick-to: 6.7
Change-Id: I33af9721a04e80541c027fa6da8630070a5957ac
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-12 12:06:02 +02:00
Lauri Pohjanheimo 6209079c7a Android: fix 180 degree orientation issue
On android documentation orientation changes are sent via
onConfigurationChanged callback. Previous implementation
based orientation detection to onSizeChanged callback.
That callback is not called when orientation turns 180 degrees.
i.e. between landscape and inverted landscape.
This fix adds detection to on onConfigurationChanged to catch
those cases.

Fixes: QTBUG-118887
Fixes: QTBUG-118236
Pick-to: 6.7 6.5
Change-Id: Ie2f81798de97e460de839f7ebfde9a9efa25909f
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-04-12 02:20:51 +03:00
Sune Vuorela 19258608e9 QFileSystemModel: Add role for fileinfo
Instead of having users traverse a ProxyModel hierarchy to
get to a QFileSystemModel to use the fileInfo(QModelIndex)
function, just let it be available with the roles.

Change-Id: I285347d1d85b4c6253fcb893737aa629a56e27fd
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-04-11 23:12:42 +01:00
Dennis Oberst c6a2f7a70e QLoggingRule: default initialize 'messageType' member
Fixes Axivion(SV70928): Qt-Generic-InitializeAllFieldsInConstructor

Task-number: QTBUG-122619
Change-Id: Ida5ed45c6bce30541fb268f7aeb4339eca2f4dbe
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-04-11 21:54:00 +02:00
Allan Sandfeld Jensen 232f3bc768 Switch to ICCv4 mluc tags
Should make the profile a valid ICCv4 profile now.

Change-Id: Ifb8649b588117a4357e1f801c9b0202202ce9a38
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2024-04-11 21:53:59 +02:00
Mårten Nordheim 1d03e1851b QHttp2Connection: fix handling of replies on locally initiated stream
It was overlooked in testing, but it would emit a signal for new
incoming stream even if the server was just replying with HEADERS on a
stream the client had initiated. Or vice-versa.

Pick-to: 6.7
Change-Id: Ie7b3a45729a78106da1d8c058e15705cc7dcc53b
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-04-11 21:53:59 +02:00
Rym Bouabid b9cb2f30f1 QCborMap::ConstIterator and Iterator: Add missing destructor
Axivion (SV403 and SV404) points out, based on rule of three,
the lack of destructors for ConstIterator and Iterator.
So add them.

Task-number: QTBUG-122619
Pick-to: 6.7 6.5
Change-Id: I4d4abf9be8be529492bf13069052ae4a8d8a90de
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-11 21:53:59 +02:00
Dennis Oberst cf420dc98e ResultReporter: fix uninitialized int member
Fixes Axivion(SV70842): Qt-Generic-InitializeAllFieldsInConstructor

Task-number: QTBUG-122619
Pick-to: 6.7 6.5
Change-Id: I8ee378246df4767122ca91d65170cae82232044b
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-04-11 21:12:13 +02:00
Laszlo Agocs e12791b057 rhi: d3d: metal: Improve docs for importing existing resources
The struct members were not described. Add something for each in the
docs.

Pick-to: 6.7
Change-Id: I75d0a5a6efee4d7b4a415b5282a9e44950ed3894
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2024-04-11 20:12:13 +01:00
Giuseppe D'Angelo 4256651047 QCborValue: avoid a double isAscii check
The QCborValue(QL1S) constructor checks if the parameter is ASCII.
If it's not, it converts it to a QString and stores as such.
However, the QString is checked *again* for being ASCII. We know
it isn't -- skip this recheck.

Change-Id: I7a4776759b2b14aab955cffebde6e3b64f8ed1d1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-11 21:12:13 +02:00
Eskil Abrahamsen Blomfeldt 421e7621fa Implement aliased text rendering with DirectWrite
This creates aliased glyphs using the DirectWrite engine when
requested.

Note: There was previously a fallback to GDI to support aliased
text, which ignored the hinting settings. This patch also removes
that fallback.

[ChangeLog][Windows] Support QFont::NoAntialias with the DirectWrite
font engine.

Pick-to: 6.5 6.6 6.7
Fixes: QTBUG-97645
Change-Id: I587f56ace468cfdd57debe7bc8492a96587a4e05
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2024-04-11 07:17:25 +02:00
Volker Hilsheimer 0d91cc866f Mac style: draw dock widget titles and status bar without gradient
Fill with the "window" color of the palette as passed in through
the style option, which takes care of active vs inactive color
selection.

The title bar of a docked dockwidget is a bit lighter than the
main window title and unified toolbar background, but identical
to the color of the title of an undocked dock widget. This is now
the case for both dark mode and light modes.

Also remove the gradient fill from the status bar, just fill it
with the window brush.

Remove the now unused helper functions for the title bar
gradient.

Fixes: QTBUG-92855
Pick-to: 6.7
Change-Id: Ia04c630201b288c0107567d3f459f66129693c82
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-04-11 04:35:32 +02:00
Wladimir Leuschner 61b71ffb3b QComboBox: Revert recreation of ComboBox Container on style change
In commit 9da8d67b3b a recreation of the
ComboBox Container was introduced, since QWindows11Style depends on
WA_TranslucentBackground flag, whereas the other styles don't set this
flag. This leads to the destruction of user supplied views we don't own.

Fixes: QTBUG-124191
Pick-to: 6.7
Change-Id: I4a693f612ddc299696b9de0d87c94d88c04d9b39
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-04-11 02:35:27 +00:00
Volker Hilsheimer 74e0ed217f StyleSheet: respect a font weight set for header sections
QCommonStyle sets the font for a selected header section to bold.
This overrides the font weight a calling style might already have set,
e.g. when a style sheet is applied to explicitly set a weight for a
checked header section:

QHeaderView::section:checked {
   font-size: 20px
   font-weight: normal
}

Since setting the weight on a font sets the respective resolve-mask
bit, we can avoid overwriting a weight that is already set explicitly.

Add baseline test coverage using a QTableWidget.

Fixes: QTBUG-122180
Pick-to: 6.7 6.5
Change-Id: I8c6279ad2fd8c5718ebea26e27c64ae823625748
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-11 04:35:22 +02:00
Volker Hilsheimer 19b38ede78 Mac style: draw MDI window title bar without gradient
Use a solid fill with the "button" color of the palette also for active
title bars, which is then the same color as the frame, and gives the
window a consistent look in both dark and light mode.

Fixes: QTBUG-123162
Pick-to: 6.7
Change-Id: Iac26fdb1518ffe4f8255e01bedf7329be40ac258
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-04-11 04:35:17 +02:00
Sergio Martins 97d227acc7 QToolButton: Don't crash if deleted while in event handler
If QToolButton::mouseReleaseEvent triggers its deletion then it
will crash when dereferencing its d pointer.

qabstractbutton.cpp already uses QPointer guards in many places but
qtoolbutton.cpp was missing this one.

While deleteLater() is still our recommendation, we shouldn't crash.
It's not always obvious what led to the button's destruction,
as the chain of indirections can be long.

Change-Id: I4a33447fa4e90953370277eb57a161398ded9a9c
Pick-to: 6.7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2024-04-11 03:35:10 +01:00
Dennis Oberst d4f2a5aa40 QOCICols: fix warning for -Wdangling-reference
.. by playing it safe and taking the QVariant by copy

Pick-to: 6.7 6.5
Change-Id: I24e0507a912388b7fb17e838a22e8d4c449bcf5b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-04-11 04:35:06 +02:00
Friedemann Kleint b79cb3dd65 uic: Write QIcon theme enums
Split out some helpers to write the theme code with path fallback
checking for the enum case (identified by a fully qualified icon) or
the old XDG/filename case.

Task-number: QTBUG-121823
Pick-to: 6.7
Change-Id: If2755483ab899f04e372cf95443f7e03970f6e7f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-04-10 21:01:07 +02:00
Axel Spoerl ef8e548cf1 QLayout: Consume ChildRemoved event, when layout is disabled
QLayout::widgetEvent() returned early, when the layout was disabled.
That suppressed ChildRemoved events and lead to a crash, when the
layout was enabled again.

Don't return early on ChildRemoved events.
Add an autotest in tst_layout::removeWidget().

Fixes: QTBUG-124151
Pick-to: 6.7 6.5 6.2
Change-Id: Ib0a0bb73978d9fc2c9777d300cf38a8c4496b702
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Chris René Lerner <chris.lerner@qt.io>
2024-04-10 19:01:06 +00:00
Oliver Wolff ca851b3317 Unify behavior of QSystemTrayIcon::geometry for hidden icons on Windows
When a system tray icon on Windows wasn't visible (hidden behind the ^
icon in the task bar) our previous implementation gave different
results on Windows 10 and Windows 11.

On Windows 10 the geometry returned the geometry of the ^ icon itself
while we returned a geometry outside of the screen geometry on Windows
11 (that was what the Windows API gave us).

We work around this problem by using version specific hacks to be able
to check for the visibility of the system tray icon itself. If the icon
is hidden we just return QRect().

[ChangeLog][Windows] The geometry of a hidden QSystemTrayIcon was
unified over different Windows versions. It will always return QRect()
now.

Change-Id: Iee7dea184936a13a9221df9c421400ba304a4c38
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
2024-04-10 21:01:06 +02:00
Kai Uwe Broulik 8013b643c2 QWaylandWindow: Add surfaceRoleCreated/Destroyed signals
There are many APIs in Wayland that require a surface role to be
assigned (e.g. XDG Toplevel) before they can be used, where
the surfaceCreated() signal is too early.

Change-Id: I400a6279f21554267259f812a2efb33451b4709b
Reviewed-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
2024-04-10 20:01:06 +01:00
Wladimir Leuschner f39f2bfe0b QStyleSheetStyle: Propagate CE_ItemViewItem drawing to baseStyle
Currently the drawing of CE_ItemViewItem is propagated to QWindowsStyle,
which leads to ignoring alternating rows in ItemViews. Propagating the
drawing to baseStyle honors the set base style.

Fixes: QTBUG-123632
Pick-to: 6.7 6.6 6.5
Change-Id: I656ee1c44029abf7233551303d469d38b6c848e3
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-10 11:15:00 +00:00
Axel Spoerl 80bfeb4e79 XCB: Suppress leave event, when mouse leaves with button pressed
Fixes: QTBUG-124003
Pick-to: 6.7 6.6 6.5 6.2 5.15
Change-Id: I232f731b4b5f9e332b1297e5fdae2cadbdf2db1a
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Błażej Szczygieł <mumei6102@gmail.com>
2024-04-10 06:38:41 +00:00
Thiago Macieira 0c0caeb59e qt_int_sqrt: update doc of where it is used
Change-Id: If1bf59ecbe014b569ba1fffd17c458ae3af0175f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2024-04-10 01:23:53 -05:00
Thiago Macieira 05408055d5 QProcess: build forkfd as C code
forkfd_qt.cpp was originally created so we could use the Qt atomic
classes back when we couldn't rely on C11. We now can, so that primary
reason is gone. We only need it now to set NDEBUG, which the Qt build
doesn't set by default, and _GNU_SOURCE to match forkfd.c itself (GCC
and Clang define it by default in C++ mode because libstdc++ apparently
needs that).

Amends 993db5a122 and thus avoids a new
Clang 18 warning about using VLAs in C++ code:

 forkfd_linux.c:160:50: error: variable length arrays in C++ are a Clang extension [-Werror,-Wvla-cxx-extension]

Pick-to: 6.7 6.6
Change-Id: I5f663c2f9f4149af84fefffd17bed82d39be4d78
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-04-10 06:23:46 +00:00
Martin Storsjö aa896ca9f5 QStringTokenizer: Add a missing include
This header uses std::forward_iterator_tag, which requires including
the <iterator> header.

This fixes building with libc++ with
_LIBCPP_REMOVE_TRANSITIVE_INCLUDES enabled.

Pick-to: 6.7 6.5 6.2
Change-Id: Id2ce97e158c87dab1efe30e54a93f0bc9351de5a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-04-10 04:24:20 +03:00
Tatiana Borisova e20a3694c7 QCborArray iterators: use new comparison helper macros
New comparison macros are used for following classes:
- QCborArray::Iterator
- QCborArray::ConstIterator

Replace public operators operator==(), operator!=(), operator!<(), etc
of classes to friend methods comparesEqual(), compareThreeWay();

Use *_helper methods to have an access to protected members of
QCborValueRef class from friend functions.

Task-number: QTBUG-120300
Change-Id: Ie8ffef3e2278dfbf2bf0b32c30a7bf98d99fd1c3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-10 00:22:09 +02:00
Shawn Rutledge 3941fe697b libinput: Allow setting touchscreen matrix via env var
[ChangeLog][QtGui][libinput] The environment variable
QT_QPA_LIBINPUT_TOUCH_MATRIX now can be set with a string of 6
space-separated numbers to set the touchscreen transformation matrix.
See docs for libinput_device_config_calibration_set_matrix()

Fixes: QTBUG-68698
Change-Id: I72ba94e1ee6d39d31d1689ce6ce85fa8e676ff13
Reviewed-by: Dominik Holland <dominik.holland@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2024-04-09 21:10:47 +00:00
Wladimir Leuschner a35f57d429 QWindows11Style: Check for nullptr after qobject_cast
Fixes: QTBUG-123791
Pick-to: 6.7
Change-Id: I050196bdf45754509a223c89652e0be7e0160a98
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2024-04-09 18:12:18 +00:00
Michael Weghorn 9f464716b0 qtpaths: Drop obsolete code for Qt < 6
Change-Id: I1da44d57e872df76e6774a7603edd7049461520e
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-04-09 18:48:43 +02:00
Tor Arne Vestbø 5898e0e4f1 CMake: Improve Xcode projects for single SDK builds on Apple platforms
Xcode expects the base SDK to always be the device SDK, so we can't
pass CMAKE_OSX_SYSROOT on directly.

We use the Xcode SUPPORTED_PLATFORMS setting to inform Xcode about
which targets we can actually build and run for.

Change-Id: Ib46e81e946bc89f62d1e700422b37166c3d55009
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-04-09 18:48:43 +02:00