summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* QAbstractItemView: Fix using declaration of update()Friedemann Kleint2025-10-231-1/+1
| | | | | | | | | | It is a QWidget method. PySide's shiboken6 code generator is a bit picky about the using declarations. Pick-to: 6.10 Fixes: PYSIDE-3219 Change-Id: Iafb2c2d8c0d66a38f6b48eef9a09f94f4fc25141 Reviewed-by: Richard Moe Gustavsen <[email protected]>
* Revert "Set QGuiApplicationPrivate::lastCursorPosition on Enter event"Shawn Rutledge2025-10-231-1/+0
| | | | | | | | | | | | | We probably still need to do this, but it seems to be somehow causing hover to be mishandled as press in some Qt Quick Controls autotests. This reverts commits 15a0a46d089477407a7ebfb46a952fb6f7548d3d and 24f40915a70ab7424806e842f8aeb3645fcd19e1. Task-number: QTBUG-141387 Task-number: QTBUG-141427 Change-Id: I1dc24a362cf1f93cc57ef4c8b6985abb000fa7ef Reviewed-by: Tor Arne Vestbø <[email protected]>
* macOS: Map function keys by their virtual key code, not MacRoman charsTor Arne Vestbø2025-10-231-85/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When mapping incoming key events to their possible key combinations for shortcut mapping we use UCKeyTranslate, or its modern Cocoa equivalent [NSEvent charactersByApplyingModifiers:] (which plumbs to UCKeyTranslate internally). When doing so for function keys, we get back characters codes such as 0x01 / ␁ / Start of Heading when pressing the Home key, or 0x04 / ␄ / End of Transmission when pressing the End key, which map to kHomeCharCode and kEndCharCode correspondingly in the MacRoman character codes table from HIToolBox's Events.h We used these MacRoman character code mappings to turn kHomeCharCode into Qt::Key_Home and kEndCharCode into Qt::Key_End. Surprisingly UCKeyTranslate/charactersByApplyingModifiers does not return the equivalent function key character codes from the NSEvent.h header, such as NSEndFunctionKey, even if the original NSEvent we're processing has this as the NSEvent.characters or NSEvent.charactersIgnoringModifiers, as reported here: https://developer.apple.com/forums/thread/803439 This is a problem because key events with the Control (^) key also (naturally) map to these character codes when fed through UCKeyTranslate, which resulted in matching shortcuts for Qt::Key_Home and Qt::Key_End if the user pressed Control+A or Control+D. Or even worse, if users had shortcuts registered for Ctrl+A and Home, or Ctrl+D and End, at the same time, these shortcuts would be considered ambiguous. To fix this we now map function keys via the keyboard layout independent virtual key codes from the same HIToolBox Events.h header, which ensures we only map real function keys during to Qt::Keys such as Qt::Key_End. Note that we still consider the keyboard-layout-mapped character codes for functions keys coming from NSEvent.h, in case there are layouts that explicitly map to these. Fixes: QTBUG-134441 Pick-to: 6.10 6.8 Change-Id: Iac8def7540247665562b438bf4af06b4347d33b0 Reviewed-by: Doris Verria <[email protected]>
* Testlib: batched tests - allow the registration of stateful functionsTim Blechmann2025-10-232-2/+2
| | | | | | | | | `qRegisterTestCase` only took a function pointer as argument. We change the signature to take a std::function object of the same signature. This will allow us to bind arguments to a callable object. Change-Id: I8c082ec5d11becbeae83344fadb10f4e6391a2d1 Reviewed-by: Tor Arne Vestbø <[email protected]>
* Windows11: Don't force highlightedText to be windowText in high contrastOliver Eftevaag2025-10-231-3/+0
| | | | | | | | | | | | | The style would overwrite the highlightedText color to be equal to the windowText for the active group. This would negatively impact styles in Qt Quick, whenever a QApplication was being used. The highlightedText color would not be correct. Task-number: QTBUG-140507 Pick-to: 6.10 Change-Id: I282971a4556d0b10d9e32af3514aa6f51800e35e Reviewed-by: Richard Moe Gustavsen <[email protected]> Reviewed-by: Wladimir Leuschner <[email protected]>
* Fix nullptr deref in QMenu::mouseReleaseEvent()Axel Spoerl2025-10-221-1/+1
| | | | | | | | | | 879eb2c08094a70683488d56520efd3a4cf1b086 introduced a nulltr deref. Amend the patch to fix it. Coverity-Id: 896788 Pick-to: 6.10 Change-Id: Ic05db9f5bfb67ece01a0e030400697d97712646e Reviewed-by: Marc Mutz <[email protected]>
* wasm: Set input field size to 1x1Even Oscar Andersen2025-10-221-2/+2
| | | | | | | | | | It seems, for 6.10.x, the size of the input field affects the user interface. Set to 1x1 to minimize the effect. Fixes: QTBUG-141054 Pick-to: 6.10 Change-Id: Id9cc0a84d7cf2f700c4df2155210569b1372e19f Reviewed-by: Morten Johan Sørvig <[email protected]>
* Update and expand Apple icon engine mappingsTor Arne Vestbø2025-10-221-93/+95
| | | | | | | | | Fixes: QTBUG-139964 Pick-to: 6.10 6.8 Done-with: Geoff Hutchison <[email protected]> Change-Id: I842e4be557de667fd3c1c244f4ff1caf2af482f2 Reviewed-by: Karolina Sofia Bang <[email protected]> Reviewed-by: Doris Verria <[email protected]>
* iOS: Guard QIOSDocumentPickerController outliving QIOSFileDialogTor Arne Vestbø2025-10-221-1/+12
| | | | | | | | | | | The document picker may outlive the QIOSFileDialog even if we've released it, if the system has retained it, and we might get delayed callbacks to e.g. documentPicker:didPickDocumentsAtURLs, in which case we'd crash. Pick-to: 6.10 6.8 6.5 Change-Id: Idc9f2f6d297332b91d25dc768d1defaf5bde8076 Reviewed-by: Doris Verria <[email protected]>
* macOS: Only set nameFieldStringValue for NSSavePanelTor Arne Vestbø2025-10-221-1/+2
| | | | | | | | | | | Even though NSOpenPanel is a subclass of NSSavePanel, it emits a warning when the property is set: Ignoring NSSavePanel method sent to NSOpenPanel: setNameFieldStringValue: Pick-to: 6.10 Change-Id: I9886f861797bab92a89cdaa361c0e6d8802053ee Reviewed-by: Doris Verria <[email protected]>
* Disable {position,resize}Automatic on first exposeTor Arne Vestbø2025-10-222-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Disabling automatic positioning/resize after platform window creation assumed that the platform window could synchronously determine the automatic position/size, either via QPlatformWindow::initialGeometry(), or via platform APIs. But for platforms like XCB, the automatic position is determined by the window manager when the window is first mapped. With the existing logic, we would end up overriding the position when QWidget would set size hints or resize the platform window during setVisible. We now defer the reset of {position,resize}Automatic until the expose event. Ideally we should do it only when the window is first shown, but we don't have a QWSI for tracking window visible-state. Amends 59d77a0162d92a9993b7bb4c593e88cbb8f8d9c8. Fixes: QTBUG-141099 Pick-to: 6.10 Change-Id: I53a0205c7fbddf922b030b3f4bd9b6ce5c4915b9 Reviewed-by: Liang Qi <[email protected]>
* macdeployqt: fix variable typo & scopeMoss Heim2025-10-222-5/+4
| | | | | | | | | | | Identiy->Identity Variable is not used in shared.cpp so can be made local in macdeployqt main. Pick-to: 6.10 Change-Id: I8893ea0570f41691972116ab0733580176a7b2ba Reviewed-by: Tor Arne Vestbø <[email protected]>
* Doc: Remove references to Qt 4 booksAlexei Cazacov2025-10-221-274/+3
| | | | | | | Fixes: QTBUG-140879 Pick-to: 6.10 Change-Id: Ia51db21a6922393affbd11f1749f64f49c0f8702 Reviewed-by: Jerome Pasion <[email protected]>
* QPainterPath: Avoid division by zero in *AtPercentRobert Löhning2025-10-221-0/+11
| | | | | | | | | Without the added checks, the code divided by the paths' lengths which are zero. Pick-to: 6.10 6.8 Change-Id: I78a2066af96136635f85f4937619ff398a28072c Reviewed-by: Eirik Aavitsland <[email protected]>
* QStyleSheetStyle: don't draw SC_SliderGroove when not asked forChristian Ehrlicher2025-10-221-18/+17
| | | | | | | | | | The rules for QSlider: add/sub-page where drawn even though SC_SliderGroove was not given. Pick-to: 6.10 Fixes: QTBUG-141157 Change-Id: Ibdb22e18588c54f0f59be37fd6a430e74e0df762 Reviewed-by: Axel Spoerl <[email protected]>
* Windows11Style: fix drawing disabled, checked QRadioButtonChristian Ehrlicher2025-10-221-3/+1
| | | | | | | | | | | A disabled, checked QRadioButton is not drawn as checked. This was introduced with a39047eeb6202a3c081d2441be9dc4f3d017fb97 Pick-to: 6.10 Task-number: QTBUG-139605 Fixes: QTBUG-140449 Change-Id: I2c34637b0ef51d619a81a78862021a76ae5b20a0 Reviewed-by: Axel Spoerl <[email protected]>
* QNativeSocketEngine/Unix: detect sockaddr_dl with AF_LINKThiago Macieira2025-10-211-3/+3
| | | | | | | | | | | | Instead of by proxy trying to guess that BSD systems have it and others don't. That's an incorrect assumption because QNX has this and IP_RECVIF, but isn't marked a Q_OS_BSD4. FreeBSD says sockaddr_dl should have .sdl_family = AF_LINK: http://fxr.watson.org/fxr/source/net/if_dl.h Change-Id: Ibe2777515c0f71285783fffd5c0094f622de34a9 Reviewed-by: Mårten Nordheim <[email protected]>
* QNativeSocketEngine/Unix: implement IP_RECVIF in setOption()Thiago Macieira2025-10-211-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This amends and complements abe269bb72233b360bccbc8f54d3f13e8dc10b5a, which added QNativeSocketEngine::ReceivePacketInformation and actually did implement the heretofore-dead code to handle the IP_RECVIF ancilary data in nativeReceiveDatagram(), but we never asked the OS for the information via setsockopt(). Similar to what e9778dfe6ead0c4d704570816a56aead084a0263 did for Windows. Tested on FreeBSD. dtruss says: socket(PF_INET,SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK,0) = 7 (0x7) setsockopt(7,SOL_SOCKET,SO_BROADCAST,0xb1cf40aece4,4) = 0 (0x0) setsockopt(7,IPPROTO_IP,IP_RECVDSTADDR,0xb1cf40aece4,4) = 0 (0x0) setsockopt(7,IPPROTO_IP,IP_RECVIF,0xb1cf40aece4,4) = 0 (0x0) setsockopt(7,IPPROTO_IP,IP_RECVTTL,0xb1cf40aece4,4) = 0 (0x0) bind(7,{ AF_INET 127.0.0.1:0 },16) = 0 (0x0) ... ppoll({ 7/POLLIN },1,{ 8.999999439 },0x0) = 1 (0x1) recvfrom(7,"@",1,MSG_PEEK,NULL,0x0) = 1 (0x1) recvmsg(7,{{ AF_INET 127.0.0.1:55621 },16,[{"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"...,1200}],1, { {level=IPPROTO_IP,type=IP_RECVDSTADDR,data={0x7f,0x00,0x00,0x01}}, {level=IPPROTO_IP,type=IP_RECVTTL,data={0x40}}, {level=IPPROTO_IP,type=IP_RECVIF,data={0x38,0x12,0x02,0x00,0x18,0x03,0x00,0x00,0x6c,0x6f,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}} },120,0},0) = 600 (0x258) lldb decodes the sockaddr_dl as: (lldb) p *sdl (sockaddr_dl) { sdl_len = '8' sdl_family = '\x12' sdl_index = 2 sdl_type = '\x18' sdl_nlen = '\x03' sdl_alen = '\0' sdl_slen = '\0' sdl_data = "lo0" } And interface index 2 is lo0: lo0: flags=1008049<UP,LOOPBACK,RUNNING,MULTICAST,LOWER_UP> metric 0 mtu 16384 options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6> inet 127.0.0.1 netmask 0xff000000 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 groups: lo nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL> Change-Id: I37b88bfce40421117d99fffd1110eced5d102430 Reviewed-by: Mårten Nordheim <[email protected]>
* QMdiSubWindow: Respect null icon setting on MacEirik Aavitsland2025-10-221-1/+4
| | | | | | | | | | | | On Mac, a QMdiSubWindow title bar by default shows no icon. However, if an icon is then set on it, there would be no way to return to the initial no-icon-shown state. Setting a null icon would only result in the default window icon to be shown instead. This commit fixes that. Fixes: QTBUG-139345 Pick-to: 6.10 6.8 Change-Id: I456a2cbdc4b81312a2959bc0f84a1dd545908b1f Reviewed-by: Tor Arne Vestbø <[email protected]>
* Revert "QArrayDataOps::assign: improve for forward iterators (typical case)"Fabian Kosmale2025-10-212-48/+18
| | | | | | | | | This reverts commit 37b37cddb67febd595cb06b54ac08f1e676ead4d. Reason for revert: This caused QTBUG-141366 Change-Id: I1f878386e969f986bbd9c289b0b9a1fe8e9daaf7 Reviewed-by: Jani Heikkinen <[email protected]>
* CMake: Refactor AUTOGEN and metatypes path functionsAlexandru Croitor2025-10-211-13/+32
| | | | | | | | | | | | | | | | | Extract code into two new functions: - _qt_internal_get_metatypes_build_dir - _qt_internal_get_target_autogen_info_dir Add some comments on what values they return. These will be adjusted in further changes, to help with CMake's shorter build paths feature. Pick-to: 6.8 6.10 Task-number: QTBUG-110696 Task-number: QTBUG-117413 Change-Id: I96251e9130b9e1e556dbd7ba1e7fe2362fcb623c Reviewed-by: Joerg Bornemann <[email protected]>
* CMake: Set CMAKE_POLICY_VERSION_MINIMUM with older Android NDKsAlexandru Croitor2025-10-211-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using CMake 3.31+ with Android NDKs older than r28, CMake shows the following deprecation warning: CMake Deprecation Warning at ndk/27.2.12479018/build/cmake/android.toolchain.cmake:35 (cmake_minimum_required): Compatibility with CMake < 3.10 will be removed from a future version of CMake. This warning appears multiple times, when configuring Qt, user projects, try_compile calls, etc. That's because the Android NDK cmake toolchain file sets cmake_minimum_required(VERSION 3.6) unconditionally, which is less than 3.10. To avoid the warnings, we can set the CMAKE_POLICY_VERSION_MINIMUM variable or environment variable to 3.10. The variable can only be set in CMake 4.0+ though, so it won't help with CMake 3.31. The assignment has to be done in multiple places: - When detecting Android in QtAutoDetectHelpers.cmake - When generating the Qt toolchain file in QtToolchainHelpers.cmake - When doing try_compile calls in QtFeature.cmake - When doing test calls in QtRunCMakeTestWrappers.cmake To be on the safer side, the following opt-outs are provided: - QT_NO_SET_ANDROID_CMAKE_POLICY_VERSION_MINIMUM If set to true, the automatic setting of CMAKE_POLICY_VERSION_MINIMUM is disabled. - QT_ANDROID_CMAKE_POLICY_VERSION_MINIMUM A version to use instead of 3.10. - QT_NO_SET_RUN_CMAKE_TESTS_CMAKE_POLICY_VERSION_MINIMUM Disables the assignment for RunCMake tests. These are considered at various points in the code, rather than just once when configuring Qt. When using NDK r28 or newer, the toolchain file sets 3.10 itself, so no warning appears. Pick-to: 6.8 6.10 Change-Id: I47c6013f9cafed8836c32d2b726e75838c9d8779 Reviewed-by: Joerg Bornemann <[email protected]> Reviewed-by: Assam Boudjelthia <[email protected]>
* Set QGuiApplicationPrivate::lastCursorPosition on Enter eventShawn Rutledge2025-10-211-0/+1
| | | | | | | | | | | | | As soon as a window is shown, if it happens to be under the mouse cursor, lastCursorPosition should be set correctly. The fact that this was not done was masked in Qt Quick by the separate tracking of current mouse position in QQuickDeliveryAgent. We need the tracking to be reliable in QtGui so that Qt Quick does not need to do that. Pick-to: 6.10 Task-number: QTBUG-136976 Change-Id: Ida397beeb335bc054fd8a005c7dc65f2b7e48ffa Reviewed-by: Tor Arne Vestbø <[email protected]>
* wasm: a11y - Handle case where a child does not have a childIndexEven Oscar Andersen2025-10-211-13/+14
| | | | | | | | Some interfaces will return -1 for childIndex. Work around this by adding an explicit test. Change-Id: I703f20f8d57ed4cb7e69efd87e03c68eb30aec90 Reviewed-by: Morten Johan Sørvig <[email protected]>
* macOS: Add note about effect of [NSInputContext handleEvent:]Tor Arne Vestbø2025-10-211-0/+3
| | | | | Change-Id: Idf825418f522ce576c8530327c79c080a2925401 Reviewed-by: Richard Moe Gustavsen <[email protected]>
* Widgets: QMenu - do not start sloppy menu timer from QMenu APITim Blechmann2025-10-212-3/+5
| | | | | | | | | | When QMenu::setCurrentAction starts a timer for closing the menu again. This causes unexpected behaviour when calling QMenu::setCurrentAction, as it may unset the current action when this timer fires. Fixes: QTBUG-138956 Change-Id: Ia4d80455a04453d2e6b173a9d7e7c5df39e696ce Reviewed-by: Richard Moe Gustavsen <[email protected]>
* QSemaphore: stub out tryAcquire() for no-threadMorten Sørvig2025-10-211-1/+19
| | | | | | | | | Ammends 7075ac5bf6bf51a7538bf5c6592e2ff97f5c7cbe. Pick-to: 6.10 Fixes: QTBUG-141130 Change-Id: I699bb61832cded1b2f05d0138478e3d8c703f8f2 Reviewed-by: Thiago Macieira <[email protected]>
* QAbstractItemView: Make the keyboard search configurableChristian Kandeler2025-10-214-2/+34
| | | | | | | | | | | | Introduce a new property keyboardSearchFlags, so that keyboard search is no longer limited to prefix matching. [ChangeLog][QtWidgets][QAbstractItemView] The new property keyboardSearchFlags was introduced, allowing client code to do something other than a prefix search. Change-Id: Ic2408e51b15de0275c80936de66a07058ddf7132 Reviewed-by: Richard Moe Gustavsen <[email protected]>
* QChar: fix Clang 21 -Wcharacter-conversion warningsMarc Mutz2025-10-211-31/+31
| | | | | | | | | | | | | | | | | | | | | | | | Clang 21 started warning about all conversions between charNN_t types (since fixed for char16_t → char32_t¹), and QChar appears to be the only header in QtBase that is affected by it. While char16_t → char32_t has already been fixed upstream, we ought to have our public headers clean of even this overzealous warning, so fix them by adding an explicit cast. I would have used 'char32_t{ucs}', but the warning is so buggy it's not fixed by braced initialization (filed as upstream bug report https://github.com/llvm/llvm-project/issues/164220). Interestingly, the warning does not trigger, for the same code, in constexpr function, but proactively "fix" those, too, so we don't need to re-touch these functions later. As a drive-by, remove the pointless inline keywords from these functions to make horizontal space for the cast. Done-with: Thiago Macieira <[email protected]> Task-number: QTBUG-141204 Pick-to: 6.10 6.8 6.5 Change-Id: I2a9e46ea4f327fb554418c4649d189a98e15ffae Reviewed-by: Edward Welbourne <[email protected]>
* Mark QTZP::NamePrefixMatch's operator bool() as constEdward Welbourne2025-10-211-1/+1
| | | | | | | | When I added it I forgot to specify that it doesn't change *this. Amends commit d13e9a1ae53ee53c4929bc88d578a02eec4b2dc4 Change-Id: Ie94ff05fc19f696688dd8ccbfa9a352086d0cc94 Reviewed-by: Mate Barany <[email protected]>
* QRAAFP: get rid of the QObjectPrivateVersion parameter in c-torIvan Solovev2025-10-212-3/+3
| | | | | | | | | | | The parameter is not really relevant for classes inside QtCore, as it's mostly used to bind a library to a certain version of QtCore if it relies on specific private APIs. Amends 65b7217ae71ad8b0448a0ba60e7e33350e84d97c. Change-Id: I167221eb1746cf36adde3da1fd11b4062cb77a0a Reviewed-by: Mårten Nordheim <[email protected]>
* wasm: a11y - Implement fast lookup in eventhandlerEven Oscar Andersen2025-10-212-25/+30
| | | | | | | | | | Store the interface with the element when registering the handler, extract it in the eventhandler. Limitations, only one interface for each element. Change-Id: I68b0cf63cf4fa4dfa2f851ae40a6c1f9e6f868e7 Reviewed-by: Morten Johan Sørvig <[email protected]>
* Testlib: simplify invocation of initMainTim Blechmann2025-10-211-19/+7
| | | | | | | | | | `std::void_t` is the more idiomatic way to test for the presence of a member of a template class. We can also use `if constexpr` instead of SFINAE, making the code much simpler to read Change-Id: I4c15f1efb4bb8ffdf64fe212a3b5e98b2d98b9fe Reviewed-by: Edward Welbourne <[email protected]> Reviewed-by: Tor Arne Vestbø <[email protected]>
* Q{Explicitly,}SharedDataPointer: share most codeThiago Macieira2025-10-203-134/+195
| | | | | | | | | | | | | The majority of the code for the two classes is identical, so we can share code. QExplicitlySharedDataPointerV2's is different... and wrong? We need explicit constructors, assignment operators, and destructors to prevent early instantiation of the base class's equivalents, which break compilation of classes using the QT_DECLARE_Q(E)SDP_SPECIALIZATION_DTOR macros. Change-Id: I9e3cde075b537c61e8fcfffdb7a1a2d74b399967 Reviewed-by: Mårten Nordheim <[email protected]>
* Suppress Clang 21 -Wcharacter-conversionMarc Mutz2025-10-211-0/+4
| | | | | | | | | | | | | | | | | | The new Clang 21 warning is wreaking havoc in C++ projects that want to use modern C++, because it not only warns about char8_t → char16_t, but also about the completely harmless char16_t → char32_t conversions. It has since been fixed, but suppress the warning globally until we know which version has the fix (looks to be 21.1.4 at this point). Upstream bug report: https://github.com/llvm/llvm-project/issues/163719 More discussion in: https://github.com/llvm/llvm-project/issues/138526 Upstream fix: https://github.com/llvm/llvm-project/pull/163927 Pick-to: 6.10 6.8 6.5 Change-Id: I6409f6f6833131e3a77d81ab679125b2806e86a2 Reviewed-by: Edward Welbourne <[email protected]> Reviewed-by: Ahmad Samir <[email protected]>
* qalloc.h: add missing <cstdlib> includeMarc Mutz2025-10-211-0/+1
| | | | | | | | | | | | | | A Clang 21 headerscheck complained that malloc() and realloc() were undefined without it, and, indeed, these functions are defined in stdlib.h. Amends 03d5daf9437d8b46db2e89e3a9763ea701fa681c. Pick-to: 6.10 Change-Id: Ibe603769c3f25106c8f97215fccead255ce687c7 Reviewed-by: Aurélien Brooke <[email protected]> Reviewed-by: Ahmad Samir <[email protected]> Reviewed-by: Ivan Solovev <[email protected]>
* Long live Q_PRESUMETim Blechmann2025-10-204-9/+22
| | | | | | | | | | | | | | | | | Q_PRESUME wraps a Q_ASSERT/[[assume]] and can be used as a stop-gap until [[assume]] can be used unconditionally. It has stricter semantics than the deprecated Q_ASSUME and is helpful to silence static analyzer warnings. Documentation and [ChangeLog] in the next commit so it won't be cherry-picked. Fixes: QTBUG-141074 Pick-to: 6.10 Change-Id: Id5376bcc5e9e9708c836ceff5eea982c2b0e382e Reviewed-by: Giuseppe D'Angelo <[email protected]> Reviewed-by: Tim Blechmann <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]>
* Fix alpha value after to-FP16 conversions on AVX2Allan Sandfeld Jensen2025-10-201-1/+1
| | | | | | | Pick-to: 6.10 6.8 Fixes: QTBUG-141255 Change-Id: I2c11709b3168386a8568b109cad4028dfefb979e Reviewed-by: Eirik Aavitsland <[email protected]>
* a11y Android: Use RANGE_TYPE_PERCENT for RangeInfo of ProgressBarJulian Greilich2025-10-201-2/+11
| | | | | | | | | This way the current value is announced as "xy percent". Task-number: QTBUG-139712 Pick-to: 6.10 6.8 Change-Id: I796e942a799c78f4fc144e77bf9d18b9c1cb0ea3 Reviewed-by: Assam Boudjelthia <[email protected]>
* QLockFile/win: Open the file with FILE_SHARE_DELETEMårten Nordheim2025-10-201-4/+24
| | | | | | | | | So we may be able to switch to using SetFileInformationByHandle to perform the deletion without closing the HANDLE first some time in the future. Task-number: QTBUG-140486 Change-Id: I8098d7f54e00e20065310e29436eb8e29bea60ae Reviewed-by: Thiago Macieira <[email protected]>
* QLockFile: refactor local helper into static member functionsMårten Nordheim2025-10-204-18/+34
| | | | | | | | | | | | | To prepare for the Windows backend doing extra work. We want to open the file with FILE_SHARE_DELETE so that we can eventually create the file with the DELETE permission, enabling us to delete it without closing the handle first. Since we can't do that through QFile directly we need to open the file descriptor first and then pass that to QFile. Change-Id: I0baf0ee3089b489f3bd1e0259cc06195e9256647 Reviewed-by: Thiago Macieira <[email protected]>
* TestLib: macOS - unconditionally disable display sleepTim Blechmann2025-10-201-5/+3
| | | | | | | | | | | | | The tests only disabled display powersave for displays when a QApplication was running. It did not prevent display powersave for QGuiApplication, nor did it prevent any system sleep if the qApp singleton was created as part of the unit test of for app-less tests. To be on the safe side, we should prevent the display (and system) from going to sleep while any test is running. Change-Id: Icd8ddfda8c9fb8d551548def27ff65776bc82486 Reviewed-by: Tor Arne Vestbø <[email protected]>
* Testlib: disable App Nap for whole execution of the testTim Blechmann2025-10-201-1/+4
| | | | | | | | | | | The intention was to disable App Nap for the whole test. However it was a RAII class which was destroyed at the end of QTest::qInit. This patch moves the AppNap disabler into a global variable, which is cleared in qCleanup. Pick-to: 6.8 6.10 Change-Id: I5c267b2b66626b230851e61e79655ef3a30d4481 Reviewed-by: Tor Arne Vestbø <[email protected]>
* QMetaObjectBuilder: Fix detecting enum properties from QMetaTypeFriedemann Kleint2025-10-201-1/+1
| | | | | | | | | Fix condition wrongly inverted by dd95d5126ce9e022dfd25f0f44ee0f2a9e50f45e. Fixes: PYSIDE-3217 Pick-to: 6.10 Change-Id: I3c30541617a90ac32020aaddfca79024ba1ba351 Reviewed-by: Fabian Kosmale <[email protected]>
* QCryptographicHash: hashInto(): write directly into the given bufferAhmad Samir2025-10-201-13/+25
| | | | | | | Pick-to: 6.10 Fixes: QTBUG-125521 Change-Id: I1cdf2fe38799f36e04903ae5f8a5b4e2050bad50 Reviewed-by: Thiago Macieira <[email protected]>
* qnumeric.h: fix build with FreeBSDThiago Macieira2025-10-191-0/+2
| | | | | | | | | | | | | | | | Their stdckdint.h is broken for C++ and Clang's implementation just falls back to it. global/qnumeric.h:280:12: error: use of undeclared identifier '_Bool' 280 | return ckd_add(r, v1, v2); | ^ /usr/include/stdckdint.h:16:3: note: expanded from macro 'ckd_add' 16 | (_Bool)__builtin_add_overflow((a), (b), (result)) | ^ Pick-to: 6.10 Change-Id: Ide6f468820478f46d21ffffdb825c8c1977a99f2 Reviewed-by: Ahmad Samir <[email protected]>
* Doc: Fix broken link to the Sinclair ZX SpectrumJoerg Bornemann2025-10-201-1/+1
| | | | | | | | | The page that describes the Sinclair ZX Spectrum has moved. Update the link. Pick-to: 6.10 Change-Id: I12d3f0f8aa38e2b426ee322a55518e2f742b8423 Reviewed-by: Paul Wicking <[email protected]>
* QChar: avoid char{32→16}_t narrowing in canonicalOrderHelper()Marc Mutz2025-10-191-6/+14
| | | | | | | | | | | | | | | | | Same pattern as in the previous few patches: the old code used a char32_t to temporarily store a UTF-16 code point, narrowing it back to char16_t in a call to QChar::surrogateToUcs4(), triggering Clang 21 -Wcharacter-conversion. Solution is also the same: keep the UTF-16 code unit in a separate variable, until we have determined whether it needs surrogate decoding or merely promotion to char32_t. Amends the start of the public history. Pick-to: 6.10 6.8 6.5 Change-Id: I955948348d637c4fe13485808bef47a4ee58f7bf Reviewed-by: Ahmad Samir <[email protected]>
* QChar: scope variables tigher in canonicalOrderHelper()Marc Mutz2025-10-191-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code defined four variables outside a complex loop (with a nested goto). These can all be defined at their point of initialization, though, improving readability of the function (a tiny bit...), because the tighter scope makes it obvious that the loop isn't carrying state in these variables from one iteration to the next. The construction is safe, because, in C++, a backwards goto will destroy all variables declared after the label¹, iow: u2 and c2 are re-created by each jump though `advance`. Found while trying to fix char32_t → char16_t narrowing highlighted by Clang 21's -Wcharacter-conversion. Fix function has many other problems (most prominently, said goto), but they're out of scope of this immediate patch series, though they should eventually be fixed. This is security-critical code; we ought not have to deal with assembler-esque C++ code in such components. Amends f4d02ecdbf54987a0bada20fe8f8537e90c051d8. As a drive-by, change the c variables from char16_t back to ushort, because they don't represent characters, but character combining classes, partially reverting 7b04e0012b40203970f27869db2ab3e838ffe359. ¹ https://en.cppreference.com/w/cpp/language/goto.html#Explanation Pick-to: 6.10 6.8 6.5 Change-Id: If06356483bc77a16812d2790bd98f793bc74faa2 Reviewed-by: Thiago Macieira <[email protected]> Reviewed-by: Ahmad Samir <[email protected]>
* QChar: avoid char{32→16}_t narrowing in normalizationQuickCheckHelper()Marc Mutz2025-10-191-3/+6
| | | | | | | | | | | | | | | | | Same pattern as in the previous few patches: the old code used a char32_t to temporarily store a UTF-16 code point, narrowing it back to char16_t in a call to QChar::surrogateToUcs4(), triggering Clang 21 -Wcharacter-conversion. Solution is also the same: keep the UTF-16 code unit in a separate variable, until we have determined whether it needs surrogate decoding or merely promotion to char32_t. Amends 2e0a4b13addf1f56112bac38448be96fb02f650d. Pick-to: 6.10 6.8 6.5 Change-Id: I291871c73b26a1766c30f0c1c6858e09d9693678 Reviewed-by: Ahmad Samir <[email protected]>