summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Add Q_ENUM in QPlatformTheme enumsAxel Spoerl12 hours1-0/+5
| | | | | | | | Not all enums defined in QPlatformTheme used the Q_ENUM macro. This patch adds the macro where not used after an enum definition. Change-Id: I372c8f763f5ca27a60864405ed50f51fc7a7f55c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Port from container.count()/length() to size()Marc Mutz38 hours79-574/+574
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is semantic patch using ClangTidyTransformator: auto QtContainerClass = expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o) makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container'. <classes> are: // sequential: "QByteArray", "QList", "QQueue", "QStack", "QString", "QVarLengthArray", "QVector", // associative: "QHash", "QMultiHash", "QMap", "QMultiMap", "QSet", // Qt has no QMultiSet Change-Id: Ibe8837be96e8d30d1846881ecd65180c1bc459af Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Make sure that palette cache keys are uniqueVolker Hilsheimer46 hours1-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After 1d961491d817490da156769ddce6fce48a0bce4a, palettes are different if they either have different brush data, or a different private. Two privates can share data, but still must generate different cache keys. The cacheKey has so far been composted of the serial number of the Data struct, and a detach number that is incremented when we detach the private. This failed for two reasons: - the implicit copy constructor of the Data class copied the serial number, when it should have incremented it. Fix that by member- initializing the serial number rather than doing it only in the default constructor. The member initialization is also executed for the copy constructor. - the detach_no logic as it was implemented does not guarantee that two copies of the same palette that share data, but have different resolve masks (and thus different privates) have different detach_no values. Use a static serial counter for that number as well. Amend the test case to verfiy that cache keys, and the elements of the cache keys, change when they are expected to. Fixes: QTBUG-106984 Pick-to: 6.2 6.4 Change-Id: I84d7055ce8bfe0d42f1f8e9766f3f1ad610f4ec8 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Properly deprecate QStyleHints::keyboardAutoRepeatRate()Tor Arne Vestbø4 days2-1/+3
| | | | | | | | The property also needs a QT_DEPRECATED_SINCE guard, and we can specify the version in the qdoc \deprecated tag. Change-Id: Ib333df862d1ef1c0c41a1baf51691928a64ecd75 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Update documentation of qWaitForWindowActive / qWaitForWindowExposedAxel Spoerl5 days1-9/+15
| | | | | | | | | | Sharpen existing documentation with a focus on use cases and differences between both methods / overrides in qtestsupport_gui and qtestsupport_widgets. Pick-to: 6.4 6.2 5.15 Change-Id: I62b7be437dd43bb0b114af66de51fb4d1f55b671 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* OpenGL: Remove pre-Win10 leftoversYuhang Zhao6 days1-9/+0
| | | | | | | | | | | | Qt6's minimum supported platform is Win10 1809, and all pre-Win10 code have already been removed from QtBase long time ago. These code are trying to support Windows 7 to Windows 8.1, which nowadays become legacy code and should be removed. Pick-to: 6.4 Change-Id: I21a979d32d99977107964bccc06fdec7b38cd727 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Send string to Atspi DBus interface on value changed for comboboxesFushan Wen6 days1-1/+3
| | | | | | | | | | Orca only accepts string or list type for object:property-change:accessible-name events. This fixes NameChanged not being announced by Orca. Pick-to: 6.4 6.2 Change-Id: Ib30fed94aad70b98400deec5e31630b4f8c22e26 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Make SetFocusOnTouchRelease style hint themeableAlexander Volkov6 days4-3/+12
| | | | | | | So it could be set by e.g. Plasma Mobile. Change-Id: I067bd1356a61dbbf330530ef82565486d2e862a6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Introduce QGlyphRun::stringIndexes()Eskil Abrahamsen Blomfeldt6 days5-15/+250
| | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces a way to trace each entry in the glyph index array to a specific index in the original text passed to QTextLayout, as well as a convenience function to access the original string from the QGlyphRun. The index information is stored in the logClusters array internally in Qt, but it contains the inverse information: For each character in the output string, it contains an index into the glyph array. In order to get the string indexes for each glyph, which makes a lot more sense in the context of the QGlyphRun API, we need to do a little search to construct the data. To avoid adding unnecessary allocations, we make the new APIs opt-in. If you do not specify anything, you will only get the glyph indexes and glyph positions as before. However, you can now specify exactly which parts of the layout to extract using an optional flags parameter. This also adds a manual test which can be very handy to visualize QTextLayouts and how they are split into QGlyphRuns. Fixes: QTBUG-103932 Change-Id: Ie4288fff338b9482aba0aba29fc7e1e59fa60900 Reviewed-by: Lars Knoll <lars@knoll.priv.no>
* Add QStyleHints::keyboardAutoRepeatRateF()Tor Arne Vestbø6 days2-0/+18
| | | | | | | | | | The keyboardAutoRepeatRate() function returning an int assumes the rate can not be lower than one event per second, but this is not always the case, e.g. on macOS where the slowest setting for key repeat results in a two second delay between events. Change-Id: I806fb57883ce0085c835fb0a43d6b86bd6da375a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix build with disabled accessibilityAlexey Edelev6 days1-2/+4
| | | | | | | | Amends 8539e641f6f48a605547f66c47266d19e537f74e Task-number: QTBUG-106941 Change-Id: Ieffe1ac0050c9f1377e4260376acb2f8cdc0f985 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Style sheets: add placeholder text color property for edit widgetsEirik Aavitsland7 days2-2/+5
| | | | | | | | | The placeholder text was given its own QPalette color role in Qt 5.12, but there has been no way to specify it from a Qt style sheet. Fixes: QTBUG-93009 Change-Id: If58ca844c19c65b7eee14c6d5730a4ba27640c33 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Replace qExchange calls with std::exchangeFabian Kosmale7 days7-8/+8
| | | | | | | | | | | | | | | | | | | | | qExchange is one of the few remaining functionalities that have not been moved out of qglobal. Given that std::exchange exists in the standard, we can simply move to it everywhere... ...if it weren't for the fact that std::exchange is only constexpr in C++20, and only has its noexceptness specified in (most likely) C++23. Still, we want to move to the existing std functionality where possible, to allow the removal of qglobal includes in lieu of something more fine-grained in the future. So leave any constexpr calls[1] alone for now (and observe that none of our current usages cares about the conditional noexceptness), but replace everything else. [1] QScopedValueRollback' ctor and QExplicitlySharedDataPointerV2::take Task-number: QTBUG-99313 Change-Id: I599cb9846cf319c7ffd3457130938347a75aad25 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qHash: Add seed argument for classes inheriting QStringMårten Nordheim7 days1-1/+4
| | | | | | | | | | | Pre-requisite for a fix for qHash. The classes inherits from QString and after the upcoming fix their single-arg qHash overload is no longer preferred since we want to use a seed. This has been the case since Qt 5. Pick-to: 6.2 6.4 Change-Id: I6e8601ab8d591742e2399d10521dec8cfa46f71a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Replace the syncqt.pl script with syncqt toolAlexey Edelev8 days1-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | syncqt.pl adds an extra dependency on perl when building Qt. Modern C++ provides the convenient cross-platform way to access a filesystem and to use regular expressions, so we may replace the perl script with C++ application. The syncqt executable is built at configure time and installed as QtCore tool. It's running at configure time to deliver the required header files for IDE to build a consistent code model and at the build time to keep tracking changes in header files and generate the missing aliases without reconfiguring. 'syncqt' only parses header files from a CMake build tree, so the resulting Qt installation only contains interfacing headers that belong to the platform that Qt is built for. 'sync.profile' files are not used as the 'source of truth' for sync qt procedure anymore, all the necessary information is taken from either CMake files at configure time or from the module header files while parsing them. syncqt.pl is still in place since it's required as fallback solution for a smooth transition to the new syncqt implementation for all qt repositories. This patchset only enables the C++ based syncqt for 'qtbase' repository. From the performance perspective C++ version works faster then perl script, also the configure time is reduced significally on subsequent reconfigurations - up x2 times faster when re-configuring repository, but it also takes time to compile the tool itself the first time. Numbers for qtbase: syncqt.pl syncqt.cpp initial: 0m16,035s 0m20,413s reconfig: 0m6,819s 0m3,725s The syncing procedure can be run separately for each module using <ModuleName>_sync_headers targets. The 'sync_headers' target can be used to sync all the modules at once. Task-number: QTBUG-87480 Task-number: QTBUG-103196 Change-Id: I8c938bcaf88a8713b39bbfd66d9e7ef12b2c3523 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Update url to IAccessible2 SpecificationJan Arve Sæther9 days1-1/+1
| | | | | | | | (The old one was 404 page not found) Pick-to: 6.4 6.3 6.2 5.15 Change-Id: I06818443a1f89709b749ea66c05b4023e33b15d0 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* vulkan: Add flag to opt out from enumerating Portability phys.devicesLaszlo Agocs9 days3-6/+12
| | | | | | Task-number: QTBUG-106912 Change-Id: I1cb4adae4bed62f31d781a89a03b70885411f91f Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* vulkan: Re-enable VK_KHR_portability driversLaszlo Agocs9 days3-13/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Vulkan loader as of SDK 1.3.216 and MoltenVK decided that all existing applications need to stop working with non-conformant Vulkan implementations such as MoltenVK, unless they start specifying the right soup of instance flags, extensions, and device extensions. Set VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR in VkInstanceCreateInfo::flags. Automatically request VK_KHR_portability_enumeration, if supported, on the instance. This handles the instance side. On the device side we can add support in QRhi so Qt Quick continues to work with MoltenVK. This involves requesting VK_KHR_portability_subset on the device whenever the extension is reported as supported (not doing so would be an error) However, applications creating their own VkDevice will need to take care of this themselves. This device extension requires VK_KHR_get_physical_device_properties2 on the instance (which QRhi does not control). This is no problem with Qt Quick as that already does this automatically, but in the unlikely case of wrapping an existing VkInstance in QVulkanInstance it will be up to the creator of VkInstance to enable that as well. Pick-to: 6.4 6.3 6.2 Fixes: QTBUG-106912 Change-Id: Idaf277549b3ec982e99bfc49e4ad6a67976c141a Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Fix build without opengl featureAlexey Edelev11 days4-9/+19
| | | | | | | | | | Guard private includes of private opengl headers and make public opengl headers available even if feature is disabled, since they can be used by user projects. Task-number: QTBUG-103196 Change-Id: If492c97b5cfb21d8aac0d607bc7add38b6d0c73e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Propagate appearance property from QPlatformTheme to QStyleHintsAxel Spoerl12 days6-20/+107
| | | | | | | | | | | Implement appearance property, getter and notifier in QStyleHints. Update appearance property in QStyleHints when handling theme change in QGuiApplicationPrivate. Task-number: QTBUG-106381 Change-Id: Idd67ca9df248ec9d9e67c0d48121e8eead11a9e2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Rename QHoverEvent ctor pos argument to scenePosShawn Rutledge12 days2-5/+5
| | | | | | | | | | | | | | | | | | | | | | | The QHoverEvent ctor takes two points: scenePos and globalPos; the first of those is passed to the QSinglePointEvent ctor as _both_ the local and scene pos, which calls QMutableEventPoint::setScenePosition() on the persistent QEventPoint instance, and then detaches before setting ephemeral state. Therefore, we must construct QHoverEvent with scene position, not local position, so that the right value is persisted. To localize a QHoverEvent during delivery, use QMutableEventPoint::setPosition(). This needs to be done repeatedly while visiting multiple widgets or items; the detach() prevents it from being saved in the persistent QEventPoint in QPointingDevicePrivate::EventPointMap. Amends 0a64a044b6c1c44b0a2bb2be5e70fda920f5f6bf Task-number: QTBUG-35409 Task-number: QTBUG-100324 Change-Id: Ic1084e1c3cd384683666ba52fe34f16b9d039877 Pick-to: 6.4 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Revert "QTextLayout: fix maximumWidth() for a text containing line separator"Eskil Abrahamsen Blomfeldt12 days3-12/+1
| | | | | | | | | | | | | | | | This reverts commit 013c346a8dcbd618febb07884c64c740daf9754d. It was determined to cause a regression in Qt Quick: QTBUG-106899. In order to unblock integrations, we need to revert the change. It can be re-committed later when the problem has been analyzed and addressed. Pick-to: 6.2 6.4 Fixes: QTBUG-106899 Task-number: QTBUG-89557 Task-number: QTBUG-104986 Change-Id: I04054587f68ab39fdb038b02fc69ebfa3dc7d197 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Return the actual modal window in QGuiApplicationPrivate::isWindowBlockedMikolaj Boc12 days1-1/+1
| | | | | | | | | | | | | The method erroneously returns the common ancestor of the |window| in question and a modal window in case of window-modality of the modal window. What should be returned is the modal window because it is the one that blocks the |window|. Fixes: QTBUG-106627 Change-Id: Ib4da6c1e9757629bbedbd8a16407cd6b5b0d5d27 Pick-to: 6.4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* rhi: Optimize the default null QShaderLaszlo Agocs13 days1-33/+76
| | | | | | | To please qmlbench. 441->463 in delegates_shadereffect.qml Change-Id: I66bbfd7747df958963a4ebf588a1461edc5dce59 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* QtGui: Replace QStringLiteral("...").arg with "..."_L1.argMate Barany13 days1-1/+1
| | | | | | | | | | | This commit addresses a comment from the review of QTBUG-98434. QL1S has its own arg()s, replace QStringLiteral("...").arg with "..."_L1.arg. Task-number: QTBUG-103100 Change-Id: I5313783e36101a9a65c7d5a2344ca46614658b80 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* rhi: QShader: Only hash the first shaderLaszlo Agocs14 days1-3/+4
| | | | | | | | | | | | This is good enough for a hash value and brings a not insignificant boost to cases when this is used heavily. In qmlbench with delegates_shadereffect.qml this improves the results in my runs 386->405. Pick-to: 6.4 Change-Id: I3dbb9ffabf5986c5ff6b69928b3f073e944450ee Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* QtGui: replace indexed for loop with range for loopMate Barany14 days1-3/+4
| | | | | | | | | | This commit addresses a comment from the review of QTBUG-98434. Replace the index based for loop with a range based for loop. Task-number: QTBUG-103100 Change-Id: Iaf92382f07172b254486882beb67f1927ad89be5 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Implement appearance detection generic unix themesAxel Spoerl2022-09-212-11/+135
| | | | | | | | | Detect appearance and reimplement QPlatformTheme::appearance() in KDE and Gnome themes. Task-number: QTBUG-106381 Change-Id: Id65ea1e47696fbfb87db5ed194300d652e0bbe66 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QtGui: Use static const QString array to initialize QStringListMate Barany2022-09-211-8/+8
| | | | | | | | | | | | This commit addresses a comment from the review of QTBUG-98434. Introduce a static const QString array for the name filters and create the filtering QStringList from this array. Task-number: QTBUG-103100 Change-Id: I7e07ea1083d802340c943f4a67eb4a831be4516a Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QtGui: Use isEmpty() to check for empty stringMate Barany2022-09-211-1/+1
| | | | | | | | | | | This commit addresses a comment from the review of QTBUG-98434. Use isEmpty() to check whether the string is empty or not. Task-number: QTBUG-103100 Change-Id: Ia7c298bc4436d974b0369e178a370764c1dbe051 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QtGui: Fix mismatches between string types and string literalsMate Barany2022-09-216-30/+30
| | | | | | | | | | | | This commit addresses some comments from the review of QTBUG-98434. Some strings were initialized with incorrect literal types - fix the mismatches between the string types and string literals. Task-number: QTBUG-103100 Change-Id: I5f9f8a2c1583c21711f7b9ff177917f20690b5a3 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Replace QPlatformTheme::Appearance by Qt:AppearanceAxel Spoerl2022-09-202-10/+4
| | | | | | | | | | | | | With the introduction of Qt:Appearance, its predecessor in QPlatformTheme has become redundant. This patch replaces all occurrences of QPlatformTheme::Appearance with the new enum class. Task-number: QTBUG-106381 Change-Id: I5406f1b7c19f68571f074617c681318c96a6517e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Make commit() call in QTouchEventWidgetSequence explicitAxel Spoerl2022-09-201-1/+1
| | | | | | | | | | | | Calling commit() in the QTouchEventWidgetSequence destructor bypasses the vtable. This causes a compiler warning. This patch eliminates the warning by explicitly calling QTouchEventWidgetSequence::commit(). Pick-to: 6.4 Change-Id: I1354aa22d2a85a609adc307338d118c5789df93f Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Get rid of copypasted code between isWindowBlocked's overridesMikolaj Boc2022-09-202-30/+34
| | | | | | | | | | | | | | | | | The code in QGuiApplication::isWindowBlocked and QApplication::isWindowBlocked is very similar, a result of copying and pasting. Due to the copying it is difficult to modify the code and the implementation is hard to comprehend, too. There are ultimately only two parts that are different. First is that QApplication's override may also specify a certain window as non-blockable if it is a popup window. Second, default modality is computed in QApplication if a modal window does not have one assigned. The differing parts have been extracted following the template method design pattern. Pick-to: 6.4 Change-Id: I3b9aa206a3c7211fe022730943bf6f76aa5ae6d2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QTextLayout: fix maximumWidth() for a text containing line separatorVladimir Belyavsky2022-09-203-1/+12
| | | | | | | | | | | | | | When laying out, we need to increase layout's maximum width _only_ if the previous line was not explicitly wrapped by a line or paragraph separator, or if the current line's width is greater than the previously accumulated layout's maximum width. Fixes: QTBUG-89557 Fixes: QTBUG-104986 Pick-to: 6.2 6.4 Change-Id: Ib7cc4b9dda8f20166dcbd5cfd3b56424bb33d14a Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* a11y: Fix QAccessibleTableInterface::selectedRows docMichael Weghorn2022-09-191-1/+1
| | | | | | | | | While QAccessibleTableInterface::selectedColumns returns the selected columns, QAccessibleTableInterface::selectedRows should return the selected rows. Change-Id: I0a4972e7c46536aa813d35512c02336cc1efb286 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* a11y: Fix typo in QAccessible::ObjectHide docMichael Weghorn2022-09-161-1/+1
| | | | | | | | | "obscured" is also what the doc uses for QWidget's visible property [1]. [1] https://doc.qt.io/qt-6/qwidget.html#visible-prop Change-Id: I0fc5a2672b8d6f43627763e01ffe7ebde17ac6e8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Share logic for QScreen property update emitting in helper classTor Arne Vestbø2022-09-164-59/+92
| | | | | | | | | | | | | | With high-DPI scaling in place QScreen properties like the geometry can be affected both by screen resolution changes, as well as logical DPI changes. We want to ensure similar behavior in both cases when it comes to which change-signals we emit, so centralizing this code makes sense. As the update of the cached primary orientation is trivial we do it unconditionally. Change-Id: I712005075a4b758180906fb88b2ac187b3dbe1ff Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QWSI: Remove dead code for macOS-specific shortcut-override handlingTor Arne Vestbø2022-09-152-20/+16
| | | | | | | | | | | | | | | | | | | | | | The macOS platform plugin exclusively uses handleExtendedKeyEvent() these days, never the simpler handleKeyEvent(), and always passes false for the tryShortcutOverride argument, so the special-cased code was never executed. No other platform passes the optional tryShortcutOverride argument, so it can be removed completely. If we ever need to bring back this kind of logic it should live in the macOS platform plugin, not in the QWSI layer. We have to keep the existing logic for qt_handleKeyEvent() though, as that's exercised through QTest::simulateEvent(). The next step would be to remove the QWindowSystemInterface::handleShortcutEvent() call in QGuiApplicationPrivate::processKeyEvent() and teach existing platform plugins, as well as the QTest machinery, to handle shortcuts explicitly before sending raw key events. Change-Id: I6eb3fd18c64d1619e33e79f076e25efd299a9ba7 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Do not set Qt::ToolTip flag for QShapedPixmapWindowMagnus Groß2022-09-151-1/+1
| | | | | | | | | | | | | | | | | This hint is not really needed in the first place and only causes problems in some environments. For example in KDE, the compositor animates changes in position and size for all ToolTip windows. However, this is not wanted here because we use this window as a thumbnail for a drag-and-drop operation. Before this patch the dragged element would lag significantly behind the cursor. Now it works as expected, i.e. the dragged element follows the cursor immediately. Fixes: QTBUG-98048 Change-Id: I49ef453c05228ce1a9336a9463046a794650acae Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io>
* Simplify obtaining of parent in isWindowBlockedMikolaj Boc2022-09-121-8/+2
| | | | | | | The new way is more readable as it uses an existing API Change-Id: Id253c9e6405d11f16bdb5f55288dcfcf4b1641c6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* rhi: metal: Implement pipeline cache save/loadLaszlo Agocs2022-09-123-5/+265
| | | | | | | | Fixes: QTBUG-106161 Task-number: QTBUG-103802 Change-Id: I51443b72cad0247d3616c075e3dfb7dacea8ca64 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Avoid crash in QTextMarkdownWriter::writeBlock()Shawn Rutledge2022-09-101-2/+2
| | | | | | | | | | The inner loop would go out of bounds whenever it tried to find the end of a run of spaces in a fragment that contained only spaces. Fixes: QTBUG-104999 Change-Id: I5dda03b31194fff12f6052c458a0eb85d0be5c2b Pick-to: 6.2 6.3 6.4 6.4.0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* a11y atspi: Forward table model change to AT-SPIMichael Weghorn2022-09-101-1/+64
| | | | | | | | | | | This adds handling for QAccessible::TableModelChanged by forwarding the events to AT-SPI, s.a. the list of AT-SPI events at [1]. [1] https://accessibility.linuxfoundation.org/a11yspecs/atspi/adoc/atspi-events.html Change-Id: I0a2b64caf96126b4827a03886ce4a73f98429b7f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* a11y atspi: Move comment to better placeMichael Weghorn2022-09-101-3/+3
| | | | | | | | | Move the comment about setting the ATSPI_STATE_MANAGES_DESCENDANTS state to the place where the state is actually set. Change-Id: Ia6956d36db86e935b4fab03b1892cf4e8a709c0f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add more logging to QHighDpiScalingTor Arne Vestbø2022-09-092-0/+32
| | | | | Change-Id: I12d0184b8fda86bed5b78dfb45a5d8dfb7da44bc Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* doc: Clarify the term advance widthEskil Abrahamsen Blomfeldt2022-09-082-5/+13
| | | | | | | | | | | | | | The QFontMetrics documentation has been wrongly stating that the the horizontalAdvance() gives the width of a string, dating back to when the function was misnamed as width(). This can cause issues e.g. when using the value as input to eliding or clipping, since the advance may be smaller than what is actually drawn. This tries to clarify the term a bit. Task-number: QTBUG-90036 Change-Id: I8ed82fa14fe26c2a20cdbee9f2097a0aa4cc3925 Reviewed-by: Lars Knoll <lars@knoll.priv.no>
* Don't emit logicalDotsPerInchChanged when updating screen geometryTor Arne Vestbø2022-09-081-1/+0
| | | | | | | The screen geometry can not affect the logical DPI of the screen, Change-Id: Id71b72ed2f26d0371ea7c2d2951426d2616dafd1 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Rename QScreenPrivate::updateHighDpi()Morten Johan Sørvig2022-09-084-6/+6
| | | | | | | | The function updates the cached QScreen geometry; rename it to updateGeometry(). Change-Id: I56077807baa6c515769017dbb842eed10b1d1357 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Move QPlatformScreen::deviceIndependentGeometry() logic to QScreenTor Arne Vestbø2022-09-083-12/+4
| | | | | | | | | | Having the logic in QPlatformScreen was inconsistent with how the high-DPI scaling logic sits on top of the platform layer, and also made the implementation of QScreenPrivate::updateHighDpi() a bit inconsistent in how the geometry vs available geometry was resolved. Change-Id: I683ab34dfc8579e2c887cb8fe3059c9c9fdb71a7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>