summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* no-thread: add QThread::isMainThread() definitionv6.8.26.8.2Morten Sørvig2025-01-231-0/+5
| | | | | | | | | | | | In this configuration there is one thread (as far as Qt is concerned), and that is the main thread. Pick-to: 6.8 Change-Id: I6817961a0f95f2e8b1bb3ea120154d954f1eaf0f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io> (cherry picked from commit 59039f42d863815556a9de05a452f8802c727582) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Update Harfbuzz to version 10.2.0Eskil Abrahamsen Blomfeldt2025-01-2237-1322/+2394
| | | | | | | | | | | | | [ChangeLog][Third-Party Code] Upgraded Harfbuzz to version 10.2.0. Fixes: QTBUG-132855 Change-Id: I542c054ccdc311b17363456c693a2057c2e496c1 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 308ee2738f24d5f01fc8914f071735ad91716947) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit c2e528ef425a68e3904d5989d578fc4a4dfce997) Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* QXRenderGlyphCache: Add QColor parameter for QFontEngineFT::loadGlyphForJonas Kvinge2025-01-211-1/+1
| | | | | | | | | | | Fixes build after commit 39df9e1858a4115bc19b6a4dee5d687c5ee00d21 Change-Id: Ice151b27591470ae81e07953f50e1abf9244ea28 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 55a4c6e9fcb364a899da7dcb4e18f76158e38bb7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit dc4f7e3ffad0a94a59b511b77463cd044c96fe07) (cherry picked from commit 198e8eb68e98f89df4a0f67d3428c9efcb0c1458)
* QMutex: mark the out-of-line, *Internal() methods Q_NEVER_INLINEThiago Macieira2025-01-191-0/+3
| | | | | | | | | | | | | With LTO, I'm seeing GCC conclude that it's best to inline the lockInternal() and unlockInternal() methods into the public ones and then emit out-of-line copies for those. That's actually sub-optimal, so force GCC not to do it. Change-Id: I88c29098757ea6e70c00fffde56989ec05b136bd Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit cc4abefb1db3bdfee0d57ea528d55073a4498b4d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 7920772663b7955b5abd269398d58753caf71248)
* Fix CMYK8888 on big-endian platformsAllan Sandfeld Jensen2025-01-191-4/+4
| | | | | | | | | Fixes: QTBUG-132875 Change-Id: If7e945607125a5ae5ce1f8323df27ab8481e329c Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit 7ad2083ec3cbc9dce949e83465973435d0aa992a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 4d34eee3626a52d56458ffa642126abe5d12d104)
* Move the <version> include from qcompilerdetection.h to qtconfiginclude.hMarc Mutz2025-01-192-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea of b2ed29b8d9b33dcece83000aee28073dd27f1cd9 was to have the contents of <version> (if it exists) available in all Qt headers. Since we broke up qglobal.h into smaller pieces, qcompilerdetection.h is no longer necessarily included by any given Qt header, which thwards the original idea. Try with qtconfiginclude.h, which exists since 61935786c30b0209811fa32f7a02f138da8570b2 (Qt 6.6). For Qt 6.5, we'll need to add it separately to qtversionchecks.h and qtconfigmacros.h, whence qtconfiginclude.h was extracted, as well as keeping it in qcompilerdetection.h, which includes qtconfiginclude.h only since 22029a76c37d8d670479d523684a84f7966ed434. Amends the breaking of qglobal.h into smaller headers, without being attributable to any one of the individual commits that made up the change, or else amends b2ed29b8d9b33dcece83000aee28073dd27f1cd9. Pick-to: 6.5 Task-number: QTBUG-108228 Change-Id: I909196bd767e8d9e016069f1a59994d40e646e59 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 4771dc308785ed132198b2c9a3200b7eb26d683e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 2a5d850e4889913462da644f5146f14acf9633a4)
* Android: Handle dotted URI QML Modules in Java code genSoheil Armin2025-01-181-71/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | A QML module can have URI that include dot character. In this change, we refactor the code generator to create the same hierarchies as a Java package structure. Each QML module URI will be appended to the base application package name to form a package that represents the QML module as a Java package. Then the generated code of each QML component will be placed in a single file. This change, also refactor how to generated code should be written in the file, by buffering the generated code to a QByteArray first, and then flushing it into the target file. We also create a marker file inside the directories of each module, so that we can entirely remove the directory and all its files before generating new code during the next build. Fixes: QTBUG-125891 Fixes: QTBUG-125970 Fixes: QTBUG-125971 Change-Id: Iebce6495d9d29af32c3f1f97274c252444d2864e Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 68785b3e59c8a8f4a383051123b87af3d930ff18) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 8d97598e9c2a53a49b1fc053ab8e23bb8d16d8ee)
* Doc: Add setModel(open) option to the documentationJaishree Vyas2025-01-181-16/+24
| | | | | | | | | | | Changed the Model Dialogs section adding open() function. Task-number: QTBUG-127777 Change-Id: If5086f4e2226c4d032fe1bcfbf2ef550803973c8 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 40f7454c919501f3c984c8fe4eeb379b360d4789) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 423659af18ac3c78bf93a6b6160f863ffe9b82b0)
* Android: Improve qmldir discovery of QML to Java codegenSoheil Armin2025-01-181-5/+23
| | | | | | | | | | | | | | | | | | | Recursively find all qml modules, built by this project. Later, the qmldir of these modules will be used to generated to code. The command line argument -i of qmldom tool had to be replaced with -I. The -i was incorrect as it expects the qmldir file while -I accepts a QML directory to be included. Fixes: QTBUG-125892 Fixes: QTBUG-125970 Change-Id: I4099e488d3d7f4b79566e6ea19eca95f57f7c2fd Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 7ed88eb565d40b195aa868e67777872ef07a5ea2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit b141854d76f062b7674c0d055e0139bd40b3bc4d)
* QTestLog: use the right preprocessor test for C++ featuresGiuseppe D'Angelo2025-01-181-1/+1
| | | | | | | | | | | | Use ifdef, not if, otherwise we trigger -Wundef if the feature is unsupported. Task-number: QTBUG-132900 Change-Id: I8a779da59bf2c7add14ace6405faf19b7ca48c28 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit f04dfa8666662ddefa52a0bd1c8a60be361e4c00) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 4f8e1bf151d35a7265464414be17a3e44c312376)
* Fix the unsupported Q_UNREACHABLE_RETURN statement in constexpr functionsAlexey Edelev2025-01-181-3/+18
| | | | | | | | | | | | | | | | | GCC 8.x does not treat __builtin_unreachable() as constexpr and disallows using the Q_UNREACHABLE_RETURN macro. Guard the statements with the respective checks. Amends b0b34c56a99130bfc9c82cb006653ce6b8f0516e Task-number: QTBUG-125285 Fixes: QTBUG-132804 Change-Id: I88cdbe3bae1a336edc255e3e93e8d948bde253da Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit a57d5b1fd60b6b6848ef8ad9db237941229d7a23) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 09590ee995e551e6e5e38c9a0fb586405d3d4c91)
* SQLite: Update SQLite to v3.48.0Christian Ehrlicher2025-01-184-695/+1282
| | | | | | | | | | | | [ChangeLog][Third-Party Code] Updated SQLite to v3.48.0 Pick-to: 6.5 5.15 Fixes: QTBUG-132862 Change-Id: If22497590dededc7b0c6f5dcc8d6d909f1e032a2 Reviewed-by: Andy Shaw <andy.shaw@qt.io> (cherry picked from commit 952ec8db3a096ddb92e98e408dfe193168efa50a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit d5c3460b412307200ed7448e93e9473ced180675)
* Android: Fix incorrect JNI call from QAndroidItemModelProxy::sibling()Soheil Armin2025-01-171-1/+1
| | | | | | | | | | | | | | | | | The return type of the QtAbstractItemModel.sibling() method is a QtModelIndex Java type. The JNI call from QAndroidItemModelProxy::sibling() is using <jobject> as return type of QJniObject::callMethod(). This will result in a non-matching JVM function signature. This change replaces jobject with JQtModelIndex as the QtJniType. Fixes: QTBUG-132841 Change-Id: If157858f1ed49e25c8fbdfb9bb5c1fc2b7052826 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 190c85b706ee80bc92d6419676dca0dbfa60587b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit bbcf5a419102f1c9d6e96fc8f75edaf20c7a198e)
* Docs: Describe QTextFormat::TextUnderlineStyle propertyAlexei Cazacov2025-01-171-3/+5
| | | | | | | | | | | | | This commit describes the QTextFormat::TextUnderlineStyle, TextVerticalAlignment, and TextOutline properties and their allowed values Task-number: QTBUG-126954 Change-Id: Ib961331d9a06edb2bedf0a6b93afebef0cd467cb Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 0ec4447d7a535e1d593f3a5db94f0dcd98fe61ec) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 813ea954b3e383681c16b90476a81b9d17fb1566)
* Android: Separate JNI initialization from JNI_OnLoadTinja Paavoseppä2025-01-172-62/+108
| | | | | | | | | | | | | | | | | | | | | | | | Currently, we create references to Java classes and objects in JNI_OnLoad. However, that is done only once, when the Android QPA plugin is loaded, and in case we would like to stop Qt entirely and then start it again, we want to reinitialize all these things. Move these initializations to a separate method, and call it before starting the Qt runtime and app. Remove the synchronization block guarder by m_mainActivityMutex in QtNative.startApplication(), as it calls startQtAndroidPlugin() which now will call activity() if the JNI needs to be reinitialized, leading to a deadlock as that method is guarded with the same object. Task-number: QTBUG-130610 Change-Id: I826dfb9b032a6c615f2408d484d1f4f0ea528d02 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io> (cherry picked from commit 9f8e49360c33d5fb8e39322f3abe9544d38baae6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 41047e8b2c1a55a582fc5fd8f793f9473740059d)
* QSet: remove misleading bool comparison with 0Marc Mutz2025-01-171-1/+1
| | | | | | | | | | | Q6Hash::remove() returns a bool, not an integer, like Q5Hash::remove() did. Pick-to: 6.5 Change-Id: Ia2907c7a2a4177f9b5ad05ca1ef3b9a5baa8137a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 441a96ba16794dc8621219be705800480654e9e8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit e54ece9dbb3e05ab0ec36f10b44e0f20af12a624)
* Replace qdebug.h include with forward-declarations in private headersAhmad Samir2025-01-161-1/+2
| | | | | | | | | | | | | Only one header so far. Amends 731538fdd469452e721b568fcbd808b437332008. Pick-to: 6.5 Change-Id: I7449b4f91d8b44f4efab71d4d0fe259022d847a4 Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit 22ab256e37e34988bdd405782ad09bb3eed37bf3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit e26acf0f277e0a05d7df4d45deeb1000b4ce2aea)
* widget: clear WA_OutsideWSRange when needed in QWidgetPrivate::create()Liang Qi2025-01-161-3/+6
| | | | | | | | | | | which follows the behavior in QWidgetPrivate::setGeometry_sys(). Fixes: QTBUG-129698 Change-Id: Ia85e9470111eea9e3392cdf38c3da2db232ef065 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit def4f827da98d3027c86a8dae27811729767d36a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit a46cb99c6903561bafcb9423a0ea88e59e2520c3)
* Every private header should include at least another private headerAhmad Samir2025-01-161-0/+1
| | | | | | | | | | | | To get qversiontagging_p.h included. See: https://codereview.qt-project.org/c/qt/qtbase/+/494388/comment/fed896c4_9e7cae6e/ Pick-to: 6.5 Change-Id: Ifcc7f9cb0ed57f1af9d3283309498546a81fbb17 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 16fc1e07784e294cdd75bbab216c2479ae171221) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 6d0f277a402dfd8c2ae0d810e23e67724f5da5aa)
* Support COLRv1 fonts in Freetype backendEskil Abrahamsen Blomfeldt2025-01-162-0/+805
| | | | | | | | | | | | | | | | | | | | | | | | COLRv1 fonts are not automatically rendered by Freetype, but is currently gaining traction and the default emoji font on Android 15 is in this format. What we get from Freetype is a scene graph that we can render ourselves. This patch implements a recursive renderer for the graph. One current limitations is that conical gradients are not fully compliant with the spec. I have so far not been able to find any fonts where conical gradients are used, so this is left as a semi-supported feature for now. It's certainly not needed for the Android emoji font. Fixes: QTBUG-130909 Fixes: QTBUG-131116 Change-Id: I2484743602ad16f01318ecd6de2b245b38a8f566 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 9e5887a5d4f2344aa5f62325be9d63ff3d8f18db) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 3780e0edc10986a62357cf1db27f99800ba1a05e)
* DirectWrite: Remove ad hoc font resolution through GDIEskil Abrahamsen Blomfeldt2025-01-161-69/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In b8612eaa2a17e12e31ee28141cff1fb43e54c00e, we added a fail safe where failure to find the font name through DirectWrite would try loading it through GDI instead and if that was successful we would register the family with the database after all. However, the code assumed that CreateFontIndirect() would return NULL if the font did not exist. It does not do this, but instead selecting the HFONT on the HDC will give us a suitable alternative instead. The result would be that any missing font family would be registered with the font database through this mechanism, even if it really didn't exist. This code was added in an early version of the patch, however, and it should not actually be needed anymore, since we in later versions of the same patch also added logic to populate the GDI-compatible family names (DWRITE_INFORMATIONAL_STRING_WIN32_FAMILY_NAMES etc.). This should take care of backwards compatibility with the GDI names for fonts. Since the code has been reported to cause problems on some systems, it's safest to just remove this hack. Task-number: QTBUG-130313 Change-Id: I7eca893d17796d9cac07391b7b947d28dd7cd920 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 355f54f7d5dd300c73bf203f12e24305d0e227c1) (cherry picked from commit f5e2166bbd77b9be2fc3a9dfa0660427525d6276)
* QWindows11Style: Make disabled menu item non-selectableWladimir Leuschner2025-01-161-0/+2
| | | | | | | | | | | | | QWindows11Style inherits the stylehint policy for SH_Menu_AllowActiveAndDisabled from QWindowsVistaStyle, although the inactive selection is not visible. This patch makes disabled menu items non-selectable. Change-Id: Ib59988cfad444f9f8203628d4b3e1f72d6775b46 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 3f42d2baacf3d227a001e49d74ea97f7ab551ae1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit a2b68996b28176388b1f41d2cf88617c79fa3f8a)
* Don't include bearing of mid-string characters in max widthEskil Abrahamsen Blomfeldt2025-01-161-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When calculating the maximum width of a text layout, we would add the text width of each substring *after* we had added the negative right bearing of the last character to it. But the bearing of the last character in a wrapped substring does not actually add to the maximum width unless it is the last character of the *whole* string. Prior to 250117086ff15bba79df8f0e15ee66192edc9ea9 this was not noticed, because the last glyph in the substring would typically be a space and the space does not have any bearings (when doing wrapping on individual characters it could still happen). After the change, the previous glyph for which we get the right bearing will be the last non-whitespace glyph. If this happened to have a negative right bearing, we would add this to the max width and end up with a larger max width than we should. This caused a test failure in tst_qquicktext. This test prefers the text width without the bearing (i.e. the *advance* of the substring) unless the line is manually wrapped or it is the last line of the layout. Change-Id: Iba1a5ad48d575683672400f0572dfa683a0f2d9c Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit c08a92307d6d9fa9d9d9a1f301e3f2a65374e99a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 610ee0c5040cac4989a1f624e7678f83668e99a0) Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* WindowsTheme: Draw icon overlay manually instead of relying on the apiChristian Ehrlicher2025-01-161-12/+9
| | | | | | | | | | | | | | | Fix drawing the link overlay icon - we must not set the device pixel ratio here as we don't know the exact value. Also fix some styling issues introduced with the previous commit. This amends fd7bc16e9fbdc63bd22ba90d0c20b36ccffd2bae. Task-number: QTBUG-131843 Change-Id: I382527d17e8187bfae7cf40f352e6f87965671a1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit f4b64f9c12a6351008a08bfeb4540481edf9f1d0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit ce1a9d8bc9535319a1a4ccf8f4df988bfa25f665)
* QHttp2Connection: Fix handling of MAX_HEADER_TABLE_SIZE settingMårten Nordheim2025-01-152-1/+35
| | | | | | | | | | | | | | | | | | | | | | We need to, following the RFC, send a Dynamic Table Size Update using HPack once we have acknowledged the setting as long as the new size is smaller, or if we decide to use the new, larger size. It's further complicated by the fact that we need to send this update on the next 'field block' (anything with headers in it), and we may have multiple SETTING frames come in, and we need to then acknowledge the _smallest_ one as well as the _final_ one. This is so the decoder on the peer's side can know that we have set the smallest size, and trimmed our tables thusly, before going to the larger size. This could, for example, be used to clear the table. Task-number: QTBUG-132277 Change-Id: I2b886e125f2c197bc3d42aa0b2bbd308ed2a687c Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit 57f44d6d882e09f1560f86816fac6ca8d06264fc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 55dc2af21db3059600465b194daf08cacd925e05)
* Tasktree: fix FTBFS due to unique_ptrs on forward-declared classesGiuseppe D'Angelo2025-01-151-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Some classes have circular dependencies: * RuntimeIteration depends on RuntimeTask * RuntimeContainer depends on RuntimeIteration * RuntimeTask depends on RuntimeContainer * TaskTreePrivate depends on RuntimeTask * RuntimeContainer depends on TaskTreePrivate Although there are a few std::unique_ptr deployed, the code at the moment does not fully solve the problem: the classes have an inline destructor, and the dependency has only been forward declared, resulting in a build error. Make some destructors out-of-line, and define them (as defaulted) late enough so that all the graph of classes has been seen, in order to fix the build. Change-Id: If150b92154061e915ebac920806717d2288c0638 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> (cherry picked from commit 71e53405a309684e4adcb8669a5f3d04319ad767) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 3fda22bd8a45bfa5877994962af67e2b6b753043)
* Replace all QPair/qMakePair with std::pair in qtbase/widgetsIsak Fyksen2025-01-1521-131/+134
| | | | | | | | | | | | As a drive-by replace QList::append and operator<< with emplace_back, to avoid repeating value_type. Task-number: QTBUG-115841 Change-Id: I6fb790f959b41b0feb49e3a0f0b6b3631e24a232 Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit 71d114588d9312e89195a32357ec402fc22b062e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 2b2271bea3f94a72adf73aa04395a6b20c404f0e)
* Update bundled libpng to version 1.6.45Eirik Aavitsland2025-01-1529-253/+477
| | | | | | | | | | | [ChangeLog][Third-Party Code] libpng was updated to version 1.6.45 Pick-to: 6.5 5.15 Change-Id: I8e3f7c889608e8071888239ed0b6003911d1a39f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit fd6f593c7ffb67566b8efbe1b657dd7824f3b9e9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit d968aacde10a27d28d236ec62f73fab18d24c522)
* QStringConverterBase: make it move-onlyGiuseppe D'Angelo2025-01-151-0/+3
| | | | | | | | | | | | | | The class declares a protected destructor, which interferes with the RO5. The only subclass in qtbase is move-only; QTextCodec (in Core5Compat) is not even movable. Make QStringConverterBase move-only as well. Change-Id: I20d16df79f7ad8e7e7a8af339954cfa2d1482e96 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit eb533c81b8aa55f89605bb1d091afe4df4db763c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 72d0b8f709c0c73fac6062b5a287ef5630f9b770)
* network/*/removed_api.cpp: include qdebug.h explicitlyAhmad Samir2025-01-151-0/+3
| | | | | | | | | | | | | | Since the removed API uses QDebug. Requested in code review. This is needed for a subsequent commit (removing qdebug.h from public headers when possible), but I split out to its own commit to ease backporting. Change-Id: I76980634b9ebbae7cf010d99f5095aa94a825824 Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit c0fcb2db242a40cdcc2bbfd00332390b64cab439) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 92afa1eaf8783355a2057849e0614342cc4306d4)
* Implement COLRv0 support in Freetype engineEskil Abrahamsen Blomfeldt2025-01-152-23/+68
| | | | | | | | | | | | | | | | | | | COLRv0 fonts are both scalable and in color, which was not previously handled in the Freetype backend because it only supported color fonts with embedded bitmaps. This patch simply correctly detects the scalable color fonts and render them through the same mechanism as other color fonts. [ChangeLog][Freetype] Added support for COLRv0 format color fonts. Task-number: QTBUG-131116 Change-Id: I290e7525c24b4cf2ec872a366e5193f54712a3a4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 39df9e1858a4115bc19b6a4dee5d687c5ee00d21) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 37c389c779188e05bb057d2f7164cba2827d33b6)
* QShortcut: fix build under QT_NO_CONTEXTLESS_CONNECTGiuseppe D'Angelo2025-01-151-0/+2
| | | | | | | | | | | | | | | | | | | QShortcut has a constructor that takes a _parent_ object and a function to invoke, and it will internally connect its activated() signal to that function. This connection will not provide a context object (the parent is not used to this purpose). Given it's not clear what the context should be if any (the parent? `this`?), I'm not at ease at just supplying "something" as the context. Instead, hide the constructor if we're under QT_NO_CONTEXTLESS_CONNECT. There's another constructor where the caller can supply a context. Change-Id: I21befcc86eeb07e65eadee1222757ecc5bab1d2c Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit ade3bb1c5224a9155a2a2f965fa70740aa9ec8a7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit c82464ea754e0345859abb54f31b636541669f0b)
* Windows11Style: Misc cleanup for drawControl(CE_ItemViewItem)Christian Ehrlicher2025-01-151-34/+50
| | | | | | | | | | | | | | | | Cleanup CE_ItemViewItem branch in drawControl(): - use local rect instead rect, vopt->rect or option->rect for consistency - move out viewItemPosition comparisons into local booleans - fix coding style - merge two QPainter::drawLine() calls into one Task-number: QTBUG-131585 Change-Id: I7cd2f96a2a733a55d5e7fb5956c59bd043317cb2 Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io> (cherry picked from commit 44edab7c84be101025dc6f9a74f87944ea3a22e9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 37effa5dd3b7345ceff38f55ce5b563d2748962c)
* QStandardItem: correctly set model during insertRows()Christian Ehrlicher2025-01-151-2/+1
| | | | | | | | | | | | When calling insertRows(), the model of the child items was not correctly updated. insertRow() is behaving correctly. Fixes: QTBUG-131372 Change-Id: I8b6aef7ab97887c6eb46eb21b992d76e4d59b3a0 Reviewed-by: David Faure <david.faure@kdab.com> (cherry picked from commit 5bab8448feb2661f871e71d71a95afaffcb1656a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 3536eb32bf7e6b177fe600256dc9efd0ff653e36)
* Windows11 style: fix drawing horizontal progressbar in rtl modeChristian Ehrlicher2025-01-151-0/+2
| | | | | | | | | | | | | | | The progressbar content calculation assumes that subElementRect(SE_ProgressBarContents) returns a rect at 0/0 which is not the case for progressbars in rtl mode. Fix it by moving the topLeft edge to 0/0 and translating the painter accordingly Task-number: QTBUG-132459 Change-Id: I614589c9094b0da3c02867b45570d4dfdca61a18 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit 314a5b972646a4f2ef9c1f49ddfd335f546336ab) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit bf535c4c66b8d39e7c9a067155bdf2f6ea26a924)
* Windows11Style: enable mouse tracking for QTableViewChristian Ehrlicher2025-01-151-0/+2
| | | | | | | | | | | | | Mouse tracking is needed for windows 11 style since it is using QStyle::State_MouseOver to draw the cells. Fixes: QTBUG-129242 Change-Id: Ib79ac5a8c14ac8c70365e87120f80b4e4ee4c5b9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit 85333b3d8cb89bf58c6c6c0db7c3db5c95b4cbfc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 5ff8c2eb00aedc3fec76fe63e4914a6b4e5f32bd)
* QIcon: don't search for high-res svg iconsChristian Ehrlicher2025-01-151-0/+3
| | | | | | | | | | | There is no need to search for high-res svg icons - a svg scalable by design. Also the QSvgIconEngine does not support it. Change-Id: Ib76c887900ce77268e9c0253cb697b8de9e7f10e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit c64774eef72411029f7c2fb611328f25b83ff8ca) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 2bb83f6b16d08d2c30bc6fbb226ad8033f312e88)
* Draw icon overlay manually instead of relying on the apiMorteza Jamshidi2025-01-151-10/+21
| | | | | | | | | | | | | Even with SHGSI_LINKOVERLAY flag set, loaded Icon with SHDefExtractIcon doesn't have any overlay, so we draw it manually. Fixes: QTBUG-131843 Change-Id: Iae4c2da12104a361b9a8cf05c78adcdb698f1f82 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> (cherry picked from commit fd7bc16e9fbdc63bd22ba90d0c20b36ccffd2bae) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 59861df8ce4c7c69cdf1c7a8738eeac81ff2d8c2)
* Windows: Add Key_Backtab as possible key combination for Shift+TabMorteza Jamshidi2025-01-151-0/+5
| | | | | | | | | | | | | In windows Backtab key event always comes as "Shift+Backtab". So in order for Backtab key to be recognized as a shortcut sequence, we also consider Backtab without shift modifier a possibility. Fixes: QTBUG-94890 Change-Id: I20a7b404b57d8df5bea23765257a178f2e098ed0 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit 4d9f99c4ea70cdae58c80e1bfdbabefe3abb455f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 6d8afaac84f995cfb008bd2d3eb59fe4fe10dd69)
* Android: improve fullscreen and maximized states handlingAssam Boudjelthia2025-01-147-76/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rework fullscreen and maximized/expanded states handling by simplifying and re-organizing the code, removing some unnecessary code. Also, use newer APIs and handling the cutout regions. For expanded mode, use transparent instead of translucent so that the user can decide what color to use if needed, and in any case using the translucent flags is deprecated. You might still notice some artifacts as in QTBUG-88676, a fix for that is outside the scope of this patch. When going off of fullscreen mode one some cases you might notice a white/black black at the bottom and that's because QtRootLayout.onSizeChanged() is reporting wrong available size which is also an existing issue and outside of this scope. Fixes: QTBUG-96105 Fixes: QTBUG-101968 Fixes: QTBUG-127394 Fixes: QTBUG-121820 Task-number: QTBUG-109878 Task-number: QTBUG-119594 Change-Id: I586775a1d0414ec0adbc968d50b9c1a1ce466422 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 0abcb9bef8a7cb85df006adfed51bc9258868ed2) Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
* Android: move setSystemUiVisibility() to QAndroidPlatformWindowAssam Boudjelthia2025-01-144-20/+15
| | | | | | | | | | Move calls for handling system UI visibility to QAndroidPlatformWindow where they belongs. Change-Id: I3802cf9d205ee6678f71b787c5ea4804d3aaeb29 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit a2385e5c9dc9b07cb43264bf0309a80992f80ad8) Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
* Android: check Qt::ExpandedClientAreaHint when setting sizeAssam Boudjelthia2025-01-141-1/+1
| | | | | | | | | | | | No need to also check for Qt::WindowMaximized, if we're using Qt::ExpandedClientAreaHint, we would expect the full size to be used. Fixes: QTBUG-110878 Change-Id: I52db0224aa96409a8f2d984e01192001f9b42440 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 10805e7d8af0bcbcba12bc896a01d645e1648741) Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
* Android: Fix synchronization issue of QtAbstractItemModel and its proxySoheil Armin2025-01-142-27/+38
| | | | | | | | | | | | | | | | | | | | | | | | | Java methods of QtAbstractItemModel may get called from Qt GUI thread or Java main thread. Situation is the same with internal proxy methods, where they may directly or indirectly called from these two thread. At the same time, a chain of calls may happen from these threads, so some functions may get called indirectly from a single caller thread. In this change, we are adding a map of QObject* to QRecursiveMutux where the QObject is a QAbstractItemModel, either the proxy instance or a reference to an underlaying QAbstractItemModel when the model is implemented in C++. Each call to any function locks the QRecursiveMutux instance associated with the QAbstractItemModel instance. A connection from QObject::destroyed to a lamda, helps to remove the map entry when the model is destroyed. Fixes: QTBUG-127467 Change-Id: I18dcdc207e201b3883526648b4e672e5868ed8ab Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit bf76387507dde71063ebe484bce1e7d1b8e09bc2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 2b14b70b435fa1120dee3f08a1377aa26016d2b5)
* Android: fix warnings about Class raw type usageAssam Boudjelthia2025-01-141-2/+2
| | | | | | | | | | Using Class<?> fixes the warning. Change-Id: Ia65aa78509c41d041970631dc21c8dd72459e674 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io> (cherry picked from commit f342f27a0cc6c82f9503c0002b6fd32cb3ada3c3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit aae66d751896a0015e50f685af4f173626c0e397)
* Android: add android test runner docs to the buildAssam Boudjelthia2025-01-141-0/+1
| | | | | | | | | | | Amends 5735d7ac861fe99a71d8044977e5f487c401ca12. Task-number: QTBUG-84330 Change-Id: Ie78f88cf84376c08e44d887b09d116845882788b Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> (cherry picked from commit 1fb369211e3e477de8531485a33241d5d99b7a21) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit a892eb50d3e0238d0d9508460dd4e88762622c59)
* Remove constexpr from a function that doesn't need it, and assertsEdward Welbourne2025-01-141-4/+4
| | | | | | | | | | | | | | | | | | | The call to q_assert() isn't constexpr, so can't happen in a constexpr function. Most compilers shrug this off as they can see the code actually is unreachable, but apparently debug builds on QNX can't work that out. Since nothing actually needs the function to be constexpr, remove that qualifier. In the process, move the offset-case, which is also unreachable, to the end of the switch, closer to the unreachable end of the function (since I failed to spot that there were two unreachable parts at first). Fixes: QTBUG-132698 Change-Id: Ibdde7abd91d284e1c1af53e2b5e142fc234400a8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit 2578d72a7cb9b784a00efb04df6a31496d92dcdc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit cf9e8434eb1d6cb527f8f216c4c37c14cf713690)
* QThreadStorage: move includes to the topIvan Solovev2025-01-141-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The qthreadstorage.h header contains two implementations controlled by the QT_CONFIG(thread) definition. Commit 8553ffd8d147ecf6a713d12a360027b477dd59c8 changed the positions of the namespace macros in the header, but didn't consider the fact that we now include std and Qt headers inside QT_NAMESPACE in the !QT_CONFIG(thread) case. Fix it by moving all the includes to the top, and wrapping them in the needed QT_CONFIG() checks. As a drive-by, drop the unused type_traits include. Found in Qt 6.9 API review, but picking down to 6.5, as that's what the original commit did. Note that 6.5 cherry-pick will require to replace <memory> with QtCore/qscopedpointer.h because 6da1f72311b844b2232da3067ad6e1e24614e67c was never picked to that branch. Pick-to: 6.5 Change-Id: Ic9c5fe82df38a3bd64829c016de8dcbd9f060315 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 4a6ef7fc6881c7b5ab0b9f6d51a2738ce86cca93) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit be31cbfce87294a6e59e472bd7efa96dfb7a40a4)
* Update CLDR to v46Mate Barany2025-01-148-11521/+11476
| | | | | | | | | | | | | | | | | | | | | | | | | | | New languages added with v46 - Kara-Kalpak - Swampy Cree Several new Chinese-language locales have been added, including one using Latin script, which invalidated some prior QLocale tests, which have been adjusted to fit. Some obsolete time-zone identifiers are now treated as deprecated aliases. These have lost their AnyTerritory association, implying changes to QTimeZone tests. Many redundant likely sub-tag rules for unspecified language have been dropped, in favor of simpler rules. [ChangeLog][Third-Party Code] Updated CLDR data, used by QLocale, to v46. Task-number: QTBUG-130877 Change-Id: I92cf210422c7759dd829a7ca2f845d20e263d25b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit e316276b76b9c3768ca4e19a04d03308ef21fe12) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 9413c19cc1f394bc39a9f46d7d12a71fb42c8d1a)
* Require that the handle type used with QUniqueHandle is quite noexceptJøger Hansegård2025-01-141-0/+14
| | | | | | | | | | | | | | | | | QUniqueHandle is intended for handle types or opaque pointers that are no-throw constructible, copyable, and assignable, and has nothrow comparison and relation operators. This patch ensures that this holds true, and makes most of the QUniqueHandle noexcept specifiers valid. This will make it easier to implement the comparison and relation operators in terms of the Qt comparison framework. Task-number: QTBUG-132507 Change-Id: Id9fc3fac72a2337541e49c3b4613b8fd082796af Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 49f1877bbbb8f96d81144861558bdcc81e758a58) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit bded4bd5fcb319eb1e95f61a3b6bb80f555279a8)
* Implement QUniqueHandle move assignment using MOVE_AND_SWAP macroJøger Hansegård2025-01-141-5/+13
| | | | | | | | | | | This removes boilerplate and the extra complication of std::addressof. Task-number: QTBUG-132507 Change-Id: I07091ec0ac526975cf55361a9811fad77eb152c2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 30ae70a110ee2460744e4fb78bae29b75effbf72) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 11abd8704650cf09d8259adc58fa7f7a2ccaa2ed)