summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Widgets: add enum values to QStyleOptionViewItem::ViewItemFeatureChristian Ehrlicher2025-01-204-6/+17
| | | | | | | | | | | | | | Add two new enum values: IsDecoratedRootColumn: notifies the style that the current cell also contains place for the tree column branch indicator so it can e.g. properly draw rounded edges in a cell or complete row. IsDecorationForRootColumn: the item contains the information to draw the tree column branch indicator. Pick-to: 6.9 Task-number: QTBUG-131585 Change-Id: Iee2823fe3a227630f926d0448095a10fad2b0ba7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Windows11Style: don't set minimum width for QAbstractSpinBoxChristian Ehrlicher2025-01-201-15/+0
| | | | | | | | | | | There is no need to set a minimum width for QAbstractSpinBox in QWindows11Style::polish() as this might override the user preferences. Also the minimum size handling is now properly done within sizeFromContents(). Pick-to: 6.9 6.8 Change-Id: Ibc1fd7a6f862fc85e3739025b9de581aa235d74c Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
* QMimeType::comments(): skip locale-name-trimmingEdward Welbourne2025-01-201-7/+0
| | | | | | | | | | | | | | | | Pruning the part of a locale name after the first '_' should now be redundant, as QLocale::uiLanguages() now includes the resulting truncations. It may do so later in the sequence than the pruning used here, where the pruned version either might be a bad choice (due to being in a script incompatible with what we started on, e.g. pruning pa_PK to pa, which uses a different script) or would also arise from some later, more specific, entry (as when uiLanguages() is expanded from {en_NL, en_150}, where checking en immediately after en_NL would bypass the more specific en_150 when present). Pick-to: 6.9 Change-Id: I4c7c199ca16a8e4803843547c5a689cea11af1f2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Fix typo in in scope resolution operatorAndreas Eliasson2025-01-201-2/+2
| | | | | | | Fixes: QTBUG-132911 Pick-to: 6.9 6.8 6.7 6.5 Change-Id: Iaa7c4830abd273ccfe558e089da5072a83607f26 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
* Docs: remove \internal in the docs for encodeMetricF()David Faure2025-01-201-2/+0
| | | | | | | | | | The documentation for QPaintDevice::PdmDevicePixelRatioF_EncodedA refers to encodeMetricF() which was nowhere to be found in the documentation because it was marked as internal. Pick-to: 6.8 6.9 Change-Id: I37707bc641d359f367f77c958043b6dfa33d4dcb Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* iOS: Fix rotation zero for standard Apple Pencil (not Pro)HIDAKA Takahiro2025-01-211-1/+1
| | | | | | | | | | | Since standard (non-Pro, 1st gen, 2nd gen, and USB-C) Apple Pencils do not support rotation (barrel roll), the rotation value should be set to zero. Task-number: QTBUG-128467 Change-Id: I33511c39cab1fb14a2ef622ab98ce49eb95f3295 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Avoid dangling d-pointer deref in QWidgetWindow::handleMouseEventShawn Rutledge2025-01-201-0/+8
| | | | | | | | | | | | | | | | If you drag-and-drop a OpenGLWidget in Designer, the main window gets re-created when the OpenGLWidget is instantiated. So in general (in rare cases), at the end of QWidgetWindow::handleMouseEvent() we might have a different window, and therefore can't reliably call QWindowPrivate::maybeSynthesizeContextMenuEvent() without checking for a valid pointer. Amends 84a5f50c7766c99f62b22bb4388137e0aa8dd13d Pick-to: 6.9 Fixes: QTBUG-132912 Change-Id: I7b220b4daceab988aadabf9427ef6b2d5624e00d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* TinyCBOR: prevent a -Wundef warningGiuseppe D'Angelo2025-01-201-2/+2
| | | | | | | | | | Follow the same "pattern" as for the rest of the #if directive: first test if a macro is defined, then test the value. Otherwise the code triggers a -Wundef when building in C++. Task-number: QTBUG-132900 Change-Id: Icc838bf8dfafed1ab317ff70cb19559b72b22dc9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Replace qt_record_extra_qt_package_dependency with ↵Alexey Edelev2025-01-201-2/+2
| | | | | | | | | | | | | | | | | qt_register_target_dependencies qt_register_target_dependencies does the same thing as qt_record_extra_qt_package_dependency but in more convenient way. Update the qt_register_target_dependencies signature and adjust naming, it now accepts PUBLIC and PRIVATE multi-value arguments and called qt_internal_register_target_dependencies. Use it and deprecate qt_record_extra_qt_package_dependency. Pick-to: 6.5 6.8 6.9 Change-Id: I0594cf699ec1e3af7210dd7450fa3f81c1f565ae Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Android: JNI: Use void as default return value type on call[Static]MethodPetri Virkkunen2025-01-201-10/+10
| | | | | | | | | | By using void as default template argument in callStaticMethod and callMethod, we can avoid having to type <void> after every void method call, while still allowing the caller to remain explicit about the type if they want to. Change-Id: Id7143d1116364be7699712d1fead257f26f20420 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QFile::rename: error out if overwrite fails when changing case on ↵Mårten Nordheim2025-01-201-0/+7
| | | | | | | | | | | | | case-insensitive filesystems The generic copy-and-remove fallback will first open the original file with a different case, truncate it, and then remove the original file. Leaving us with no file at all. Task-number: QTBUG-132785 Pick-to: 6.9 6.8 6.5 Change-Id: Ia5a41d26c1d6d6bdc231c71acf15bd2ea496c715 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Request actual font family request in final color font fail safeEskil Abrahamsen Blomfeldt2025-01-201-0/+5
| | | | | | | | | | | | | | | | | | | | | | When we're trying to resolve a font for color emojis, we will prefer any color font over the selected font (since a normal font may have monochrome glyphs for emoji characters and that's not what we are after). If there are no color fonts on the system at all, we need to do a final match where we ignore whether the font is in color or not and just return it anyway. In this final pass we would find the first best match among the fallbacks (typically the first one), but never actually check the font that was requested in the first place. This was a mistake. Unless it does not exist, we should just return the requested font family. Pick-to: 6.9 Task-number: QTBUG-132377 Change-Id: Ie53a6bd665ebdaaca92bf0c33fabf5195e1aa5fe Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* AndroidDeployQt: explitly constuct the qmlDomCommand args listAssam Boudjelthia2025-01-201-9/+6
| | | | | | | | | | | | | Construct the arguments list explicilty to QStringList to avoid calling QProcess::splitCommand() and potentially splitting a path with spaces that shouldn't, this also saves from having to deal with shell quotes. Fixes: QTBUG-132891 Pick-to: 6.9 6.8 Change-Id: I48f6c219830269c507f146b654bcfa025f0e3203 Reviewed-by: Olli Vuolteenaho <olli.vuolteenaho@qt.io> Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io> Reviewed-by: Soheil Armin <soheil.armin@qt.io>
* FontConfig: Fix detection of color fontsEskil Abrahamsen Blomfeldt2025-01-209-1/+36
| | | | | | | | | | | | | | | | | There were two mistakes in the code that intended to detect if a specific font was a color font in the FontConfig database. 1. The "int n" parameter in FcPatternGet*() is not an array size, but an index, so it should be 0 and not 1. 2. We need to add FC_COLOR to the list of properties in our pattern when populating the database, otherwise we will just fail to match it and none of the system fonts will be listed as color. Pick-to: 6.9 Fixes: QTBUG-132377 Change-Id: Ib3c112e8a354abacd05679c62283a1f1abfb40ee Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* QThreadStorage: remove unused moc-skipping guardsThiago Macieira2025-01-192-12/+3
| | | | | | | | | | | | | | | | QT_MOC_CPP is not the same as Q_MOC_RUN, which moc's preprocessor still sets. It appears Qt 3's qmake set it when ALLMOC_HEADER was set... a feature that doesn't appear in Qt 4 (but exists with cmake_automoc). MOC_SKIP_{BEGIN,END} appears in Qt 3's moc, but not in Qt 4's. But they weren't in qthreadstorage.h at the time, so I guess they were added in the 4.0 development cycle when QThreadStorage changed, but before moc was rewritten (which deleted the Qt historic repository's oldest file, moc.l). Pick-to: 6.9 Change-Id: Ibfff778c9f4d17af006dfffd8545fb24b495ecdd Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
* QThread/FreeBSD: remove the unnecessary Linux compat layerThiago Macieira2025-01-191-9/+0
| | | | | | | It's now in the FreeBSD headers themselves, so we don't need our own. Change-Id: I136aa8018a2c02f70ab8fffd484f07f287ca0305 Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
* QXRenderGlyphCache: Add QColor parameter for QFontEngineFT::loadGlyphForJonas Kvinge2025-01-191-1/+1
| | | | | | | | Fixes build after commit 39df9e1858a4115bc19b6a4dee5d687c5ee00d21 Pick-to: 6.8 6.9 Change-Id: Ice151b27591470ae81e07953f50e1abf9244ea28 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* QMetaType: use the heterogeneous lookup feature of QHash when possibleThiago Macieira2025-01-181-1/+8
| | | | | | | | | | This probably doesn't make a difference because QByteArray::fromRawData is inline, does not allocate memory, and (as of the last commit) noexcept. As an beneficial side-effect, we get to test that feature in QtCore's own build. Change-Id: Ifd19cfdba83064bbf4d3fffdd032622ec102e234 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QtTypeTraits: fix order of the includesIvan Solovev2025-01-181-5/+4
| | | | | | | | | | | Amends 08c6cc62c743e172fbf064ccaad1159b2a1fb850. Found in Qt 6.9 API review. Pick-to: 6.9 Change-Id: I1ed29a913e34ecf093a98c2053c319f0edfb9135 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QCoreApplication: remove the indirection to {app,manual}_libpathThiago Macieira2025-01-181-39/+56
| | | | | | | | | | Instead of storing a pointer to a QStringList to indicate whether the list was populated or not, use the QList's d-pointer. Unlike QString and QByteArray, QList does not have isNull(), so we roll out our own. Pick-to: 6.9 Change-Id: I6903de324c8215ed4934fffd9d997a34f2e7fa99 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QCoreApplication: move the QRecursiveMutex into QCoreApplicationDataThiago Macieira2025-01-181-7/+8
| | | | | | | | | | | There's no need for it to be a global, if the data isn't either. I have a vague recollection of the data also being globals back in the day... (they used to be plain QStringList pointers). Pick-to: 6.9 Change-Id: Ie5f1a71d0b20a0195822fffd992101c94824a07f Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QMutex: mark the out-of-line, *Internal() methods Q_NEVER_INLINEThiago Macieira2025-01-181-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. Pick-to: 6.9 6.8 Change-Id: I88c29098757ea6e70c00fffde56989ec05b136bd Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix CMYK8888 on big-endian platformsAllan Sandfeld Jensen2025-01-181-4/+4
| | | | | | | Pick-to: 6.8 6.9 Fixes: QTBUG-132875 Change-Id: If7e945607125a5ae5ce1f8323df27ab8481e329c Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Move the <version> include from qcompilerdetection.h to qtconfiginclude.hMarc Mutz2025-01-182-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.9 6.8 6.5 Task-number: QTBUG-108228 Change-Id: I909196bd767e8d9e016069f1a59994d40e646e59 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: fix linking issue in QHeaderView; reflowVolker Hilsheimer2025-01-181-10/+10
| | | | | | | | | | | | | | QHeaderView has no resizeMode property, only a ResizeMode enum type that is then used in the sectionResizeMode API. Fix that reference, reflow the paragraph, and apply some light editing. Amends 9e3a96189d9db8a458e65cd5078509afe7a160db Pick-to: 6.9 Change-Id: I240c3f64fd45c96f4d3ba95c2086a638468e137f Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* rhi: remove code duplication in QRhiResourceUpdateBatchPrivateAurélien Brooke2025-01-181-10/+2
| | | | | Change-Id: I22ae50d9fbc2f446e819c9d5f740946808bbdfce Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Testlib: wrap cycle_p.h headerGiuseppe D'Angelo2025-01-186-3/+27
| | | | | | | | | | | | | The header triggers compile warnings -- -Wundef, to begin with. Since it's included from multiple places, we either fix the header or wrap it. The header isn't maintained upstream (we actually keep patches "on the side"), so I'll go with the wrapping option, and suppress -Wundef in there. Task-number: QTBUG-132900 Change-Id: I8fdd32fa2ec1cde83ef28945259bce836439f73f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QLoggingCategory: fix -WundefGiuseppe D'Angelo2025-01-181-1/+1
| | | | | | | | | | We want to test if QT_BUILDING_QT is defined, so use the right construct. Pick-to: 6.9 6.8 Task-number: QTBUG-132900 Change-Id: Iac26f70021a337a2c476618979b4b8eb180ffd3b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* 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. Pick-to: 6.9 6.8 Task-number: QTBUG-132900 Change-Id: I8a779da59bf2c7add14ace6405faf19b7ca48c28 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Android: remove unused scaled density propertyAssam Boudjelthia2025-01-184-13/+4
| | | | | | | | This value is used by nothing throughout the Qt Android code. Task-number: QTBUG-132716 Change-Id: I694d016131b7eccd9ea5789e77f0501676a7f21a Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
* Android: remove unused top/left inset params of setDisplayMetrics()Assam Boudjelthia2025-01-183-30/+12
| | | | | | | | | Those two params are already marked as unused, so there's no point in calculating them passing them and then not using them. Task-number: QTBUG-132716 Change-Id: I840473a42ac4256164252df805b52b859d2fa3de Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
* QWindowPrivate::maybeSynthesizeContextMenuEvent: preserve spontaneityShawn Rutledge2025-01-181-1/+1
| | | | | | | | | | Call QCoreApplication::forwardEvent() rather than sendEvent() to ensure the QContextMenuEvent is spontaneous if the mouse event is. Pick-to: 6.9 Fixes: QTBUG-132873 Change-Id: I6198c2105210d2841f43ef81a9be0f917272846f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QJson: Remove QT_JSON_READONLYThiago Macieira2025-01-179-17/+9
| | | | | | | | | | | moc (and thus the bootstrap library) has needed JSON output since Qt 5.15 (commit da284ef10e0ef80776b9fc9b7bb0e6dc8d71ba63 "Add support for machine-readable JSON output to the MOC"). Pick-to: 6.9 Change-Id: I4b8cf51c092eb35cc383fffd48d120f0cb2c56b0 Reviewed-by: Ahmad Samir <a.samirh78@gmail.com> Reviewed-by: Johannes Grunenberg <nerixdev@outlook.de>
* JNI: handle narrowing before creating a new Java stringVolker Hilsheimer2025-01-172-6/+12
| | | | | | | | | | | | | | | Emit a warning if the string we get is too large for Java, and cast the size to jsize before calling JNI. For consistency, replace the Q_ASSERT in QJniArray's size check to use the same logic. Addresses header review comment; code was not handling this case before it got moved into the inline helper either. Pick-to: 6.9 Change-Id: I00d68509be8b5f7304dda2e824fa0ced0f8f8d48 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Fix the unsupported Q_UNREACHABLE_RETURN statement in constexpr functionsAlexey Edelev2025-01-171-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 Pick-to: 6.8 6.9 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>
* Fix docs for new QDebug streaming operators of std containersIvan Solovev2025-01-172-1/+13
| | | | | | | | | | | | | | | | Added the missing function declarations to the #if Q_QDOC part of the header. Also fixed a typo in the std::unordered_map docs. Amends 850d4895be565931d18c92e5e2f9a33b7f26de6d, 0c96528e8d43ad4309bdca14b179a5045984655a, a9fe57fefaac0cb047e4c02e0b8c8f8327e0a58c, and a8c9a5617c72ad2e55bf497df6ff2c2e141cbdef. Found in Qt 6.9 API review. Pick-to: 6.9 Change-Id: I792023b506e2afdbdca4bca3197887e50c98a788 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Provide docs for std::array QDebug streaming operatorIvan Solovev2025-01-171-0/+9
| | | | | | | | | | | Amends b294927a1270f7d0c5aaf0bbe93b617ac995e149. Found in Qt 6.9 API review. Pick-to: 6.9 Change-Id: Iab64d52c506030dd755d61edc376bb47865478ff Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Fix doc warningVolker Hilsheimer2025-01-171-1/+2
| | | | | | | | Amends 4d31372a869d6734258eb7c081375581b367759e. Pick-to: 6.9 Change-Id: I685a0687e8519f92602857a8259260e3b081864d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Android: Handle dotted URI QML Modules in Java code genSoheil Armin2025-01-171-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 Pick-to: 6.8 6.9 Change-Id: Iebce6495d9d29af32c3f1f97274c252444d2864e Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: Improve qmldir discovery of QML to Java codegenSoheil Armin2025-01-171-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 Pick-to: 6.8 6.9 Change-Id: I4099e488d3d7f4b79566e6ea19eca95f57f7c2fd Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* QCommandLineParser: convert MessageType to enum classIvan Solovev2025-01-172-10/+10
| | | | | | | | | | | Amends bad618606d64e943e3fa78e7d1dbc8e1fab55480. Found in Qt 6.9 API review. Pick-to: 6.9 Change-Id: I424fc1f80e36343f1aef4b05c551579ec0f04eba Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Add setModel(open) option to the documentationJaishree Vyas2025-01-171-16/+24
| | | | | | | | | Changed the Model Dialogs section adding open() function. Task-number: QTBUG-127777 Pick-to: 6.8 6.9 Change-Id: If5086f4e2226c4d032fe1bcfbf2ef550803973c8 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QLocale::uiLanguages(): only QString-ify the locale names we do addEdward Welbourne2025-01-171-18/+22
| | | | | | | | | | | | | We can test whether the candidate is already in the list by exploiting the comparison of QLatin1StringView with QString (and related QStringList::compare() overload), so we don't need to convert the QByteArray to QString unless we're actually going to add it. (This does lead to the prior name being converted twice, but the second of these is about to go away.) Change-Id: I8e47cbb4c9e44ad8ef13d04e930a4619845418ef Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* SQLite: Update SQLite to v3.48.0Christian Ehrlicher2025-01-174-695/+1282
| | | | | | | | | [ChangeLog][Third-Party Code] Updated SQLite to v3.48.0 Pick-to: 5.15 6.5 6.8 6.9 Fixes: QTBUG-132862 Change-Id: If22497590dededc7b0c6f5dcc8d6d909f1e032a2 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* QCoreApplicationPrivate: move translation NSDM to improve packingThiago Macieira2025-01-161-6/+5
| | | | | | | | | This way they aren't in the middle of a block of booleans. Pick-to: 6.9 Change-Id: Iba067f6f23db7c059cddfffdc27231dd09b6898e Reviewed-by: Ahmad Samir <a.samirh78@gmail.com> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* QCoreApplicationPrivate: make the type member 8 bitsThiago Macieira2025-01-161-1/+1
| | | | | | | | So it packs better with the booleans around it. Pick-to: 6.9 Change-Id: I330164b99fcbbf9e9629fffd52bcbb38bec4ac0e Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* QMessagePattern: merge and improve %{time}-printing codeThiago Macieira2025-01-161-6/+10
| | | | | | | | | | | | | All modern compilers implement divisions and modulus via multiplications and shift, so the codegen is practically the same (three multiplications in total). But the new code allows more than 136 years of uptime (49710 days). Drive-by fix indentation in nearby line. Pick-to: 6.9 Change-Id: Iea806bd7dfac1f852c66fffd41c2ac6660e7cc65 Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
* QMessagePattern: replace Q{Elapsed,Deadline}Timer with std::chronoThiago Macieira2025-01-161-8/+6
| | | | | | | | | | There's nothing wrong with those two, but we don't need the middle men to the monotonic clock. This also reduces the sizeof QMessagePattern by one quint64 (QElapsedTimer is 16 bytes in Qt 6). Pick-to: 6.9 Change-Id: I0eb171f03ee8f3a7148bfffd5534a7f3daba3a01 Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
* QMessagePattern: add Q_ASSERT to setDefaultPattern() and improve codegenThiago Macieira2025-01-161-3/+9
| | | | | | | | | | | | | | Amends commit e04f109456bbcb184963b8ed71944b958b35c201. This function does not free the pointers stored in literals, so add a couple of assertions to indicate that it's only safe to call from the constructor. And that being the case, we can update the tokens unique_ptr in two steps, which makes the compiler not attempt to call delete[] on the previous pointer. Pick-to: 6.9 Change-Id: Ibe76a7df795e9c6d6191fffdf45e3b3ef6f0f344 Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
* Bootstrap: disable the entire convert/view QMetaType codeThiago Macieira2025-01-161-35/+6
| | | | | | | | Nothing is using it and this greatly simplifies the code, both for the bootstrap build and for the maintenance of QtCore. Change-Id: I5c48d16ccdd468834a80fffdf6ec94d06ae655dd Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>