summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
Commit message (Collapse)AuthorAgeFilesLines
* iOS: Add support for QFileOpenEvent for external requests to open filesTor Arne Vestbø34 hours1-9/+13
| | | | | | | | | [ChangeLog][iOS] QFileOpenEvent is now sent if the user requests that a supported file type is to be opened in the application. This requires that the application declares supported file types via CFBundleDocumentTypes. Change-Id: Ic3476ad703b51131a0973e3d6135e9aa05c2091f Reviewed-by: Volker Hilsheimer <[email protected]>
* Add OffscreenSurface capability to QPlatfromIntegrationArtem Dyomin9 days2-1/+4
| | | | | | | | | | | | | | | | | | The capability reflects whether the function QPlatfromIntegration::createPlatfromOffscreenSurface is available. See QOffscreenSurface::create for details how offscreen surface is handled. If no offscreen surface is created, it falls back to an invisible window, using of which in non-ui thread causes failures. In QtMultimedia, we want to know in advance whether offscreen surface can be created in non-ui thread, so we add the capability in the patch. Pick-to: 6.8 6.10 Task-number: QTBUG-131107 Change-Id: I15e6b1b66aaac18020abca661415aea5c8779192 Reviewed-by: Artem Dyomin <[email protected]>
* QDebug output: give timestamps of QEvents if verbosity increasedShawn Rutledge10 days1-1/+4
| | | | | | | | | | | | | | Event-handling behavior in Qt Quick nowadays relies more on the original event timestamp rather than time measured by other means in Qt. Seeing the actual timestamp is often necessary to troubleshoot autotests. Debug output for QEventPoints already has them, but it can be useful to see the event timestamps too. QDebug::setVerbosity(QDebug::DefaultVerbosity + 1) or greater is necessary to enable this, to reduce clutter somewhat. Change-Id: I26b627fbf6ec74101afa9807564eee6b78f254fb Reviewed-by: Tor Arne Vestbø <[email protected]>
* Don't look for XDG portal support on non-Linux operating systemsTor Arne Vestbø2025-11-071-0/+4
| | | | | | Pick-to: 6.10 Change-Id: Ia181398651ad5b36286ff6c151eebe15d28bbc5f Reviewed-by: Axel Spoerl <[email protected]>
* Doc: Add missing property docsPaul Wicking2025-11-063-0/+103
| | | | | | Task-number: QTBUG-140629 Change-Id: I8e032655d6a211c042d86baa8bab27cc0b34cb9f Reviewed-by: David Boddie <[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]>
* 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]>
* 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]>
* Teach QKeySequence::toString(Native) about C0 Control PicturesTor Arne Vestbø2025-10-151-1/+4
| | | | | | | | | | | | | | | | | | | | | The Unicode C0 control codes correspond to the 32 control characters in ASCII from 0x00 and 0x1f. Since these are unprintable in their basic form, it makes sense to represent them as something printable via toString(). The Unicode Control Pictures block provides exactly that. We skip 0x0 (Null) as we don't distinguish between a missing key and the null character in Qt. Although there are also Control Pictures for space (0x20), del (0x7f), and others, we ignore these as they are not in C0. [ChangeLog][QtCore] QKeySequence::toString() now maps the C0 control characters to their equivialent in the Unicode Control Pictures block, if using QKeySequence::SequenceFormat::NativeText. Change-Id: I4525d08478ebeb2a321b035c96029a22fa5ed749 Reviewed-by: Edward Welbourne <[email protected]>
* widgets: Pass popup semantic information to WaylandDavid Edmundson2025-10-141-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Wayland applications do not know their own window positions, this means that popups cannot stay on screen by themselves. When a window tries to go offscreen the way the window is adjusted is context-specific: - The first menu will be kept on screen by moving the x position until it all fits. - A submenu is too close to the screen edge, the menu will open on the opposite side of the parent menu to avoid obscuring it. - A combo box drop downs will vertically flip to the other side of the originating combobox. The Wayland API requires the application to provide semantic hints about the area in which the popup should be placed, along with hints about in which direction we should try to place the popup and how to handle being constrained. At a QPA level we don't know the location of individual widgets so this needs forwarding explicitly. Rather than exposing all possible positioning information, it is inferred from the window type at a QPA level, this required extending windowType to have more explicit values. Ideally this needs to be application-facing API as there are third-party comboboxes, but for now it is private with Qt's default controls opting into it. Task-number: QTBUG-99618 Task-number: QTBUG-124810 Fixes: QTBUG-135883 Change-Id: I49a2f18d1bfe1b755f259627722e076d58c13e8f Reviewed-by: David Redondo <[email protected]>
* wayland: Bump version of QWaylandApplication native interfaceDavid Edmundson2025-10-111-1/+1
| | | | | | | | It was missed when a new virtual was added. Amends b5147dca11ea67f72c8292d95f7de7f6853b11fc Change-Id: I38a94f537b4becc9d92485af099ace5a29c5762b Reviewed-by: Tor Arne Vestbø <[email protected]>
* Add QNativeInterface::QCocoaScreenAlbert Astals Cid2025-10-112-0/+16
| | | | | | Change-Id: Ic6d8578a97d3df52a6e42f5065b845f3f2db7c85 Reviewed-by: David Redondo <[email protected]> Reviewed-by: Tor Arne Vestbø <[email protected]>
* Doc: Add missing property declarationsDavid Boddie2025-10-101-0/+20
| | | | | | Task-number: QTBUG-139560 Change-Id: Id71b79cc88e5db5e3996e29332f91b388e7d7e4f Reviewed-by: Topi Reiniö <[email protected]>
* (QtGui) doc: Add alt text for \image tagsEren Bursali2025-09-291-2/+4
| | | | | | | | | Adding alt texts that were needed for QDoc Fixes: QTBUG-135119 Pick-to: 6.10 Change-Id: Id330b1933f56ff845fa02d91680cec27855e56e3 Reviewed-by: Kai Köhne <[email protected]>
* Remove Qt::WindowType::Desktop in QWindowAxel Spoerl2025-09-261-14/+2
| | | | | | | | | Qt::WindowType::Desktop is no longer a valid window type in Qt6. Remove its occurence in QWindow. Task-number: QTBUG-140514 Change-Id: I5320e668ddb19a561dbde19bc191a5fc37d878ce Reviewed-by: Liang Qi <[email protected]>
* Remove Qt::WindowType::Desktop in QGuiApplicationAxel Spoerl2025-09-261-17/+7
| | | | | | | | | Qt::WindowType::Desktop is no longer a valid window type in Qt6. Remove its occurence in QGuiApplication. Task-number: QTBUG-140514 Change-Id: I6a7af2245783d41883114ec3adaedbbfcf4cec6e Reviewed-by: Liang Qi <[email protected]>
* Use angle bracket include style in public headersTor Arne Vestbø2025-09-181-1/+2
| | | | | | | | | As a drive-by, reorder and regroup changed includes to separate includes from different modules from each other. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I3bcca2a75ada7b6d99ef763e0ce8cfbd0750f004 Reviewed-by: Marc Mutz <[email protected]>
* Add QWaylandApplication::xkbContext()Dmitry Kazakov2025-09-121-0/+8
| | | | | | | | It is necessary for the apps that want to manually parse the stream of events from wl_keyborad. Change-Id: I8229ae6e43640d0e7b9597f5f7b35cba59db0f64 Reviewed-by: David Edmundson <[email protected]>
* wasm: a11y - Implement ParentChanged callbackEven Oscar Andersen2025-09-081-0/+6
| | | | | | | | | | | | | | | | Implement the QAccessible::ParentChanged callback. Probably not possible with a perfect implementation. What can reasonably be done is to issue ParentChanged on; QWidget::setParent, QWindow::setParent, QQuickItem::setParentItem. However calling these functions do not necessarily map 1:1 to QAccessibleInterface::parent(). Fixes: QTBUG-138802 Fixes: QTBUG-134923 Change-Id: Iac4ac7843ba904bf0b7aa9964ee68a94294ad979 Reviewed-by: Morten Johan Sørvig <[email protected]>
* Deprecate and remove traces of RasterGLSurfaceTor Arne Vestbø2025-09-035-24/+9
| | | | | | | | | | We no longer use this hybrid surface type approach for Qt Widget's composition mode. Nowadays we use RHI to compose the widget texture and the native textures, and the window surface type depends on the RHI API in use, e.g. QSurface::MetalSurface, or QSurface::OpenGLSurface. Change-Id: I85001100f681a1cf524b8b7dc50f680a9579b447 Reviewed-by: Laszlo Agocs <[email protected]>
* QTest::qWaitFor*: return early if the widget or window was destroyedThiago Macieira2025-08-281-6/+9
| | | | | | | | | | Complements commit f0019c51397e75c261777ef2d7c82a96037d9c7f, which introduced the check for destruction but had no way of indicating that the condition was now forever false. Task-number: QTBUG-136653 Change-Id: I2c6636a7cc6d60e4ac3afffd550fb0f7cc5fd240 Reviewed-by: Edward Welbourne <[email protected]>
* Doc: Fix "see also" list syntaxDavid Boddie2025-08-251-1/+1
| | | | | | Pick-to: 6.10 Change-Id: Ia144ad0c56cc669a54e0cc42c2edd33e93f7e9be Reviewed-by: Tor Arne Vestbø <[email protected]>
* Add platform capability getter in QtGuiTest name spaceAxel Spoerl2025-08-232-0/+12
| | | | | | | | | | | | The name space missed a getter for platform capabilities. Applications may want to know, whether they can instantiate multiple multiple windows e.g. on an embedded system. Add a getter for QPlatformIntegration::Capability::MultipleWindows. Change-Id: I1c6eacc5a19b027faa724d63dd02e74740269b2d Reviewed-by: Volker Hilsheimer <[email protected]> Reviewed-by: Stefan Gehn <[email protected]>
* Revamp QPixelFormat documentationTor Arne Vestbø2025-08-231-77/+132
| | | | | | | Especially with regards to typeInterpretation() and byteOrder(). Change-Id: I6a6c06650cc76dcc9fd3876d7acbc5c45e41f7dc Reviewed-by: Laszlo Agocs <[email protected]>
* Doc: Add missing definition for QInputDevice::availableVirtualGeometryDavid Boddie2025-08-211-10/+13
| | | | | | | | | | The getter was documented, but not the notifier. This led to a link to missing documentation for the signal. Task-number: QTBUG-139283 Change-Id: I4c85541378614498fbff52df06308f4cc31008ba Pick-to: 6.8 6.9 6.10 Reviewed-by: Paul Wicking <[email protected]>
* Include individual channel sizes in QPixelFormat debug outputTor Arne Vestbø2025-08-211-2/+20
| | | | | Change-Id: Icbcbefa0c5b416e5d030d70e5965be7a7c62a92a Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* QTest::qWaitFor*: capture the widget/window using QPointerThiago Macieira2025-08-191-3/+18
| | | | | | | | | | | | | | | | | | | | So we know if they get deleted before the waiting completes. This avoids a crash if we dereference a dangling pointer or an ABA coincidence in the case of qWaitForWindowFocused. There's currently no way to tell QTest::qWaitFor() that the condition will never become true, so this will result in a timeout. [ChangeLog][QtTest] Fixed a bug that would cause the qWaitForWindow* and qWaitForWidget* functions to crash or misbehave if the window or widget they were told to wait on was destroyed in the process of waiting for it to be shown/focused/activated/exposed. Pick-to: 6.10 6.9 6.8 Task-number: QTBUG-136653 Change-Id: Idaef89fa55e869d6946afffd727653a1fee3770c Reviewed-by: Tor Arne Vestbø <[email protected]> Reviewed-by: Edward Welbourne <[email protected]>
* Update byte-ordered QPixelFormats to be QPixelFormat::BigEndianTor Arne Vestbø2025-08-182-10/+16
| | | | | | | | | | | | | | | | | | | | | If a byte-ordered format is read in larger chunks, such as when passing a 32-bit format to platform APIs as a single integer, the interpretation of the bytes needs to be in big endian. Reflect this though the built in pixel formats for QImage formats, as well as the default behavior of the QPixelFormat constructors and factory functions. Also clarify this in the documentation. [ChangeLog][QtGui] QPixelFormats with typeInterpretation() QPixelFormat::UnsignedByte now reflect a byteOrder of QPixelFormat::BigEndian, to highlight the fact that these formats need to be read as such if not read in a byte-by-byte manner. Change-Id: I03baee3a50e7c7d94bc309933e00566653d42de6 Reviewed-by: Eirik Aavitsland <[email protected]>
* Add QDebug support for QPixelFormatTor Arne Vestbø2025-08-122-0/+50
| | | | | Change-Id: I8423063f8ab37693d571191c44b18d33bd1d37f9 Reviewed-by: Volker Hilsheimer <[email protected]>
* QPA: Construct GeometryChangeEvent with old native geometryVolker Hilsheimer2025-07-303-11/+17
| | | | | | | | | | | | | | | | | | | Amends 2fea6bbe8e822b3fb59a7f74c0165e7a8aeb727a, which moved the construction of the event object after the QPlatformWindow::geometry had been updated already. Since the constructor takes that stored geometry to compute the requested geometry, this resulted in a behavior change. Fix this by adding a constructor parameter that takes the requested geometry, and move the High-DPI mapping consistently to the call-site. As a drive-by, replace const QRect & parameters with QRect values, as QRect is small and trivially copyable/movable. Task-number: QTBUG-136045 Pick-to: 6.10 6.9 6.8 Change-Id: Ie44060d299dac9b63b8b6ba8c1e07f3e422dbe03 Reviewed-by: Tor Arne Vestbø <[email protected]> Reviewed-by: Viktor Arvidsson <[email protected]>
* Add missing changed signal to QML Window.flagsLars Schmertmann2025-07-292-1/+4
| | | | | | | | | | | [ChangeLog][QtGui] Added signal flagsChanged to QWindow. Task-number: QTBUG-137933 Pick-to: 6.10 Change-Id: Idd0f272e2f44cbd773a7110fa1c90abea09e8665 Reviewed-by: Volker Hilsheimer <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Lars Schmertmann <[email protected]>
* docs: document the QSurfaceFormat::ColorComponentType enumVolker Hilsheimer2025-07-281-0/+14
| | | | | | | Amends c0e96e0c8b2e9b39920597261a45683136d8483e. Change-Id: I28ad735f19ba0dcd26a29fbd164e52352333fd99 Reviewed-by: Tor Arne Vestbø <[email protected]>
* a11y - send ObjectDestroyed event on object destructionEven Oscar Andersen2025-07-211-1/+7
| | | | | | | | We send the event from the accessible cache. This is the only place we have access to both the interface and the object. Change-Id: I078d6e082b0c3205bfcb544e94b9736360fea4a3 Reviewed-by: Jan Arve Sæther <[email protected]>
* Make QTest::defaultTryTimeout publicMitch Curtis2025-07-171-3/+3
| | | | | | | | | | | | | | | | This allows users of Qt Test to have control over the default timeout value without having to explicitly pass it via the *_WITH_TIMEOUT variants of the macros. Continues on the work done in 55f163382d36ddf908fc2884f2020a1b92340c10. [ChangeLog][QtTest] Added QTest::defaultTryTimeout to allow configuring the default timeout used by the QTRY_* functions. Task-number: QTBUG-81979 Task-number: QTBUG-138160 Change-Id: I04873fd3cc51e9be19850aa5a7de78f9444a11ee Reviewed-by: Marc Mutz <[email protected]>
* QSurfaceFormat::colorComponentType - bump version to 6.11Volker Hilsheimer2025-07-141-2/+2
| | | | | | | | | We're reverting this addition in the 6.10 branch based on header review discussion, so this will be new API in 6.11. Task-number: QTBUG-137478 Change-Id: I3ba4682aac6395a2c4944c2af8d3cb492131c978 Reviewed-by: Laszlo Agocs <[email protected]>
* QTest: provide overloads for the qWaitFor* functionsMitch Curtis2025-07-082-10/+69
| | | | | | | | | | | | | | | | | | | We shouldn't use ints or qint64 for timeouts anymore due to their poor type safety and lack of expressiveness. Qt has adopted chrono-first: https://lists.qt-project.org/pipermail/development/2023-January/043563.html As a drive-by, remove redundant Q_GUI_EXPORT macros in qtestsupport_gui.cpp and qtestsupport_widgets.cpp. Amends 55f163382d36ddf908fc2884f2020a1b92340c10. [ChangeLog][QtTest] Added QDeadlineTimer overloads for the qWaitFor* functions. Pick-to: 6.10 Change-Id: Ife74a1e83d430072a104e0ac665a8cde9fd689f1 Reviewed-by: Marc Mutz <[email protected]>
* Doc: Add usage hint for obtaining QScreen instances from QGuiApplicationDheerendra Purohit2025-07-071-0/+6
| | | | | | | Pick-to: 6.10 6.9 Fixes: QTBUG-117414 Change-Id: Ic4135af4ef21161b2f12f397c1c5c5a0a471bf7b Reviewed-by: Tor Arne Vestbø <[email protected]>
* QMetaType: de-virtualize the QMetaTypeModuleHelper structThiago Macieira2025-07-041-8/+7
| | | | | | | | | | | Now instead of storing a pointer to a vtable, we store the vtable directly. That is one fewer pointer dereference to get to where we want to go. It does mean you can't press F2 in Qt Creator to find the other implementations (not that "._anon_4" was of any help). Change-Id: I5635ebd8907c79c2a935fffdfc8952246ed7fb04 Reviewed-by: Thiago Macieira <[email protected]> Reviewed-by: Ahmad Samir <[email protected]>
* gui: Add missing QAPP_CHECK undefines to fix unity buildsTim Blechmann2025-07-032-0/+4
| | | | | | | | | QAPP_CHECK is defined in multiple cpp files. It should be undefined in the end to prevent unity build failures. Pick-to: 6.10 Change-Id: If01791a4022c88714aab2b798a70195c5b6a8613 Reviewed-by: Tor Arne Vestbø <[email protected]>
* Q*Application: deprecate compressEvents()Marc Mutz2025-06-272-0/+3
| | | | | | | | | | | | | | | | | | Give users that may have overridden this function a heads-up that it will be removed in Qt 7. Go for immediate deprecation, since there's no replacement, anyway. In the unlikely case that there's a user of this undocumented feature, they can use QT_IGNORE_DEPRECATIONS to selectively silence the warning, the same way we do. Amends 438b2f2d604133349777c670590b27a82832e290. Found in API-review. Pick-to: 6.10 Change-Id: I064e80250ab7a405cc8abef144b6c7bc7bbf29fd Reviewed-by: Ivan Solovev <[email protected]>
* wayland: Add xx-session-management-v1 supportDavid Edmundson2025-06-271-0/+1
| | | | | | | | | | | | | | | | | | This is powered by the xx-session-manager which is tagged as experiemntal. This is guarded by an env variable. Application level session IDs are exposed via QSessionManager. The public API for windows is exposed via the existing QSessionManager and QWidget::setWindowRole. As it's not widely supported the documentation in QWidget is left untouched for now. [ChangeLog][Third-Party Code] New protocol synced from wayland-protocols Change-Id: Ibfbef86c6e75f8b95433cbba69ca10a5abea9e21 Reviewed-by: Vlad Zahorodnii <[email protected]>
* QGuiApplication: use the rvalue overload of QObject::setProperty()Marc Mutz2025-06-261-2/+2
| | | | | | | | | | | Said overload was added in 39cdf431f034121353e51768b4d1fec8b0dd35dc, and its use prevents a forced detach in setProperty() that comes from the function taking a copy of the QVariant and then calling .data() on it. The rvalue overload prevents this. Pick-to: 6.10 6.9 6.8 Change-Id: I4f84dae61ab0091d1058c9dee5a02c09b0ac41b5 Reviewed-by: Thiago Macieira <[email protected]>
* QAccessibilityHints: override QObject::event()MohammadHossein Qanbari2025-06-212-0/+12
| | | | | | | | | | | | | | Provides a life-line if we have to add an event handler. We cannot, in general, add new overrides (e.g. mouseMoveEvent()) to a released class, as the new overrides may not be called by existing compiled code. By having at least event() already overridden, we are free to place new code there. Amends d8ac4cd8692e77c85ac8c6bcfa0a1556c7a72ee9. Pick-to: 6.10 Change-Id: I1cee4c0540111c54fe1d7bda851cadad99a2d240 Reviewed-by: Volker Hilsheimer <[email protected]>
* QAccessibilityHints: make dtor out-of-lineMohammadHossein Qanbari2025-06-212-0/+3
| | | | | | | | | | | Pins the vtable to a single TU and prevents -Wweak-vtable warnings Amends d8ac4cd8692e77c85ac8c6bcfa0a1556c7a72ee9. Task-number: QTBUG-45582 Pick-to: 6.10 Change-Id: I735a346c6ba6b202ebcb53397300d3ad51d61d11 Reviewed-by: Volker Hilsheimer <[email protected]>
* Doc: Fix links to deprecated functionsDavid Boddie2025-06-161-5/+5
| | | | | Change-Id: I1a8ae38121b3a9880ac67f80133df3c15b9951c9 Reviewed-by: Volker Hilsheimer <[email protected]>
* Make QOpenGLContext::globalShareContext() lazy creation thread-safeTor Arne Vestbø2025-05-311-0/+5
| | | | | | | | | | | We move the context to the main thread (or the thread of qGuiApp), as that's where it will be deleted. Amends 4a7ccb65f0065e878c5762db05eca9c5cd6731e5. Caught-by: Eskil Abrahamsen Blomfeldt <[email protected]> Change-Id: I8e5dc512dce02d22980730a46474b2262684a713 Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* Lazily create global share context when Qt::AA_ShareOpenGLContexts is setTor Arne Vestbø2025-05-234-26/+18
| | | | | | | | | | | | | | The requirement to set Qt::AA_ShareOpenGLContexts before creating QGuiApp was forcing users to also set the default surface format before QGuiApp, which prevents us from initializing a default surface format based on the platform integration. By creating the global share context lazily when requested via the Qt::AA_ShareOpenGLContext application attribute we open up this possibility. Change-Id: I958639c997e96321013b1080c31e2533a36c13ff Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* macOS: Make NSServicesMenuRequestor implementation rich-text awareTor Arne Vestbø2025-05-192-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | The protocol is used by services that interact with content in the application on behalf of the user. So far we have only been able to deal with plain text content, which resulted in wiping any formatting if the user tried to use a service to rewrite text in a rich text document. We now support rich text, by teaching our IM protocol how to deal with rich text for both reporting of the current text selection, as well as text insertion (commit). Unfortunately this doesn't help us for Writing Tools, as in 15.2 it no longer uses the NSServicesMenuRequestor protocol for insertion if we also implement NSTextInputClient. As a result we get insertions via insertText:replacementRange:, which is not prepared for rich text yet. [ChangeLog][macOS] Text services via the Services menu now support rich text extraction and insertion. Task-number: QTBUG-126238 Change-Id: I3d2933d766af8fe29e4f17636f703a257bf389fd Reviewed-by: Richard Moe Gustavsen <[email protected]>
* Add QPlatformTheme::ScrollSingleStepDistance theme hintTor Arne Vestbø2025-05-182-0/+7
| | | | | | | | | | | | | | | The hard coded value of 20 used in various QAbstractScrollArea subclasses does not represent the default behavior on all of our platforms. On macOS e.g. the native NSScrollView has a default line scroll value of 10 pixels. The default value isn't changed for macOS in this patch, as it has to be done in coordination with other changes to make the behavior change atomic. Task-number: QTBUG-130667 Change-Id: I532dbd3e2e946a00f426475adfa851d35a656c1b Reviewed-by: Shawn Rutledge <[email protected]>
* For qdebug operator<< of pointer types, always check for nullptrDaniel Trevitz2025-05-174-15/+11
| | | | | | | | Also, use a consistent syntax for when the pointer is null. Fixes: QTBUG-135856 Change-Id: I2f5c80a5650b1be6cc0d70cde7cd1e1c1990df9a Reviewed-by: Christian Ehrlicher <[email protected]>