summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* [docs] QQuaternion: fix links to QVector3D functionsHEADdevMarc Mutz83 min.1-2/+3
| | | | | | | | | | | | | | Without qualification, qdoc links x() to this class' x(). But the documentation means QVector3D::x(), so we need an explicit \l here. Similar to ab1ce95c8ce38683477373cf84ba5686ea00efed for QString/QByteArray. Amends 88142e73d5e062cf26638511a42140b59ef736cc. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I6eb5ca38f328ce36988e10e3221b801e68629938 Reviewed-by: Volker Hilsheimer <[email protected]>
* [docs] QQuaternion: fix grammarMarc Mutz83 min.1-1/+1
| | | | | | | | | | "Angles" are plural, so the verb has to be in plural form, too. Amends 88142e73d5e062cf26638511a42140b59ef736cc. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: Ic19ba9de8b7f33fafb35eff7f256698ebf4b8443 Reviewed-by: Volker Hilsheimer <[email protected]>
* a11y atspi: Don't crash when using DBus Properties GetAllNicolas Fella83 min.1-3/+6
| | | | | | | | | | | | | | | | | GetAll only takes one argument, so trying to access the second one will access the arguments list out of bounds. Also, the argument list we get from the AT client might be insufficient compared to what we expect. Take actual argument list size into account when accessing arguments to generate the call. Fixes: QTBUG-137344 Pick-to: 6.10 6.9 Change-Id: Iff602b7036a71505234903893561ab3a87608146 Reviewed-by: MohammadHossein Qanbari <[email protected]> Reviewed-by: Volker Hilsheimer <[email protected]> Reviewed-by: Michael Weghorn <[email protected]>
* [docs] QQuaternion: fix grammar in toRotationMatrix()Marc Mutz8 hours1-2/+2
| | | | | | | | | | Need definite acticles here, not indefinite one. Amends ba640a75a5cc9fec63a5204ccf143dbb7f398842. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I843b9d97276308412d566fbd453c706c9570c876 Reviewed-by: Volker Hilsheimer <[email protected]>
* QClipData: fix incorrect realloc() useMarc Mutz26 hours1-2/+2
| | | | | | | | | | | | | | | | | | | The realloc() calls unconditionally overwrote m_spans with the result of realloc() before checking whether realloc() succeeded. This way, they leaked memory if realloc() did fail (they lost their handle on the old, still-existing memory block). Fix by piping the realloc() result through q_check_ptr(), which inserts Q_CHECK_PTR(), so we don't need a temporary variable here. As a drive-by, replace C-style cast with static_cast and fix spacing around binary operators. Amends the start of the public history. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: Ia77a246bf6eec4e29ea6a01f999d3f4a43e0ee1c Reviewed-by: Thiago Macieira <[email protected]>
* QDataBuffer: fix incorrect use of realloc()Marc Mutz26 hours1-4/+6
| | | | | | | | | | | | | | | | | | | One must never overwrite the first argument of realloc() with its result, before checking the result for nullptr, otherwise the old pointer value (which still needs to be free()d when realloc() fails) is lost and therefore memory is leaked. As a drive-by, replace C-style with static_cast. Found by explicit review of realloc() calls (incl. QtPrivate wrappers). Amends the start of the public history. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: Ifac55291898837a9e063c508e03f1c7da0a0e61f Reviewed-by: Aurélien Brooke <[email protected]> Reviewed-by: Thiago Macieira <[email protected]>
* QTextCharFormat: improve documentation for font()David Faure32 hours1-0/+11
| | | | | | | | | | | | | It can be quite confusing to find out that fontItalic() == false but font().italic() == true, or vice-versa. Or worse, the fact that fontPointSize() returns 0 if the size comes from the default font. Fixes: QTBUG-49564 Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I05239ed80e82080ea942524f289b953f806c8196 Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
* QFileInfoGatherer: Prevent infinite loopTobias Fella32 hours1-0/+2
| | | | | | | | | | | | | | If the path to be added to the queue already exists at position 0 of the queue, loc is set to 0. This causes the next invocation of lastIndexOf to start at index -1 (the end of the queue). It will then again find the path at index 0. This means that the loop will never terminate, causing the application to freeze here. This patch fixes that by breaking out of the loop if loc is 0. Pick-to: 6.10 6.9 Change-Id: Ib84f0b2766aa39c87f66b94a2e3fbc6ede687521 Reviewed-by: Friedemann Kleint <[email protected]>
* QQuaternion: rename the fromEulerAngles() argumentMarc Mutz32 hours2-7/+7
| | | | | | | | | | | | The eulerAngles name will clash with a function I intend to add, of the same name, probably triggering -Wshadow. Besides, this fixes long lines and isn't any less readable. Picking all the way since it's 100% risk-free. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: Iea552c6cad4ad20164cf0cc462cb1dcb2bc752c0 Reviewed-by: Volker Hilsheimer <[email protected]>
* QQuaternion: fix MingW "redeclared without dllimport attribute" errorMarc Mutz32 hours1-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I don't know why, but after years of no changes to the header, the CI on 6.5 started to throw the dreaded qquaternion.h:138:8: error: 'QQuaternion::QQuaternion()' redeclared without dllimport attribute after being referenced with dll linkage [-Werror] Fix by plastering the class with inline keywords. This just goes to show that separating definition and declaration of inline functions (and exporting non-polymorphic classes wholesale) is usually a bad idea. Remove the inline keywords from the definitions to order to use the linker on all platforms to verify we marked all functions inline that are. Later releases are unaffected, because f9f1272e7c438b79591032877f2b386af8085c3f plastered the class with constexpr, which implies inline. Manual conflict resolution for dev: - there were three inline keywords left outside the class after f9f1272e7c438b79591032877f2b386af8085c3f, this patch removes them, so mark it as a cherry-pick of the 6.5 change, which did the same Pick-to: 6.10 6.9 6.8 Change-Id: I5f044e4aae8e31173c0717d4b70d53fece99b927 Reviewed-by: Volker Hilsheimer <[email protected]> (cherry picked from commit fccb455a4f94e5bc95ba6ad54a46fa71439314bb) Reviewed-by: Daniel Smith <[email protected]>
* macOS: include QUrl in QAppleFileIconEngineVolker Hilsheimer2 days1-0/+1
| | | | | | | | | | | | The type is only forward declared via qmetatype.h so far, and building (presumably) only worked due to pre-compiled headers. Amends f036bd0edadf0f59757f4a8fa695706273eb72d2. Fixes: QTBUG-138100 Task-number: QTBUG-134239 Change-Id: Icc39b23cc08a309cba46c1d9ec598a6a0639754f Reviewed-by: Tor Arne Vestbø <[email protected]>
* Replace one-shot uses of QSemaphore with QLatchThiago Macieira2 days6-42/+42
| | | | | | | | | | | | | | | This commit replaces one-shot synchronization of threads that were using QSemaphore with QLatch. QSemaphore is efficient on Linux and Windows, but allocates memory elsewhere. Even on those platforms where we have futex-like OS support, QSemaphore is heavier than what we really need here. All but one uses of QSemaphore in qtbase libraries (I didn't change examples or tests) were replaced. The remaining use of QSemaphore in qnetworkproxy_libproxy.cpp is a proper producer-consumer. Change-Id: Ib5ce7a497e034ebabb2cfffd1761a4fcb2be9a6c Reviewed-by: Volker Hilsheimer <[email protected]>
* [docs] QQuaternion: fix \overload in toEulerAngles() docsMarc Mutz3 days1-1/+0
| | | | | | | | | | | | | The function is no longer overloaded. getEulerAngles() used to be called toEulerAngles() (88142e73d5e062cf26638511a42140b59ef736cc), but was later renamed to the idiomatic get-prefix (1872857ca72658cd58c0c39b31da493f794be6ca). Amends 1872857ca72658cd58c0c39b31da493f794be6ca. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: Ibc71635aa836e9c33fb2b88ce30cc7a35fbf1291 Reviewed-by: Volker Hilsheimer <[email protected]>
* QQuaternion: fix incorrect Qt 7 export on inline functionMarc Mutz3 days1-1/+1
| | | | | | | | | | | | | | The fromEulerAngles(QVector3D) function is and will stay inline, as it's just forwarding to the (float, float, float) overload of the same name. So it needn't be, and shan't, either, be exported come Qt 7. Remove the QT7_ONLY export. Partially reverts / amends f9f1272e7c438b79591032877f2b386af8085c3f. Pick-to: 6.10 6.9 6.8 Change-Id: I8ed0054ca89ab04ef0b06bea953473e91789fda6 Reviewed-by: Volker Hilsheimer <[email protected]>
* QQuaternion: comment all #endif'sMarc Mutz3 days1-5/+5
| | | | | | | | | | | | | | | It's easier to comprehend what's going on, because there are quite a few different ones here. Exception: if the #if block contains only very few lines (max four or so, didn't count), then a naked #endif is ok, and arguably easier on the eye, so leave them in that case. Amends the start of the public history. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: Ib1b27859344916caa17dc1ff0010b6b10d34bb13 Reviewed-by: Volker Hilsheimer <[email protected]>
* Q*Application: deprecate compressEvents()Marc Mutz5 days2-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]>
* Add clamping to QColorTransferGenericFunctionSamuel Gaist5 days1-0/+4
| | | | | | | | | | | | | | | | | | This ensures that the inputs are within range for the use of these function. Depending on the values passed, they can trigger FE_INVALID errors and thus NaN as return values. This can happen for example when feeding an invalid ICC profile to QColorSpace::fromIccProfile. Credit to OSS-Fuzz Fixes: QTBUG-137159 Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I435a5768fbb7d3e6cb84d578703e7dde2e39a27e Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* wayland: Add xx-session-management-v1 supportDavid Edmundson5 days1-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 Mutz7 days1-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]>
* gui/removed_api.cpp: add missing comment block in 6.7 sectionMarc Mutz7 days1-0/+4
| | | | | | | | Amends 6c72080f26e9b70041434c6d762f7d601a2bf19c. Pick-to: 6.10 6.9 6.8 Change-Id: I8af92558be9ebef70fe99d4d6e9dcfdc14ef90ba Reviewed-by: Volker Hilsheimer <[email protected]>
* QPainter: make qt_show_painter_debug_output constexprMarc Mutz7 days1-53/+53
| | | | | | | | | | | | | | | Nothing is modifying the variable, so make it constexpr (was: mutable) and change all the if's into if-constexpr's. While the compiler doesn't care unless QT_DEBUG_DRAW is defined, this will prevent the next human reader from going on the same fruitless hunt for a setter as yours truly. Amends the start of the public history. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: Ib2f8c0fcb2938ca3548b9452c4d8eb482e6ffbe5 Reviewed-by: Volker Hilsheimer <[email protected]>
* rhi: vulkan: Avoid VUID-vkQueueSubmit-pSignalSemaphores-00067Laszlo Agocs7 days2-8/+15
| | | | | | | Pick-to: 6.10 6.9 6.8 Fixes: QTBUG-137986 Change-Id: I6e7465c47f20b34a64daa77f5d28271b7c0a73be Reviewed-by: Andy Nichols <[email protected]>
* QQuaternion: make a mutable function-static int[] constexprMarc Mutz7 days1-1/+1
| | | | | | | | | | | | | | | The array, despite being declared mutable, is never modified (and doing so would be a data race if threads concurrently call QQuaternion::fromRotationMatrix(), because it was declared static). Fix by making it constexpr instead. It need not be static, as the compiler will just optimize it away, anyway. Amends ba640a75a5cc9fec63a5204ccf143dbb7f398842. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I0a37f7718b1e79f34d8dd56dc56d951cb8a1d44c Reviewed-by: Friedemann Kleint <[email protected]>
* QIcon: round calculated devicePixelRatio to a useful valueChristian Ehrlicher8 days1-3/+4
| | | | | | | | | | Round the calculated devicePixelRatio to 2 decimals to avoid that the dpr differs for less than 0.1 percent and force a pixmap detach. Pick-to: 6.10 6.9 Change-Id: I51251f2ced9e6e3c3d0c1e80d81b32a573152885 Reviewed-by: Volker Hilsheimer <[email protected]> Reviewed-by: Axel Spoerl <[email protected]>
* Use QPainter::brushOriginF() where appropriateChristian Ehrlicher8 days1-1/+1
| | | | | | | | Replace QPainter::brushOrigin() with brushOriginF() to not loose precision. Change-Id: I86f9e4c3399d32755f0b2b062ad7654149edab1b Reviewed-by: Axel Spoerl <[email protected]>
* QPainter: add brushOriginF()Christian Ehrlicher8 days2-1/+20
| | | | | | | | | | | QPainter::brushOrigin() only returns a QPoint instead QPointF, therefore add a the new function brushOriginF(). [ChangeLog][QtGui][QPainter] QPainter got a new function brushOriginF(). Task-number: QTBUG-137885 Change-Id: I641eab01637ee52aa0ceb7e739151713b5772005 Reviewed-by: Axel Spoerl <[email protected]>
* Reland: CMake: Annotate some qt_find_package calls with MODULEAlexandru Croitor8 days2-51/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A qt_find_package call first tries to find a Config package with the CONFIG mode option, and if not found, falls back to an arg-less mode which searches both Config and Find modules. For some packages, we know we want to find the Find module because there can't be a Config package, e.g our FindWrap modules or any of the other Find modules we carry in our cmake directory. So we should annotate these calls with MODULE. Aside from slightly faster configuration, there is another reason to do so. Future versions of CMake will automatically log find_package calls that have a state change (e.g. Not Found -> Found) into CMakeConfigureLog.yaml. Due to the Config-first logic in qt_find_package, we always unset the Foo_DIR variable if the Config package is not found. This means that there will be a constant build up of not-found messages in the log. Explicitly annotating the calls with MODULE will prevent this. Do that. This commit relands f1a59e974f013fcf8629d8cbacab58d895523100 This reverts commit 0ce82b78a35026cb56ff76d1c24b311008934a53. Pick-to: 6.10 Change-Id: I5d37579d2f4957215ce1475b5c0ec8509d77c83d Reviewed-by: Joerg Bornemann <[email protected]>
* Fix the build QtWayland on macOSLiang Qi9 days1-1/+1
| | | | | | | | | This follows db7b958fb2d82a85ef45eba852cf411ebde852bf and 427e5d61b7b33c8a4cb8da14c1e465244e53cd88 . Pick-to: 6.10 6.9 6.8 Change-Id: I40bf947d69fc134473bccfc4fc346050a180ae2e Reviewed-by: Inho Lee <[email protected]>
* QAccessibilityHints: override QObject::event()MohammadHossein Qanbari11 days2-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 Qanbari11 days2-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]>
* QIconLoader: return an exact match for svg icon theme entryChristian Ehrlicher12 days1-20/+17
| | | | | | | | | | | | | Fix an regression which was introduced with the fix for QTBUG-90634 - when a scalable svg entry or a threshold entry was found then return an exact match instead no match. This amends 7746c3ce6904d188046644ab7fafc64a8e4395d8 Task-number: QTBUG-90634 Fixes: QTBUG-137700 Pick-to: 6.10 6.9 Change-Id: I211b4a082ea8f9ec91157b02845fe272308f6a4f Reviewed-by: Volker Hilsheimer <[email protected]>
* rhi: Add missing docs for srb create functionLaszlo Agocs13 days1-0/+14
| | | | | | Pick-to: 6.10 6.9 6.8 Change-Id: I573d8b95dae7db39f968a8b55aa2adcb14a73fdc Reviewed-by: Andy Nichols <[email protected]>
* rhi: Fix up the docs for image load/store in fragment stageLaszlo Agocs13 days1-18/+3
| | | | | | | | From 6.10 on this is supported. Pick-to: 6.10 Change-Id: Icdd29c5a1fc01d1667e58691a9d689f4c9b0aef8 Reviewed-by: Andy Nichols <[email protected]>
* a11y: Move qt_accStripAmp helper to private QtGui headerMichael Weghorn13 days3-0/+79
| | | | | | | | | | | | | | | | | The qt_accStripAmp helper function takes a string that may contain an accelerator/mnemonic and escaped ampersand characters and returns a "plain text" version of this that is suitable for an accessible name of the widget/control containing that text. Move the helper function to a new private header (and source file) in QtGui in order to be able to reuse this in Qt Quick in an upcoming qtdeclarative commit. Task-number: QTBUG-134208 Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I4dfac2d179baf36101066962b6a5f542b3a6fc03 Reviewed-by: Volker Hilsheimer <[email protected]>
* Revert "CMake: Annotate some qt_find_package calls with MODULE"Alexandru Croitor13 days2-76/+51
| | | | | | | | | | | | | | | | | | | This breaks reconfiguring Qt in various ways, one of which is CMake Error at cmake/QtTargetHelpers.cmake:1557 (message): PkgConfig::ATSPI2 is not a valid target. This happens because pkg_check_modules sets ATSPI2_FOUND to 1, so qt_find_package thinks it shouldn't find the FindATSPI2.cmake module, which ends up not creating the ATSPI2 target. This reverts commit f1a59e974f013fcf8629d8cbacab58d895523100. Pick-to: 6.10 Fixes: QTBUG-137870 Change-Id: Ica74a236c6b1bb9d7ca9af29175cb2e84a93251b Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Joerg Bornemann <[email protected]>
* Deprecate QColormapTor Arne Vestbø13 days1-1/+1
| | | | | | | | | It serves no purpose these days. [ChangeLog] The QColormap class has been deprecated. Change-Id: I3826e0b7e2e2a517c0c0c51d2f61cf0b718fdf33 Reviewed-by: Axel Spoerl <[email protected]>
* iOS: implement file icon providerVolker Hilsheimer14 days4-1/+121
| | | | | | | | | | | | | | | | | | | | | | | | Move the existing QCocoaFileIconEngine into a separate file in the darwin platform code, from where we can use it from both the cocoa and the iOS theme. Refactor the implementation for macOS to create and retain the NSImage as a member of the engine, and cache the QPixmap when it's requested, reusing it as long as it has the correct size. The iOS implementation is similar, except we need to go through UIDocumentInteractionController to get the icons for the file's URL. Explicitly make sure that we maintain the aspect ratio of the image we get. Augment the iconbrowser manual test to generate temporary files with certain extensions, and include those in the UI, allowing us to test that the icons we get from QAbstractFileIconProvider match the file type. Fixes: QTBUG-134239 Change-Id: I8fb63b3c518a6eb200f5948a1c38fd485e3b1c6d Reviewed-by: Tor Arne Vestbø <[email protected]>
* Apple icon engine: define more symbolsVolker Hilsheimer14 days1-2/+3
| | | | | | | | | | | | | | | On iOS, the native icon engine is used for the standard icons of QAbstractFileIconProvider. For File, we map to text-x-generic, and for Network to network-workgroup. Map those to sensible icons from SF Symbols. For the Desktop icon, switch to the same icon that Finder is using for that. Task-number: QTBUG-134239 Pick-to: 6.10 Change-Id: I962809543bcbd1d900c1083ff0bb85b9b7f162f8 Reviewed-by: Tor Arne Vestbø <[email protected]>
* wayland: shm-emulation-server-buffer depends on QT_FEATURE_sharedmemoryLiang Qi2025-06-171-1/+1
| | | | | | | Fixes: QTBUG-137814 Pick-to: 6.10 Change-Id: I9287e4dee622d4dcb1c863207338eecf7a6d9d1a Reviewed-by: David Edmundson <[email protected]>
* QDataStream: use new operator bool() in the codeTatiana Borisova2025-06-171-6/+3
| | | | | | | | | | | - After adding the QDataStream::operator bool(), it is not required to check the QDataStream::status(). It is enough to use the reference of stream in the statement, which returns true if stream status is OK. New operator usage makes code more convenient. Pick-to: 6.10 Change-Id: Ie92658b613484a1e444ab442f8f821458c511079 Reviewed-by: Marc Mutz <[email protected]>
* CMake: Annotate some qt_find_package calls with MODULEAlexandru Croitor2025-06-172-51/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | A qt_find_package call first tries to find a Config package with the CONFIG mode option, and if not found, falls back to an arg-less mode which searches both Config and Find modules. For some packages, we know we want to find the Find module because there can't be a Config package, e.g our FindWrap modules or any of the other Find modules we carry in our cmake directory. So we should annotate these calls with MODULE. Aside from slightly faster configuration, there is another reason to do so. Future versions of CMake will automatically log find_package calls that have a state change (e.g. Not Found -> Found) into CMakeConfigureLog.yaml. Due to the Config-first logic in qt_find_package, we always unset the Foo_DIR variable if the Config package is not found. This means that there will be a constant build up of not-found messages in the log. Explicitly annotating the calls with MODULE will prevent this. Do that. Pick-to: 6.10 Change-Id: I465b015ac18f8a09b9a5c86cec7b6312a0bfbdf1 Reviewed-by: Alexey Edelev <[email protected]> Reviewed-by: Joerg Bornemann <[email protected]>
* QFontIconEngine: prefer code paths using the glyph indexVolker Hilsheimer2025-06-161-10/+9
| | | | | | | | | | | If we can get the glyph index from the named icon, then prefer those code paths when calculating the actual size, and rendering the icon. This produces more consistent results across icons and platforms. Pick-to: 6.10 6.9 Task-number: QTBUG-136176 Change-Id: Ib66019f00ddb7dc0e6df13de654ada734c9efd72 Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
* QFontIconEngine: use the horizontalAdvance when calculating actualSizeVolker Hilsheimer2025-06-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Glyphs used for the icon might have left or right bearing, and we need to include those metrics in the calculation of the actual size of the icon so that QIcon correctly aligns it in the target rectangle when painting. Observed on Windows with the icon used for QIcon::ThemeIcon::DialogInformation; the glyph for \ue946 in the Segoe Fluent Icons font has a right bearing of 18.75, and the icon was rendered too far to the left, truncating pixels. Using the horizontalAdvance instead of the boundingRect includes those values. QFontMetrics doesn't have an API that give us the minimal rect that fits all pixels, or the actual height of a specific text, so use tightBoundingRect.height for the height. Fixes: QTBUG-136176 Fixes: QTBUG-134604 Pick-to: 6.10 6.9 Change-Id: I7c0065c625aa9b01f8eaf770ba13a0995f3df4de Reviewed-by: Eirik Aavitsland <[email protected]> Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
* Doc: Fix links to deprecated functionsDavid Boddie2025-06-161-5/+5
| | | | | Change-Id: I1a8ae38121b3a9880ac67f80133df3c15b9951c9 Reviewed-by: Volker Hilsheimer <[email protected]>
* Doc: Remove redundant "see also" linkDavid Boddie2025-06-121-1/+1
| | | | | | Pick-to: 6.9 6.10 Change-Id: Id48d97a171b55f3dbf8d1fa32e23b82d28e5552d Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
* QRegion: fix potential UB in QBasicAtomic initializationMarc Mutz2025-06-122-4/+1
| | | | | | | | | | | | | | | | | | | | | Until C++17 (inclusive), a default-constructed std::atomic object can, officially, only be initialized with a call to std::atomic_init, for which QBasicAtomic doesn't have API. It is even unclear whether zero-initialization of static and thread-local objects will cause the object to be initialized. QRegion is using QtPrivate::RefCount, but that's just another wrapper around QBasicAtomic, so it has the same problems: it must always be initialized. So don't default-construct and then storeRelaxed() (via initializeOwned()), use NSDMI with (newly-added) Q_REFCOUNT_INITIALIZE_OWNED to avoid this dark language corner. Task-number: QTBUG-137465 Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I4b765aed329211984c35c40fbc5648bf104990ce Reviewed-by: Thiago Macieira <[email protected]>
* rhi: Update the docs and manual test for geometry shadersLaszlo Agocs2025-06-111-10/+11
| | | | | | Task-number: QTBUG-137521 Change-Id: Ic9256eaaa55aef20c622429058fda9235c1f73c1 Reviewed-by: Andy Nichols <[email protected]>
* CMake: build QGnomePortalInterface always when DBus is availableSamuli Piippo2025-06-101-5/+1
| | | | | | | | | | | | | | Builds with DBus but without XCB/Wayland, failed with: qgnometheme.cpp:(.text+0x3ec): undefined reference to `vtable for QGnomePortalInterface' /usr/bin/ld: src/gui/CMakeFiles/Gui.dir/platform/unix/qgnometheme.cpp.o: in function `QGnomeThemePrivate::QGnomeThemePrivate()': Change CMake configuration and build QGnomePortalInterface always with DBus, except on Apple platforms, where it is not needed. Pick-to: 6.10 Change-Id: I3fb6400d87ba08f03c30e33924c8c7d483486c3b Reviewed-by: MohammadHossein Qanbari <[email protected]> Reviewed-by: Axel Spoerl <[email protected]>
* rhi: metal: Handle MSAA backing textures like other texturesLaszlo Agocs2025-06-101-1/+7
| | | | | | | | | | | | | | | | | | ...when it comes to dropping them in the swapchain's createOrResize(). There is no wait for command completion normally, unless the code path that calls destroy() is hit. Therefore, handling msaaTex like the textures behind any normal QRhiTexture is important. Use the deferred release mechanism that QRhiTexture's destroy() would use on its backing textures. This avoids the occasional validation message when resizing Qt Quick windows that have both multisampling and Metal validation enabled. Task-number: QTBUG-112355 Pick-to: 6.10 6.9 6.8 Change-Id: I34549ce47e675d5869239b9330a166b80b40b30d Reviewed-by: Andy Nichols <[email protected]>
* rhi: d3d: Change a warning to categorized loggingLaszlo Agocs2025-06-101-1/+1
| | | | | | | | | | | It is not that important to warn about the DXGI factory being stale when a screen gets connected or disconnected. It is not an error, and happens every time if a screen gets added or removed while the application is running. Pick-to: 6.10 6.9 6.8 Change-Id: I414668dc7aa0279f63fc79799ea53101065ab013 Reviewed-by: Andy Nichols <[email protected]>