Commit Graph

50656 Commits (ea855095a6484ff2fd3e5ad3aa0f16aa9da010e1)

Author SHA1 Message Date
Marc Mutz ea855095a6 Remove unused qcorecmdlineargs_p.h from qcoreapplication_win.cpp
Amends 71b54cc244.

Change-Id: Ie4b83fa44956ec23615ddaea6bd4638be583318f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit f4e2c987300f5554c2125f05fad7bc6014b2d7c9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 17:54:38 +00:00
Michał Łoś 0c4f0b557e Enable compilation of qtbase with localserver off
Since we will need to turn off this feature for certain platforms, code
must compile with QT_FEATURE_localserver turned off, which now can't.
Fix this by disabling parts of code requiring QT_FEATURE_localserver.

Task-number: QTBUG-115777
Change-Id: I6d78030db67ee679d6877b48a437db90a6e47a02
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 5bbb05c72c8b8f2d33beae722a704a1c293a55ea)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 15:09:47 +00:00
Vladimir Belyavsky 6a2035d970 QFontDatabase: use categorized logging more
Use "qt.text.font.db" logging category to print OpenType related
warnings during loading a font engine. Also, as a drive-by change,
use qUtf16Printable() to avoid unneeded allocations.

Task-number: QTBUG-129092
Change-Id: If603aa1251c0073aec7bb0ba75d3e5e9e0385ac1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 0c7a89f55e216d1f679fedf17f6d014ca722f735)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 15:09:46 +00:00
Ulf Hermann a3df6c36db QUrl: Keep one trailing slash when normalizing "file:///b/."
Removing the slash would be a drastic change in behavior. We can expect
many people to rely on the trailing slash to string-append further path
segments without inserting an extra slash.

Amends commit e7bcf41c0b23d83cfb31f966454945c705589a99.

Pick-to: 6.7 6.5
Fixes: QTBUG-128940
Change-Id: I71dfc957f383e4648b3b47a40aeb796d7237fb00
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 2addfa635d2f666d18ffc818f76eb673a6c787d1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 15:09:46 +00:00
Volker Hilsheimer fd3482ea97 Android: iterate over const QJniArray
If/when we introduce mutable QJniArray iterators, then iterating over a
mutable array will be significantly more expensive due to the write-back
from the reference type.

Change-Id: I2e8eb357fdb6a9890699f5c61d49b635d303f301
Reviewed-by: Soheil Armin <soheil.armin@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 2d4f4220dd068c1253e701cdf6aefab17ef91c75)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 15:09:46 +00:00
Morten Sørvig 77aa6640fe wasm: fix drop of small files
On drop, close the file after write before sending the drop
event to make sure file content is flushed to to the
file system.

Pick-to: 6.8.0 6.7
Task-number: QTBUG-128855
Change-Id: Ide14bfebbdef07eee03ae1bd19d394da537ab123
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit 0a37f038bfd7e18d9538dde8212a6c323eb4e70f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 15:09:46 +00:00
Wladimir Leuschner b51078e927 QWindows11Style: Fix disabled QPallete::windowText color in light theme
Fixes: QTBUG-128499
Pick-to: 6.7
Change-Id: Ib44998f8c55485df71d1fca0724c533f81405ff4
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit ff1273b360a38418de22829ac815f6ffddd53ddf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 15:09:46 +00:00
Marc Mutz 1c3087b2e6 De-inline ~QDeviceClosedNotifier
This is weird, since Clang -Wweak-table didn't trigger here.

But -Wmarc did...

That's because the virtual functions behind the Q_OBJECT macro are
implemented in the moc file, so are actually out-of-line. And
~QObject() isn't the first virtual function in QObject...

Still define the destructor out-of-line, for consistency.

Amends ad265c55be.

Task-number: QTBUG-45582
Task-number: QTBUG-126219
Change-Id: Iada95966b7244873390f4c7ad42de9352311ca33
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 41c5856ffa6cac43c15a6a43261b6693e7b0566f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 12:41:49 +00:00
Kai Köhne 9a8835c0d9 Doc: Fix qt_import_plugins snippet to use Qt6::
The documentation text uses Qt6:: instead of Qt::, so let's
also use that in the shown snippet. This is also the style
we promote for targets in other documentation pages.

While at it, print the target names consistently in monospace
font.

Pick-to: 6.7
Change-Id: Ia4d67bad2790d6688ef8d5b4103453c5c40877bc
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit e836f8794403696a8467b69f0ab822d36b01a18c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 10:19:31 +00:00
Nils Petter Skålerud 3eecf663a4 iOS: Handle new contacts permission enumerator
iOS 18 added a new enumerator value for contact permissions,
"Limited". This value has not been added for any other permission
enumerator types such as camera. Currently we get compiler errors
for not explicitly handling this value in a switch case. This change
explicitly handles this enumerator and enables compilation.

Pick-to: 6.7 6.5
Change-Id: Idfc45902f9ae2e555fab8ba3d860a58d89651964
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 0bc5e5ad0e490a1d8e140855b23abbb087c6f9a5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 09:30:06 +00:00
Marc Mutz 9fc8edb826 qendian_p.h: fix -Wshadow warning
Rename the private member to m_storage. That is more churn than the
alternative of just renaming the ctor argument name, but is more
idiomatic.

This is in preparation of applying headercheck to private headers,
too.

Amends 38002df206.

Pick-to: 6.7 6.5 6.2 5.15
Task-number: QTBUG-126219
Change-Id: Id638a4c286f7a0ef6649017904ed190aab2631b2
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 7515c21f4badd80c09982901de8dfadf62401a3f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 09:00:29 +00:00
Marc Mutz 2143044682 qtextstream_p.h: fix -Wshadow in QDeviceClosedNotifier
Rename the data member to m_stream, as is idiomatic.

Amends 327b2ba3b7.

Pick-to: 6.7 6.5 6.2 5.15
Task-number: QTBUG-126219
Change-Id: I830e90e0a6c88acf95de8394e45cad075d4c924e
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit e585b937167b9746091c520e303657fbec2fe221)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 09:00:23 +00:00
Marc Mutz 339d339e9d corelib/time: fix (easy) -Wunused-const-variable warnings in _p.h's
Make the constexpr variables inline to silence Clang.

There's another batch of such warnings for the _data_p.h files, and
they are actually pointing to a real problem: If two TUs include these
headers, the static constexpr tables actually get duplicated. Created
QTBUG-128930 to track the issue.

Amends 6d97cf0e57 and
fa9244700e.

Pick-to: 6.7 6.5
Task-number: QTBUG-126219
Change-Id: Idb0cd55e424a870be6127fdf8399d01e9f3e9ac8
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 5064cb6feff6178cf3c307790ba028514c3d3040)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 09:00:18 +00:00
Marc Mutz 53c1852cb6 De-inline ~QHttpNetworkHeader()
... and adapt the whole hierarchy to idiomatic dtors (add override,
remove virtual).

Fixes -Wweak-vtable and all the problems that violating it brings.

Task-number: QTBUG-45582
Change-Id: I180c774a135b1fbf1a7e942c91af25710a4bf5fd
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit dee1be0aae30f6d33ad8a7ee51341d3190ff84fd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 09:00:13 +00:00
Jani Heikkinen cbdc0d3d5d Bump version to 6.8.1
Change-Id: Ic8432157af13404391a5314ac2f44ac09abcfca5
Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
2024-09-19 07:20:47 +03:00
Rym Bouabid e99987329c QIODevice: remove unneeded resize(1) in QIODevice::readLine()
AFAIU, the resize(1) was merely there to have result.size() return 1
in the initial iteration of the do loop. Since resize(1) is always
followed by another unconditional resize() in the do-while loop,
remove it and use "1 + readBytes" instead of result.size() in the
follow-up resize() call inside the do loop.

Saves one resize() call and the corresponding executable size and
runtime overhead.

Pick-to: 6.7 6.5
Change-Id: I507acab2a6b7d55217cd454ecbbaf1df0e1d18e6
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit d9579f0043a04e08b3954eb6bb58637fc25fba9a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-18 16:29:26 +00:00
Marc Mutz ea1da56f84 qwaitcondition_p.h: fix -Wunused-const-variable
Make the constexpr variable inline instead of static to shut up the
warning.

Amends fbc491230f.

Pick-to: 6.7
Task-number: QTBUG-126219
Change-Id: Ifa8db14dc28f039d0dc65eb779d715cd4a2c7240
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 743403cb6d9957c1bdb6ef7a1bb6f30377f578a5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-18 13:19:38 +00:00
Marc Mutz e966f3189a QtCore: De-duplicate vtables, 2024 edition
This de-inlines destuctors of classes whose vtables are proven to be
duplicated by -Wweak-tables using the upcoming headersclean for _p.h
feature.

Since these are all private API classes, we can pick all the way back
to 6.2, and we don't need the comment that the dtor must always stay
empty, like for public classes.

Task-number: QTBUG-45582
Task-number: QTBUG-126219
Change-Id: I8c864c0d2ed3ca20d20d5cfc356290eb529edf6c
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 3af20bd8eb8c75017c5d6d138d7c42914ee5bee3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-18 09:34:52 +00:00
Marc Mutz 8189baf26d Suppress -Wunused-const-variable in _data_p.h files
... until a more robust mechanism for adding these generated tables to
the build has been found, cf. QTBUG-128930.

Task-number: QTBUG-128930
Change-Id: I190e04aba345cdd3ca6c94be6d0f7c2550362ecc
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
(cherry picked from commit 0988042c4742a85f1ea50eb1d7acfa84ef8e83e6)
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-09-18 09:32:51 +00:00
Tor Arne Vestbø 36fb8871d3 Windows: Set window style in correct order when reparenting foreign windows
The SetParent() documentation notes that when making a window a child
window the window style should be set before calling SetParent(), while
the opposite order should be used when making a window top level.

We were exclusively doing the latter, which resulted in child windows
getting activated and focused as part of the reparenting. Being the
active window was resulting in the child window receiving WM_CLOSE
and being destroyed if the user pressed Alt+F4, which was very
surprising.

The child window can still be focused later on, via e.g. an explicit
call to SetFocus(), so it can receive keyboard input.

The QWindowsWindow::setParent_sys() logic, used for non-foreign
windows has the same fundamental issue with not respecting the
order of the style update, but the interactions with the drop
site logic makes it harder to update in similar fashion as this
patch does for QWindowsForeignWindow.

Pick-to: 6.8.0
Change-Id: Id88f5981daaf121a39aba9319d02aebefb6aa07b
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit a90d99d8da9b2be2e6b8e981cd9dabfb1641e985)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-17 22:04:19 +00:00
Piotr Wierciński 333367ea7f wasm: Fix missing header files
Change-Id: I4d64053df4b7b183b223b5ec71444fb949834f45
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
(cherry picked from commit a8765d76c3875d7e9256d73bf9c29baf0f8fc3d0)
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit 0d6b20457300edab9f4d802d0abbb82c229a2374)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-17 16:43:51 +00:00
Allan Sandfeld Jensen ce8e5e7c1e Fix compile-time CRYPTO detection, and detection on MSVC ARM64
We had a mismatch of the naming of the Qt and compiler defines. Matched
the qt defines to the compiler define, and added detection support for
MSVC (ARM64).

Change-Id: I9abfbe8a96bc8c800e86dac3ab9a7abf9c1f7f9f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit bbdd20da04dd9d7a9a3250aef005e4549999a312)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-17 16:43:26 +00:00
Allan Sandfeld Jensen 4be72074a9 Clean-up MSVC ARM64 NEON support
Also fixing clang-cl support.

Pick-to: 6.8.0
Change-Id: If2130091edfadc0cc4d4cecd95c2256522efc69a
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 308bca94a72f83624e2e2c92449719e06940e77f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-17 16:43:20 +00:00
Marc Mutz 0260c0d9f5 Change QTimeZonePrivate::invalidSeconds() return type from qint64 to int
Inspected all in-tree callers, doesn't change semantics, but fixes a
few -Wshorten-64-to-32 Clang warnings (which we unfortunately didn't
enable globally upon s/int/qsizetype/).

Amends 48e2c3ac33.

Not picking back further than 6.8, because I don't want to review
historic callers.

Task-number: QTBUG-126219
Change-Id: I53c16d630dfffdba3801bf211f1b80d0346dd375
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 4bf1ed802151f8310b9adb56fac6de93f195cc44)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-17 16:22:53 +00:00
Marc Mutz d96ce5eb0d qlocale_tools_p.h: fix -Wfloat-equal
Compilers _do_ grumble, after all:

  qlocale_tools_p.h:68:14: warning: comparing floating point with == or != is unsafe [-Wfloat-equal]
      return d == 0; // Amusingly, compilers do not grumble.
             ~ ^  ~

Fix by using the public qIsNull(double) function, which has
suppressions and was designed for this task.

Amends f645bb8880.

Pick-to: 6.7 6.5
Task-number: QTBUG-126219
Change-Id: I33f1fcb4c8c2ee30ad9a36cb46b806ef253e8062
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit aac83724013a1f226d2bf4b923447eb1b0e5c493)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-17 16:22:47 +00:00
Marc Mutz b291e7eb46 qtipccommon_p.h: fix -Wunused-function
Make isIpcSupported() non-static so Clang doesn't warn that it's
unused.

Amends f79b535f6b.

Pick-to: 6.7
Task-number: QTBUG-126219
Change-Id: I0c99d2196fcec8d7fcd1480d09fbbe176ce365b2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit c0cd2c843c4c08e840e6629668bbf3aac7975e09)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-17 12:44:33 +00:00
Marc Mutz e2880c7d92 qsavefile_p.h: fix missing qsavefile.h include
This causes

  qsavefile_p.h:28:22: error: unknown type name 'QSaveFile'
      Q_DECLARE_PUBLIC(QSaveFile)
                       ^

when qsavefile_p.h is included before qsavefile.h was.

Make the header self-sufficient by incuding the Public class' header,
too, as is customary.

Amends e993df8771.

Pick-to: 6.7 6.5 6.2 5.15
Task-number: QTBUG-126219
Change-Id: I17eb2a357bf1ef7ef5b5e3a3e56c4a921ba30951
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit ad6e4df580a2437cc69be416956f6128267ffbea)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-17 12:04:48 +00:00
Marc Mutz adc73cf5b9 QPropertyBindingPrivate: prevent -Wshadow in qqmlpropertybinding_p.h
This is preparation of applying headercheck to private headers, too.

Changing the private data member name to m_error is the simpler change
here, since it touches a bounded amount of code vs. the alternative of
fixing an unbounded number of unknown users.

Amends 9f33ad904a.

Pick-to: 6.7 6.5 6.2
Task-number: QTBUG-126219
Change-Id: Ie0f6b5e711b35a12fadc9d8e642b885ce8b57315
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 9348212be3880ecd93111b7321043a53ab1df45a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-17 12:04:42 +00:00
Michael Weghorn 77b8cd0a45 a11y: Remember QTreeView's a11y child interfaces
In the same way that QAccessibleTable::child already
does, also make use of the childToId hash in
QAccessibleTree::child to remember and reuse previously
created child interfaces instead of creating new ones
for the same index every time the method gets called.

When items in the tree view change,
QTreeViewPrivate::updateAccessibility already sends a
QAccessibleTableModelChangeEvent event of type
QAccessibleTableModelChangeEvent::ModelReset,
which ensures that the then outdated cache is cleared
in the base class's QAccessibleTable::modelChange
method.

This addresses an old FIXME comment added in 2013
commit b2ec0da956 and
fixes the issue reported in QTBUG-128558.

Fixes: QTBUG-128558
Pick-to: 6.7
Change-Id: Ia2a518ac26f3c9b9ba8ab1870bb656c8e9014a77
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 3cfabf92b09290f71b7fafa79723dc374b807206)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-16 22:36:17 +00:00
Piotr Wierciński e9f1dd072d wasm: Fix integer overflow in FetchRequest
Remove code which is trying to unset flag that has never been set
before. Subtracting flag on unsigned int "attributes" can cause integer
overlow.

Fixes: QTBUG-128929
Pick-to: 6.7 6.5
Change-Id: I4128819f29a841b73b6a08aeba795dcae9dc2e51
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 21be40019f8adedf1e592b9b8ba0d965b857eef3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-16 21:20:53 +00:00
Rym Bouabid 57f2dff05c QIODevice: improve QIODevice::readLine() documentation
Pick-to: 6.7 6.5
Change-Id: I252c0faf982ff8328475243fdbc86cc4d1462498
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit bbf980e43f16c99504d75998217b88855edd3365)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-16 20:58:39 +00:00
Christian Ehrlicher e99c2d9314 SQL/OCI: use OCIBindByPos2 instead OCIBindByPos
Use OCIBindByPos2 instead OCIBindByPos where it was not yet changed to
allow lengths > 2^31 (and avoid unneeded casts).

This is a follow-up of 7005630a9b735f2e59e3345fee0305e0277c0208.

Change-Id: I8b6efdfdb0fb349043e9c84ceba17e008882f584
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 911eac26d482b8d63419648d6f735c49e9e17c82)
2024-09-16 18:41:42 +00:00
Tatiana Borisova ca3fa76a4e QDialogs: prevent crash in static get*() functions when parent gets deleted
- As explained in
https://blogs.kde.org/2009/03/26/how-crash-almost-every-qtkde-application-and-how-fix-it-0
creating dialogs on the stack is a bad idea, if the
application or the dialog's parent window can be closed
by means other than user interaction (such as a timer or
an IPC call). Since we cannot know whether Qt is used to
build such an application, we must assume it is, create
the dialog on the heap, and monitor its lifetime with a
QPointer.

Long time ago instead of using manual resource management,
QAutoPointer was added to fix the crash problem for QInputDialog.

The same fix now is being applied for the rest of QDialog classes:
QColorDialog, QFileDialog, QFontDialog.

Documentation warnings about deleting the parent are not actual anymore. Deleted.

Pick-to: 6.5
Task-number: QTBUG-54693
Change-Id: Ib7cc0575ea25f392a295538e21de9015dc49ebe4
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 81d55f772892445686862e49d0a6092668f8c725)
2024-09-16 16:13:47 +00:00
Marc Mutz 9ce6596394 QtCore: fix private header compilation under QT_NO_KEYWORDS
This is in preparation of applying headercheck to private headers,
too.

Task-number: QTBUG-126219
Change-Id: Iff5fd8e848d67b7edd9541b0e78740bc4b4ff7c4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 55b5e78ac31171be61ceeb932d494d5060d1fa02)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-15 12:15:34 +00:00
Marc Mutz 7953546072 QBindingObserverPtr: fix redundant ;
Found by applying headercheck to private headers, not just public
ones.

Amends f1b1773d0a.

Pick-to: 6.7 6.5 6.2
Task-number: QTBUG-126219
Change-Id: I3998cd5875f989152c6bd6b24b04e61627959cc2
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 1d163e916c8da49f9f617ca1545b5f6ac9d6a0b9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-15 12:15:31 +00:00
Marc Mutz 1fda161d69 QDuplicateTracker: fix redundant ;
Found by applying headercheck to private headers, not just public
ones.

Amends f21a6d409e.

Pick-to: 6.7 6.5 6.2 5.15
Task-number: QTBUG-126219
Change-Id: I8be52a04ae9d9af2e68a72f1128bfbd09fd85e8e
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 8bfd696297b35684ee1c80127d7b0ce09a374d85)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-15 12:15:29 +00:00
Marc Mutz ef7f9ba1e9 qmimetype_p.h: remove incorrect QMimeBinaryProvider fwd declaration
It was outside the QT_NAMESPACE, declaring a class different from
QT_PREPEND_NAMESPACE(QMimeBinaryProvider) in -qt-namespace builds.

Amends 4e9944e6c8.

Pick-to: 6.7
Change-Id: I8dec4d676fd774462ad63418ee8d82d1b0e44d1d
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 5820d54103d5c432ae8eaae180aefb1988f835ce)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-15 12:15:07 +00:00
Marc Mutz 5d6a204789 Fix -Wdouble-promotion in FP overload of convertDoubleTo()
Found by applying headercheck to private headers.

Says GCC:

  global/qnumeric_p.h: In instantiation of ‘[...]
  {anonymous}::convertDoubleTo(double, T*, bool) [with T = float;
  [...]]’:

  text/qlocale_p.h:312:51: required from here

  global/qnumeric_p.h:390:22: error: implicit conversion from ‘float’
  to ‘double’ to match other operand of binary expression
  [-Werror=double-promotion]

    390 |     if (std::fabs(v) > (std::numeric_limits<T>::max)()) {
        |         ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Since we already checked that numeric_limits<T>::max_exponent <
numeric_limits<double>::max_exponent at this point (see constexpr-if
at the top of this function template), we can assume that the cast of
the RHS of the relational operator to double is safe. Use braced
initialization to statically assert that this is, indeed, the case.

Amends 1e43b64a7a and
a14bba6803.

Pick-to: 6.7 6.5 6.2 5.15
Task-number: QTBUG-126219
Change-Id: If2b53d9b8ea7ebfcecec603408681eeffb9aaff6
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit c38e58dcb02cd2273ba3c03c65a6f67b37100777)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-15 12:14:54 +00:00
Eirik Aavitsland c36b24b087 Update bundled libpng to version 1.6.44
[ChangeLog][Third-Party Code] libpng was updated to version 1.6.44

Pick-to: 6.8.0 6.7 6.7.3 6.5 6.2 5.15
Change-Id: Ib208635687645101cd2d7fb4e5bf069088c24f86
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 685a6c2e3d8e3b970640d7e31945272a6803ae61)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-14 18:56:26 +00:00
Thiago Macieira 4f30a4426c QTypeRevision: fix support for 8-bit signed segments
The logic in the isValidSegment() function was failing for 8-bit signed
because for them Integer(SegmentUnknown) is -1, so
  (std::numeric_limits<Integer>::max)() < Integer(SegmentUnknown)
was always false (127 < -1) and the function would only return true on
the impossible condition of
  segment >= 0 && segment < -1

Fixes: QTBUG-128848
Pick-to: 6.7 6.5
Change-Id: I8d17b93afd6c2982a099fffdcaeccf126b7a9d02
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit ddfcc0734875cdee2c169bf2ecb1546bddba6e98)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-14 16:38:08 +00:00
Thiago Macieira 23cf29ffdd QFileSystemEngine/Win: only .lnk files that exist can be symlinks
Fortunately, isDirPath() had an extra parameter to tell us whether the
path existed in the first place, making the fix very simple.

Pick-to: 6.7 6.5
Fixes: QTBUG-128800
Change-Id: I81482f87b594933158d0fffdbea0ea2a00494b6c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 329b05739d5d62f37464a5714ad87e7ca05693e2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-14 16:37:55 +00:00
Thiago Macieira 16571ac456 QDir: change qt_{cleanPath,normalizePathSegments} to returning bool
Since qt_normalizePathSegments very often modifies the path, pass that
as pointer, and return a boolean with whether the path is attempting to
go up above the root.

Change-Id: I851fcb94db4606a6bd97fffd81910930dea8222a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 0314491abac092b20ebefc05e2e9f27fd038fc38)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-14 16:37:12 +00:00
Thiago Macieira 2ce3153b83 QUrl::resolved: switch to using qt_normalizePathSegments
Commit 4b1547adc9b195e6acc90471fc48dec7ee0c429d rewrote
mergePathSegments() but got one thing wrong: that ".." on a "//" should
only remove one slash, not all of them. That behavior was introduced by
commit eaf4438b35 to match what browsers
do.

QUrl will use the local file behavior if the URL scheme is "file",
unlike the browsers.

Task-number: QTBUG-120396
Pick-to: 6.8.0 6.7 6.5
Change-Id: I8a96935cf6c742259c9dfffd17e8fd3cfde46e25
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit e7bcf41c0b23d83cfb31f966454945c705589a99)
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-09-14 09:37:12 -07:00
Thiago Macieira 7359d63209 Replace qt_normalizePathSegments algorithm with QUrl's removeDotsFromPath
Commit 4b1547adc9b195e6acc90471fc48dec7ee0c429d rewrote the latter for
simplicity and performance, so copy it over with intent to merging the
two together. In this copy, however, we keep the behavior introduced by
commit eaf4438b35, which made the
normalization match the behavior found in browsers, but didn't apply to
QUrl::resolved (that's the next commit)

Task-number: QTBUG-120396
Pick-to: 6.8.0 6.7 6.5
Change-Id: I2670423f6c6a5339771ffffdf15ebad46fd25cb4
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 78e2d24752d8b6652aac89d1e79f245bc88281c6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-14 09:37:11 -07:00
Thiago Macieira 5eafba18e0 QUrl::resolved: remove the lambda in removeDotsFromPath()
I had made this change but didn't push it. Amends commit
09055d7211b1f8ba9fdec141a1e919faee1c1676

Pick-to: 6.8.0 6.7 6.5
Change-Id: I8a96935cf6c742259c9dfffd17e8fc87d41dd891
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 01fbb883ad8832808110e74a0c4b2724f1e38d6c)
2024-09-14 09:37:10 -07:00
Thiago Macieira 7b45dc49bb QUrl::resolved: avoid detaching from paths that don't have dot segments
This can happen in any number of cases where neither the base URI nor
the relative one had a "." or ".." segment. In particular, we want to
avoid detaching in the case where the new path is the same as either of
the base or relative URI's, which can happen when the other was empty
(and mergePaths() didn't have to prepend a slash).

Pick-to: 6.8.0 6.7 6.5
Change-Id: Iac1ff680887641888e00fffd17e14f3927e828ae
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 09055d7211b1f8ba9fdec141a1e919faee1c1676)
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-09-14 09:37:09 -07:00
Alexey Edelev 26d9fca58e Generalize PlatformGraphics
Add the unified PlatformGraphics module, which looks for either Integrity
or VxWorks platform graphics.

The PlatformGraphics module creates the interface
PlatformGraphics::PlatformGraphics target which links the respective
platform graphics target. It's expected that from the platform graphics
targets to deliver the consistent subset of definitions, libraries,
include directories, compiler and linker flags and also the special
<platform>_REQUIRED_<LIBRARIES|INCLUDES|DEFINITIONS> variables.

The <platform>_REQUIRED_<LIBRARIES|INCLUDES|DEFINITIONS> variables are
consumed by the PlatformGraphics::PlatformGraphics and stored in the
respective _qt_internal_platform_graphics_required_<type> property, to
access the value without scope limitations. The property then is
checked by the EGL and GLESv2 modules(this can be done elsewhere too)
and is appended to the CMAKE_REQUIRED_<type> variable before running
the respective compiler checks.

Task-number: QTBUG-128455
Change-Id: Id1987c6294327509a14fbeeb7b8bf39aad6f486c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Karim Pinter <karim.pinter@qt.io>
(cherry picked from commit 3322f585eb5ad11acc1f93ecaafb42e30e37b197)
2024-09-13 21:58:04 +02:00
David Faure c37256f6e4 QAbstractItemView: use QPMI in currentChanged in case of layoutChanged
If the model's setData() emits layoutChanged, it invalidates QModelIndexes
that this code is working with, so we have to use a persistent model
index for 'current' to protect against that. For 'previous', Volker
Hilsheimer had the idea of moving code around so we're done with it
before calling commitData().

Fixes: QTBUG-127852
Change-Id: Ieb6ebc9603e7a753d78aab11ce81ad87d71f5084
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit cbc5b4fbe12b6c4410bf482cd1caac933c8b63ea)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-13 17:44:07 +00:00
David Faure d53c3809de QConcatenateTablesProxyModel: react to row and column moves
Fixes: QTBUG-128742
Change-Id: I6282c3c9f27c435da5d511c61fbb051da127229c
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit b9ba28315d889d0b87ae048dffe33eac55efcda2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-13 17:44:05 +00:00
Michal Klocek 1ba89701fa Fix bogus QT_BEGIN_NAMESPACE for qandroidmodelindexproxy
This should be rather QT_END_NAMESPACE.
Fixes custom namespace build.

This amends 55fc15ce8272073b9b404762b83e3e7acee0111e.

Change-Id: I61d0ea24f8b0e3382fdfb4658b8a514dbaad8799
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit e94fefecfc47a6715d90ef8975f65d5702cc2477)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-13 17:44:04 +00:00