summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* QWindows11Style: Draw ScrollArea opaque in QAbstractItemViewv6.7.0-rc1Wladimir Leuschner2024-03-071-15/+4
| | | | | Change-Id: Ica2c62355a576dda4eaefacbc41b8609009d0073 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* QWindows11Style: Update font size in menubar items and spacing between itemsWladimir Leuschner2024-03-071-3/+14
| | | | | | | | | | | Reduce the spacing between menu bar items and change font size to 10pt. Fixes: QTBUG-120639 Change-Id: Ic16e74f4a2426be6d6ef40904919d92785d96ce5 Reviewed-by: Robert Löhning <robert.loehning@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit f75e554c6af7ea00bb5e6aa62a2af26350b67d98)
* Android: Resize QWindow when its QtView is resizedTinja Paavoseppä2024-03-073-1/+26
| | | | | | | | | If the Android View is resized, the QWindow instantiated by it should be resized accordingly. Task-number: QTBUG-122626 Change-Id: I7bfbca149f927718d1e28cdabfa8759afbd06039 Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
* Android: Synchronize window creation in QtEmbeddedDelegateTinja Paavoseppä2024-03-071-12/+23
| | | | | | | | | | | | | Qt window loading is initiated either when the QtView is attached to its Android window, or when the Android QPA plugin has been loaded and is ready, depending on the order. Since the window attachment happens in the Android UI thread, and the Android QPA plugin callback happens in Qt thread, add synchronized block to make sure the execution stays ordered. Fixes: QTBUG-122626 Change-Id: Id476032f02aa8990432a02f62b6bf6237a17e7ac Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
* QWindows11Style: Draw frames HighDPI awareWladimir Leuschner2024-03-061-50/+110
| | | | | | | | | Draw frames and lines on sub-pixel coordinates to be HighDPI aware. Change-Id: Ie4eed73b3e5780216fad0b6a919cbe18391f2b79 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> (cherry picked from commit c785d56ae084d01a565aaf0fa2fa86a0682c461d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* JNI: Fix error with overload resolution when passing string typesVolker Hilsheimer2024-03-064-1/+73
| | | | | | | | | | | | | | | | | | | | | The variadic templates are supposed to be removed from the overload set when any of the parameters is a literal string type, as otherwise we get conflicts with the legacy overload taking class names and signatures as const char *. The detection of a literal string types was missing a few specializations, so that we ended up with the wrong overload being called, and class names getting interpreted as method names instead. Add the missing specializations, and add more test coverage for using the old overloads. Task-number: QTBUG-122235 Change-Id: I5488f2009c8f62d74fac6754844f57cf64011414 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Lauri Pohjanheimo <lauri.pohjanheimo@qt.io> (cherry picked from commit 10afa38aa44231b3617984fdbca66d9699e2825f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QFutureInterface: Rename "interface" variables to "iface"Nodir Temirkhodjaev2024-03-061-13/+9
| | | | | | | | | | | On Windows the "interface" is defined as "struct". Do not #undef it to fix a unity build. Task-number: QTBUG-122980 Change-Id: I9379c996d8b67b16a8b825af0ff3469111533291 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 1e836fff18ceaea8331711708bdc3d8ea0cc051e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Handle drag leave when performing platform drag of docks or toolbarsDavid Redondo2024-03-061-0/+5
| | | | | | | | | | | | | | | The existing widget machinery works through mouse positions. In order to correctly update state when a drag moves outside of a window it needs to see a move outside of the window. When the platform drag leaves the window a move to the outside of the window is now faked to not keep the layout in the hovered state of the last move event. Fixes: QTBUG-122944 Pick-to: 6.6 Change-Id: I348f5281a200b78e6be4f11b3c25339d052783a5 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> (cherry picked from commit d7fe948fdb79e919065875410dba14275a2a7478) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Map drag event positions to global during dock/toolbar dragDavid Redondo2024-03-061-1/+2
| | | | | | | | | | | | | Drag event positions are window relatives, QMainWindowLayout::hover expects global coordinates however. Fixes: QTBUG-122949 Pick-to: 6.6 Change-Id: I28469ba1b5ef88661e744d4cf87f6acab3eb2c72 Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> (cherry picked from commit 986de654b8c3af57af6f76581e50ff9e54c98b20) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add include for QT_CONFIGJuha Vuolle2024-03-061-0/+1
| | | | | | | | | To not rely on transitive includes. Change-Id: I116483f94bba4a6edb0a78941da676b1a3e6e1bd Reviewed-by: Ahmad Samir <a.samirh78@gmail.com> (cherry picked from commit a83248dd9fe9831c72c1781f465b74b6214832a5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Don't add default rpaths to qt qml plugins when requestedAlexandru Croitor2024-03-061-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | qt_add_qml_plugin has code to set a sensible install rpath for user project qml plugins. If Qt was configured without rpath support, we should not add any rpaths to qt qml plugins: - qt-computed rpaths added by qt_apply_rpaths - user-project rpaths added by qt_add_qml_plugin This is done by setting QT_NO_QML_PLUGIN_RPATH to TRUE as part of QtSetup, effectively applying the option to any qml plugin that is built by internal qt api. User projects will still be able to use the default rpaths added by qt_add_qml_plugin, even if qt itself was configured with no rpath support. Fixes: QTBUG-122687 Change-Id: I8178b527553dd00436d0abb3b44061ea16edc121 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 375f3869308fd01c276b17581ef827583550dba3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Fix assignment in internal_get_build_vars_for_external_projectsAlexandru Croitor2024-03-061-2/+2
| | | | | | | | | | | | | | The check and variable name were incorrect after a refactoring. Amends ba9623860056cbb75e426e27905f9c29b687cefa Pick-to: 6.6 Task-number: QTBUG-84884 Task-number: QTBUG-90820 Change-Id: I33b6b81695a6352c7869ef6186e00881b47bd6f3 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit aacc31815d40c8f5dbdd998536fb1fcd5f632221) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QSpan: add construction from initializer_listGiuseppe D'Angelo2024-03-063-1/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | P2447 has been merged in C++26, backport the same functionality. This makes QSpan<const T> a proper replacement for a const QList<T>& parameter, because now both can be built via a braced-init-list. // void f(const QList<int> &l); // old void f(QSpan<const int>); // new f({1, 2, 3}); // now OK This is, technically speaking, SiC: in the presence of both `f` overloads, the code above would have called the QList one. Now instead the call is ambiguous. We've been there already -- this is QString and QStringView all over again, and the solution is the same: get rid of the owning container overload. I'd rather have this construction *sooner* rather than *later* in order to minimize the fallout. And just like QString vs QStringView, there's nothing really doable to prevent instant-dangling situations: QStringView v = getString(); // dangles QSpan<const int> s = {1, 2, 3}; // ditto except for using QSpan (QStringView) as a *parameter type only*. Note that QSpan with dynamic extent was already convertible from std::initializer_list through its ranged constructor. However this fact alone doesn't unlock the above syntax. QSpan with a static extent was also convertible for the same reason. (This is non-standard: std::span's range constructor for static extents is explicit, but QSpan doesn't follow that design choice and makes the constructors implicit instead.) Found in API-review. Change-Id: I160ab5b292b0c2568cd9a7ad1b4430085f475c29 Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit 7f7b5ff3a1b617a3a1add1b1b6ad0718f0dcf143) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Revert "QStringView: simplify the constructor from QString"Marc Mutz2024-03-062-8/+10
| | | | | | | | | | | | | | | | This reverts commit 7d18ad49a37440835bb38bd77bc4e0991387ada0. Reason for revert: This changes the constructor from being a template to being a normal function, so changes overload resolution. The commit message gave no indication on why this is safe. Since it's just a nice to have, revert instead of running the risk of breaking code. Change-Id: Icd506e7221bb50c99f276f6a43c15403ec0be7a9 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit ff7e5987ecdd09f87cfcdb4c42039214627dcdb6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QLibrary: remove the unnecessary parentheses around dlerror()Thiago Macieira2024-03-061-12/+6
| | | | | | | | | | | We don't need a message like: "Cannot load library nosuchlib: (nosuchlib: cannot open shared object file: No such file or directory)" Change-Id: I01ec3c774d9943adb903fffd17b76599cea47502 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit a6a56814702612d8981f594a6158d70a7928cb99) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_toolsupport: make the i386 case really about i386Thiago Macieira2024-03-061-2/+3
| | | | | | | | | | | | Specifically, don't use it for either of the x86-64 ABIs (LP64 and ILP32). The generic case below should work for everyone. Fixes: QTBUG-122720 Change-Id: I01ec3c774d9943adb903fffd17b75fc79095e089 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 24245d2a85cbcd503816027067aa72995e3ac2ac) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add QT_CONFIG(signaling_NaN) around the signaling_NaN limit functionJuha Vuolle2024-03-061-0/+2
| | | | | | | | | | | Amends: 398a51686eda225f222d9df7ce56898c18ecdaa1 Found in API-review. Change-Id: Ia9be5bc5bdcf7aa2960e9c88f961bf8168435a70 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit 033b52c0ad06691db97df7f22562716de09758db) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* drm: Fix having more than window over the screen's lifetimeLaszlo Agocs2024-03-062-1/+9
| | | | | | | | | | | | | | | | | | ...when not using atomic. On the non-atmic path the fb is passed in to drmModeSetCrtc. Here we need a new call to it if a new QWindow gets created after the previous one is destroyed. Previously this was not done, so it ended up with Device busy errors. Atomic does not need this since there the flip commit always contains framebufferPropertyId. Change-Id: Ie68152cad50438807ef45adfba65e74c8f30c956 Fixes: QTBUG-122663 Pick-to: 6.6 6.5 Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 818f8de64a2b1a7371ecb4bdd527b05343190582) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* drm: atomic: Avoid device busy when flipping after creating a new windowLaszlo Agocs2024-03-061-2/+6
| | | | | | | | | Task-number: QTBUG-122663 Change-Id: I168930428e8d09a9a042401460d678e20f3b82d5 Pick-to: 6.6 6.5 Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 0a3b5042a566afa4dc5162f469eb0d8be3120933) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: add options to not generate target wrappersSamuli Piippo2024-03-061-1/+1
| | | | | | | | | | | | The target wrappers for qmake and qtpaths do not work on Yocto builds and only create confusion when they are available in target. Add option to disable their generation. Task-number: QTBUG-122420 Change-Id: Ibb829cc846ad6c470fe29e746ade42fccaa33a6f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 762c56d65bf2bf430621f6bed8f6d96ee333e718) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Revert "Fix export of QDeferredDeleteEvent, should be Q_CORE_EXPORT"Marc Mutz2024-03-061-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit bc3b18764aabf95a50a65e090863c54b6ac57e3e. Reason for revert: QDeferredDeleteEvent changed the size in 6.7. It is more important to protect the casual user that relied on the mention of the otherwise undocumented class in the QEvent::Type::DeferredDelete documentation than to be convenient for one tool, developed by experts who know how to replace their dynamic_cast with a type() check and a static_cast and/or extract information from an unexported class. In fact, not even the autotest-export is needed, as there are no mentions of the class outside of comments outside QtCore. Found in API-review. [ChangeLog][QtCore][QDeferredDeleteEvent] Made this undocumented class private and unexported. You will still be able to see the definition in qcoreevent_p.h, but you won't be able to create objects of the class anymore. Manual conflict resolutions: - squash the tst_qapplication.cpp part of dev-only 13074a967f18ed348ab744f7ff831965607a6421 to avoid the linker error. Change-Id: I8a47c69d356a0bef260e7987bc4eab96430e8072 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit e06c67d448a6b4684d9787e9c18ec12f884b7063) Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Revert "QAndroidPlatformInputContext: send composition text and cursor jointly"Axel Spoerl2024-03-052-42/+20
| | | | | | | | | | | | | This reverts commit be3b9b2ab12f664c196d649e8c4247d70805d667. Reason for revert: Caused QTBUG-121561 Fixes: QTBUG-121561 Pick-to: 6.6 6.5 6.2 Change-Id: I4b59d97ede6c50d2575a7d7cebbe2291983dd19f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 46502f9705634f02626ee1057975463d1c0ae1f8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Debounce QDeferredDeleteEvents in QObject::deleteLater()Tor Arne Vestbø2024-03-053-16/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to look through the event queue in QCoreApplication::postEvent, and if we found an existing DeferredDelete event for the receiver we would compress the two events into one. This was changed in 99b89d30fa5484c5d1f3cbda828648c28af4fb7d, as the logic was causing O(n^2) for deleteLater, by using one of the bits in QObjectData to track whether the object had already been deleted. But it kept the logic for tracking this in QCoreApplication::postEvent, and QCoreApplication::compressEvent would still do the work of deleting the additional QDeferredDeleteEvents. To avoid the unnecessary heap allocation of the QDeferredDeleteEvents we can move the debouncing/compression to QObject::deleteLater(). We use the same mutex as in QCoreApplication::postEvent to guard concurrent access to deleteLaterCalled. A note has been added about the (preexisting) issue that the mutex is not sufficient to prevent data races, as the deleteLaterCalled flag is part of a bit-field, and we're not guarding any of our other accesses to other bits. As QDeferredDeleteEvents is private API, we can rely on no-one else posting it than QObject::deleteLater(), which should be the case now that tst_QApplication::sendPostedEvents() was fixed. The documentation has been clarified as well. It's safe to call deleteLater() more than once, but that's not _because_ other pending events for the object are cleared. The latter behavior is normal ~QObject() behavior. The documentation was probably written at a point we didn't do any event compression at all for QDeferredDeleteEvents. Task-number: QTBUG-120124 Task-number: QTBUG-119918 Change-Id: I2a733095b7cb066ba494b1335aa40200c749cb0c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 13074a967f18ed348ab744f7ff831965607a6421) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* DRY QHttpHeaders::value() implementationJuha Vuolle2024-03-051-14/+12
| | | | | | | | Task-number: QTBUG-122020 Change-Id: I403d376734587d721d27f7093b3774068829a46d Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit b370e1b7f19464dd5303122b3e1e72addbadbf57) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* DRY QHttpHeaders::values() implementationJuha Vuolle2024-03-051-15/+14
| | | | | | | | Task-number: QTBUG-122020 Change-Id: I7401eef86b133d33f32cd786dffe9a06c4ac7aba Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 9c0a79d323500d07fb8b95656b9013dc118b9fa3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* DRY QHttpHeaders::combinedValue() implementationJuha Vuolle2024-03-051-18/+16
| | | | | | | | Task-number: QTBUG-122020 Change-Id: I6232ea725d47800a9236ed90b70004a915bc8b65 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit de37316160920f88101fbb59e32b401d139f2e80) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QHttpHeaders: remove unused Header::operator==()Juha Vuolle2024-03-051-6/+0
| | | | | | | | | | | The QHttpHeaders comparison was dropped earlier, and the current code no longer needs to compare both header entry 'name' and 'value'. Change-Id: I57a3003f0fd1d8ff867c970d5ec8a994a167ae88 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit c0e4b73743b9e9e8c3e116f9db9fe37bfcd89bf5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Document QHttpHeaders::WellKnownHeaders as the recommended overloadsJuha Vuolle2024-03-051-0/+7
| | | | | | | | | | ... from a performance point of view. Task-number: QTBUG-122020 Change-Id: I8a1558a46e74d740e330ad483454267f9922a5d5 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 9e26a8c0826f0914581c3e6f8e7970aed231c8e1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Make HTTP header name a variant / union for performanceJuha Vuolle2024-03-051-47/+188
| | | | | | | | | | | | | | | | | | | | | | | | This saves memory and can speed up performance with well-known headers. The change consists of: - Change the internal type of 'name' to a std::variant capable of holding either WellKnownHeader-enum, or a QBA. - Accordingly, add an equality operator. - When headers are added (append, insert, replace) then use WellKnownHeader as storage type when possible; either use the function parameter directly if a WellKnownHeader overload was used, or check if the provided string can be converted to a WellKnownHeader. - Convert other functions to use a more performant lookup/comparisons. Fixes: QTBUG-122020 Change-Id: If2452f6edc497547246fb4ddbace384e39c26c5e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 0c05d2b43ec5ab29efc3db2718289a5600da754c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Move few QHttpHeaders helper functions on topJuha Vuolle2024-03-051-20/+20
| | | | | | | | | | | | As a prequel to make subsequent diff on the followup commit (std::variant/union) smaller Task-number: QTBUG-122020 Change-Id: Iaa5dd794dc7a9e33c2c43e459bf5dbd19afb3ba1 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit d3860b1b73799244f240dac8d03176636e367567) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add sorted lookup table for QHttpHeaders name fieldsJuha Vuolle2024-03-051-0/+222
| | | | | | | | | | | | | | | | | This allows a more performant (O(logN)) lookup for WellKnownHeader enum (followup commit). The lookup table is currently crafted manually. It may in future be generated at compile-time, but this should only be done if new headers are appended often; we don't want to unnecessarily bloat compilation time either. Task-number: QTBUG-122020 Change-Id: I0329902b13128f03c358796d5cda7014b1e75057 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit dd3af7e4e250b69d200770a670c90b1bb4ca2198) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* cmake: Allow silencing CMake generator warning from environmentTor Arne Vestbø2024-03-051-1/+2
| | | | | | | | Pick-to: 6.6 6.5 Change-Id: I13d3000121be39f204b4374118690fe27702dd12 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 5736e0b65599f2e3dedcb80ec88ecc431a459d38) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Icon: work around compile optimization bugVolker Hilsheimer2024-03-051-158/+158
| | | | | | | | | | | | | | We are observing that the strings become sequences of zeros in release builds, possibly triggered by qOffsetStringArray being used in a static constexpr function to initialize a constexpr array. Pull the array out of the function as a static on translation unit level, which is a pattern we use regularly elsewhere in Qt. Change-Id: I69c8cfe4e2d6d7d4659edda621ba1afe9768035b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 302823d73b8ca27e67e703de8316092d8b4d5715) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QTextMarkdownWriter: escape special characters (line or word prefix)Shawn Rutledge2024-03-054-8/+115
| | | | | | | | | | | | | | | | | | | Try to avoid writing anything that the parser would misinterpret. Escape pre-existing backslashes, but not those that are already escaped. Optimize maybeEscapeFirstChar() slightly and apply it to every line of output (except in code blocks), not only to new lines created by word-wrapping. Since it would be hard to do this without using regular expressions, the markdown writer feature now depends on the regex feature. Fixes: QTBUG-96051 Fixes: QTBUG-122083 Change-Id: I8d95366501fd31441829081c668f11a3a3a23fe2 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit ca4774131b9b8ee40b4d7f5c1ba296af4700207f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove unnecessary #undef about q{Debug,Info,Warning,Critical,Fatal}Thiago Macieira2024-03-052-15/+0
| | | | | | | | | | | | | | | | | | | The ones in qlogging.cpp were copied to it from qglobal.cpp in commit 23688d8942895507f4bc1517dd3c161134f4f9d0. They existed in qglobal.cpp like in qdebug.cpp since the beginning of the public history. The one in qdebug.cpp already made no sense in Qt 4 times, because qdebug.cpp was a documentation-only source (no actual C++ code). The #undefs from qglobal.cpp hadn't been necessary since commit d394ca7f27197cfbfc28eb9a08eb0db261dd9d3d, the global functions qDebug(), qWarning(), qCritical(), etc. were replaced by member functions in QMessageLogger whose names did not match the macros. Change-Id: I50e2158aeade4256ad1dfffd17b1c62f23eca4db Reviewed-by: Kai Köhne <kai.koehne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit 5670d5f7e1ed65b6d6158b73edc43111d7b8ca53) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake/Windows: add quotes around the whole path, not just the dirRichard Moe Gustavsen2024-03-041-2/+2
| | | | | | | | | | | | | The quotes should be around the whole file path, and not just around the directory. Otherwise it can cause the build to fail if Qt lives inside a directory that is symlinked from a different drive. Pick-to: 6.6 6.5 Change-Id: I46e23d4a78c807e6617224ce7faff96e6985f449 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 26f307ddb16563777bbd57ba1f29d656760c7ff3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake/Windows: add setlocal to the Windows bat filesRichard Moe Gustavsen2024-03-042-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Several of the cmake bat files sets "script_dir_path". The problem is that those assignments are not local to the script files. E.g when qt-configure-module.bat gives it a value, and then call qt-cmake.bat, qt-cmake.bat will assign it a different value. And this value will overwrite the original value in qt-configure-module.bat. So when the call returns, that script can sometimes fail. This happens (for unknown reasons) if the Qt source code path contains a link to a different drive, created with mklink /d. This is typical if Windows is running in a virtual machine, and the Qt source code is shared with the host on e.g drive Q:. In that case you might want to a folder on C: be a symlink to Q:, in order to build Qt. This patch will make sure we add "setlocal" in all the affected bat files, so that any changes done to e.g "script_dir_path" stays local to each file. Pick-to: 6.6 6.5 Change-Id: Iee18e06eb0beece0c85c4345d9bfc0194e466e56 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 458be44aebd441884502798c569cfcdfb06d15a9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Do not add PDF-related files to the resources if PDF is disabledAndré Klitzing2024-03-041-16/+17
| | | | | | | | | | | | This avoids added resources: ":/qpdf/qpdfa_metadata.xml" ":/qpdf/sRGB2014.icc" Change-Id: I89a130bd281c5550f1c3dcead8336e0c3de6bc84 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 3d31b1953847e9b052812c8b7985d53af2c88385) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: Fix inverted equals condition on QtAccessibilityDelegateTinja Paavoseppä2024-03-041-1/+1
| | | | | | | | | | | Got inverted during child window refactoring, leading to broken accessibility. Amends commit 0a92d881bb91d3ff14187e7838af1cad9ad1070c. Task-number: QTBUG-122827 Change-Id: Icbde94097eb0b33171f18f8a30c935d0b950c545 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 15132530eeb327365270cba42d720f3f20b65a39)
* QNetworkInformation: document a potential SiCMarc Mutz2024-03-040-0/+0
| | | | | | | | | | | | | | | Amends 1b429d6be42d4282cabed9119d6122061bc9fde0. [ChangeLog][Potentially Source-Incompatible Changes][QtNetwork] The enums in QNetworkInformation must now be scoped when used from QML. The scope is no longer optional. Adding the scope is a backwards-compatible fix. Change-Id: I0855c0c2edd569f486b283b4671cdc3177cb7d3b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit f9653c4ff25a6c7d78e0d5cf2782d4c78d16281c) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QtXml: fix leak in QDomText::splitTextChristian Ehrlicher2024-03-044-0/+24
| | | | | | | | | | | | QDomText::splitText() needs to unref() the newly created QDomText instance as it does not use it by itself Pick-to: 6.6 6.5 6.2 5.15 Fixes: QTBUG-40561 Change-Id: I593011b63c39f2310204d97ec61da7cf78a0fc14 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit de0230467c1f658232b101a99e62d68992173592) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QString: document isSimpleText() removalMarc Mutz2024-03-040-0/+0
| | | | | | | | | | | | | Amends d1f40ea0873a36288c6493f1ed5c9952064b9144. [ChangeLog][QtCore][QString] Removed undocumented internal, yet public, isSimpleText() member function. If you still use it, you'll have to write your own version outside of QString. Change-Id: Iff8e4961542384890df42ef6b5f11106f2c606ec Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 735d2d41c387bc408391bffad9167af412194cce)
* Revert "tests: blacklist tst_QWidget::render() on Wayland"Liang Qi2024-03-041-2/+0
| | | | | | | | | | | | | | This reverts commit c41733b06bd61d4710a9f6ec849f0d913c4497bb. Based on the Grafana data, last flaky was August 14, 2023, and the test works fine on local vm with stressed cpu. Fixes: QTBUG-115598 Pick-to: 6.6 6.5 Change-Id: I634598d20a581d4d1443a3fd81e1e9481bfa2545 Reviewed-by: Inho Lee <inho.lee@qt.io> (cherry picked from commit 4dca61cbdaf070e7789e71669f306042a0dd7fe3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QDockWidget: Use resizer without native window decorationAxel Spoerl2024-03-041-4/+4
| | | | | | | | | | | | | | | | 975c0bdf732ea7c5f7632913a27a1b6ae5cd5b26 has disabled usage of a resizer on Windows. This has caused a regression, when a dock widget was rendered frameless. Use a resizer in that case. Fixes: QTBUG-120694 Task-number: QTBUG-102196 Pick-to: 6.6 6.5 6.2 Change-Id: I9fbcb1a8b1d8869995093bc1da7524ec81e9f02d Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit 89fc58127d449cc2995879ff334567141e9c1d58) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Compiler detection - __attribute__((fallthrough)) for clangTim Blechmann2024-03-041-2/+2
| | | | | | | | | | Clang supports `__attribute__((fallthrough))`. While C++ sources use [[attribute]], the C codepath still requires a fallback. Change-Id: Iaa93d2debc21fdd34e414ddb024b95942ae9191f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 376ff95e9308b311038bb316ef36d04244d55b66) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QProcess/Doc: remove the note that about FailedToStart after started()Thiago Macieira2024-03-031-3/+0
| | | | | | | | | | | | | | | | | | | | It was added in commit 75a2c81b0041df4ca59178cf52d9e5a8815f3524: Handle posix_spawn using exit code 127 to indicate fail-to-start Most posix_spawn implementations are done using fork(), so the only way to report errors afer fork() is via a special exit code. Support for posix_spawn was removed when we dropped QNX 6.5 support in Qt 5.7 (commit 005a8bfbf0022f03dafafcf2b5c438ccf0675a49). Also complements commit d012e953bfb498091c0ea9a83a717a3deffc670f. Pick-to: 6.6 Change-Id: I76ffba14ece04f24b43efffd17aadead7c30146b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Ahmad Samir <a.samirh78@gmail.com> (cherry picked from commit 75254e1d355b2eb33fece8bc1a468ce92ac65c7e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qfloat16: use std::numeric_limits<std::float16> if availableThiago Macieira2024-03-031-0/+15
| | | | | | | | | | Instead of going through the bit casts. Also solves the violation of constexpr requirements from the previous commit. Change-Id: I01ec3c774d9943adb903fffd17b8b6ee93d3c031 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 398a51686eda225f222d9df7ce56898c18ecdaa1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qfloat16: make native std::numeric_limits<qfloat16> constexprThiago Macieira2024-03-031-1/+7
| | | | | | | | | | | | | | | | In C++23 with std::float16_t present (QFLOAT16_IS_NATIVE), the _limit_xxxx() methods in qfloat16 need to set the native type, not rely on the union trick because that isn't allowed in constexpr mode. in ‘constexpr’ expansion of ‘operator<=>(Max, std::numeric_limits<double>::max())’ qfloat16.h:209:5: in ‘constexpr’ expansion of ‘compareThreeWay((* & lhs), ((double)rhs))’ qfloat16.h:209:5: in ‘constexpr’ expansion of ‘(& lhs)->qfloat16::operator NativeType()’ error: accessing ‘qfloat16::<unnamed union>::nf’ member instead of initialized ‘qfloat16::<unnamed union>::b16’ member in constant expression Change-Id: I01ec3c774d9943adb903fffd17b8b6ceed6ef9e2 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 48cd6867578ef372bbacb16081414b506cdb5b38) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Disconnect QWindowContainer::focusWindowChanged on destructionTor Arne Vestbø2024-03-031-0/+3
| | | | | | | | | | | | | | | | | | | Regression after 9e78256579e8dc704066a98cb4816a1aab0e7e3b. Apparently the string based connection syntax is more lenient, as with PMF-style connects, we (correctly) get: ASSERT failure in QWindowContainer: "Called object is not of the correct type (class destructor may have already run)" when the QWidget destructor closes the QWindow and we get a synchronous callback from the platform that we've lost the focus window. Change-Id: I8f25b3b050e11913ec0f0941eaf831c88b4249f9 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> (cherry picked from commit 7ff1285e7a93d51e1f2a079ae33349906d9e9fea) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_QMutex: use the new QCOMPARE_* macrosMårten Nordheim2024-03-031-24/+24
| | | | | | | | | | Some machine in CI is failing some of these sometimes and I would like to know by how much. Change-Id: I88b41d5cde81419f7c11f7038101962630eb31ef Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit 8d6d7428f49d91600977ef5fbe01ed2117424e71) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>