Commit Graph

68955 Commits (7f45fdefd64a09d5ecdfd424195ed652117cbcc9)

Author SHA1 Message Date
Liang Qi 21098bbb9c xcb: check validity of RandR output info before using it
Fixes: QTBUG-128906
Pick-to: 6.7 6.5 6.2 5.15
Change-Id: Ibafdf4bb9c449b29437b0520299ab407238e5703
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 439e19be17b9169f5786b2593e6d1ac6978bb84b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-20 08:25:52 +00:00
Tim Blechmann c5a27f4cfe QObject: disconnect - document behavior with queued connections
QObject::disconnect does not cancel pending events. This can cause hard
to find bugs in application code, so we explicitly document and unit
test this behavior.

Task-number: QTBUG-127675
Change-Id: I5e94d60c27b9ce2dd2bceb832eb817b7eaa9cdcd
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 0681e720a9851f1873ce5a5f99b5567d2b418261)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-20 01:30:56 +00:00
Liang Qi 59a3f43031 tests: blacklist tst_QWidget_window::setWindowState(maximized)
on u24.04 x11

Task-number: QTBUG-129026
Change-Id: I14bf0ff3f2704aa1f7fccfdd57164f935892ae46
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 90ed33091a62ddfd53fc2cd8c232089367aca80b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-20 00:43:17 +00:00
Liang Qi 802c798703 tests: update row names in tst_QWidget_window::setWindowState()
Task-number: QTBUG-129026
Change-Id: I18c02b0a099924bd64115a1721c1d4f26b91f110
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 0c1c91aee9c9f4aa2e67412ebec885f92f06a5dc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-20 00:43:10 +00:00
Liang Qi e68e6be13b tests: blacklist tst_QComboBox:popupPositionAfterStyleChange()
on u24.04 x11

Task-number: QTBUG-129029
Change-Id: I1a7330fc781e1ca925234bc0f0548968bee1b984
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 9f7c826d62c5ef788930a4ef0176226fd6eef53d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-20 00:43:04 +00:00
Liang Qi 8b3db397f2 tests: blacklist tst_QWindow::windowExposedAfterReparent() on u24.04 x11
Task-number: QTBUG-129023
Change-Id: I444194f0cb649a3f0c630f1f8114f89a8b408cdc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 24403f0ed5e9f029d84a2e73a98a447bda276b5b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-20 00:42:58 +00:00
David Faure 7f35844ed0 QTableView: fix moving rows by drag-n-drop
If we don't set dropEventMoved to true, then QAbstractItemView::startDrag
will delete the rows after the move (after QDrag::exec() returns).

Fixes: QTBUG-129128
Pick-to: 6.8.0
Change-Id: I85e7903a12b13c4b73e34fa1fcac56e50f421191
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit d2384783477e88190fb87287bb9af8ea9a46343e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 22:50:38 +00:00
Paul Wicking 2c6720578e Doc: Specify correct target_link_libraries item for QRhi
Use the new `\qtcmaketargetitem` QDoc command to specify the correct
`target_link_libraries` item for items that belong to the new module.

Fixes: QTBUG-121855
Fixes: QTBUG-125994
Change-Id: I76a6ab749fdb349cc014f40bc7e548a0344bc50d
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
(cherry picked from commit 9a9f5009006e03849242211d831a900e30c39fc8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2024-09-19 20:31:56 +00:00
Vladimir Belyavsky 75adbe6161 QWindowsFontDatabase: use categorized logging more
Use "qt.qpa.fonts" logging category for the rest warning messages in
QWindowsFontDatabase.

Task-number: QTBUG-129118
Change-Id: I4e84af29fb6385142285954b0f508b412823c679
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 450f79ea15e0fc3c977aea2a7c513d384b3746b4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 20:11:16 +00:00
Christian Ehrlicher 7291d927bc QStyleHelper: export uniqueName()
Export QStyleHelper::uniqueName() so it can be used by windowsvista/11
style.

Change-Id: I07c1a63ff27688cba2a3747166f5e93ff61d2cd3
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit cc3b419855f6d1e62de7013bc8687eb81b41555d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 20:11:16 +00:00
Michał Łoś 3bb2f0d33b Disable QLocalSocket on VxWorks
VxWorks doesn't support local sockets. Since VxWorks clients don't need
support for that, turn it off.

Task-number: QTBUG-115777
Change-Id: Ibd95d375bb89d32e1ff8b9c2488c6e05910b0b92
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit acb97f06c6615b3292db769ea59266f7dc378636)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 17:54:42 +00:00
Soheil Armin bbaeb6a357 Android: Add tests for QtAbstractListModel
Adds test data and conditions for QtAbstractListModel interface

Pick-to: 6.8.0
Task-number: QTBUG-125974
Change-Id: I168a5cfabfc191c7ee50aa917d0fd0f9fabc1703
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit ca102dcddfc549b1c0a4135b4d869491f6ead4f3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 17:54:39 +00:00
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
Tero Heikkinen 7413f60436 Add QEXPECT_FAIL for failing tst_qwdidget test on Windows ARM
tst_QWidget::render_windowOpacity
  - Fails constantly, therefore QEXPECT_FAIL better than blacklist

tst_QWidget::enterLeaveOnWindowShowHide(dialog)
  - Known flaky, but doesn't need blacklist as it passes when
    rerun is used, no need for actions.

Task-number: QTBUG-128371
Task-number: QTBUG-128372
Task-number: QTQAINFRA-6396
Change-Id: I806419996fedea22628eecf311e977c74066d748
Reviewed-by: Tero Heikkinen <tero.heikkinen@qt.io>
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
(cherry picked from commit 975b4c078036427d2bf7026f1ba50ad095d83172)
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
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
Tor Arne Vestbø 66a48481c3 tst_QGraphicsWidget::initStyleOption: Don't limit macOS blacklist to CI
The test is using QCursor::setPos(), which also fails locally, unless
the user explicitly gives the test permission to control the mouse.

Change-Id: I6c85c8fd194e178d5df92b7b4cf9c222f8b5a066
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 47b9251de1d722674fd08fe907dff09a0f8ae353)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 12:41:49 +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
Liang Qi 1a7f6925ab tests: use qWaitForWindowFocused() instead of qWaitForWindowActive()
This depends on 9eb06a2848 .

Done-with: Inho Lee <inho.lee@qt.io>
Task-number: QTBUG-107157
Pick-to: 6.7
Change-Id: I9f4521c27ebc847596a94eed0c9116d71905def2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit bc7821764b4d50fbb4e0ca1b84f85980ce15eeb0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 14:41:49 +02: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
Mate Barany 9709c4f842 Use replace instead of rename in localetools.py
On Unix, if target exists and it is a file, rename silently replaces it
if the user has permission. However, on Windows, if the target exists,
FileExistError will be raised.

With replace, if target points to an existing file or empty directory,
it will be unconditionally replaced.

Change-Id: I2774152fec78a00c4ca6c9d1b927e503df2f2e84
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit eff8e6b885dfa3f26523ca39164725b4932c31bd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-18 09:51:00 +00:00
Mate Barany d8e1416977 Add a note to README about encoding errors on windows
Using the default system encoding cldr2qlocalexml.py and
qlocalexml2cpp.py may terminate with encoding errors on Windows.

Warn the user to set the PYTHONUTF8 environment variable to 1 before
running those scripts to avoid encoding errors.

Change-Id: I315a45072cb6ea516d3e9bb7613c6f251792ec59
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit b3ef2fdd8b99c6920a382fbbc417209bf436c3f3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-18 09:50:58 +00:00
Mate Barany b0e2abfe9a Fix typo in cldr.py
The variable ianalist is not really used for anything, it was probably
meant to be ianaList.

Change-Id: Ie9f42bf9716da28ee0017319dda96389c415ef4f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 67ec126168b81adc2adc9fdb346c0a913c3c501d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-18 09:50:55 +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