Commit Graph

66972 Commits (e3c8a94ef5010be74e15bc9efcbcd71ce58ee174)

Author SHA1 Message Date
Frédéric Lefebvre e3c8a94ef5 tst_QAbstractItemView::task221955_selectedEditor remove setActiveWindow
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number: QTBUG-121488
Change-Id: I6a4bad1537c8298649598fc3ceecfb6086842b7e
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-26 18:19:38 +02:00
Frédéric Lefebvre 65c74701e0 tst_QAbstractItemView::setItemDelegate() remove setActiveWindow()
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number: QTBUG-121488
Change-Id: Ib7de6df3dc330ff8e3eff7a901eca535a4f22a2d
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-26 18:19:38 +02:00
Frédéric Lefebvre c7b1f4251a task250119_shortcutContext() remove setActiveWindow()
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number: QTBUG-121488
Change-Id: Ie98bdf64973eeac91dd914af7af347cccb0ad5d3
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-26 18:19:38 +02:00
Frédéric Lefebvre 0e2395dc09 tst_QCompleter::focusIn() remove QApplicationPrivate::setActiveWindow()
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number: QTBUG-121488
Change-Id: I129183b6e65da297d457fbebfeba940daffc9b3d
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-26 18:19:38 +02:00
Frédéric Lefebvre 08d567f4a9 tst_QCompleter::multipleWidgets() remove setActiveWindow()
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number: QTBUG-121488
Change-Id: I14898d6eb791ba455e21fae424d59b6799aef94a
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-26 18:19:38 +02:00
Frédéric Lefebvre 845ad04b00 QTBUG36933_brokenPseudoClassLookup() remove setActiveWindow()
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number: QTBUG-121488
Change-Id: I32991b158685d2aa6a9ced225f97ff9f0e6b13d3
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-26 18:19:38 +02:00
Frédéric Lefebvre 50fe4aa907 task232085_spinBoxLineEditBg() remove setActiveWindow()
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number: QTBUG-121488
Change-Id: I8f941c2188563f72f1ff261a8d68bb0e62ae18fd
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-26 18:19:37 +02:00
Frédéric Lefebvre 3b012d60b9 tst_QStylesheetStyle::complexWidgetFocus() remove setActiveWindow()
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number: QTBUG-121488
Change-Id: I9fc6957376a0e42958e0f4c93025058f9f67bf20
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-26 18:19:37 +02:00
Frédéric Lefebvre 9499c5490e tst_QStylesheetStyle::tooltip() remove setActiveWindow()
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number: QTBUG-121488
Change-Id: Icad230fe31f7bf06e2f2af462297227b5f47eb63
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-26 18:19:37 +02:00
Frédéric Lefebvre a9a0a2a321 tst_QStylesheetStyle::hoverColors remove setActiveWindow()
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number: QTBUG-121488
Change-Id: I264c1703a0396356f6e17a3122b71bcb8f1813ad
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-26 18:19:37 +02:00
Frédéric Lefebvre 50fb2365b3 tst_QStylesheet::focusColors() remove setActiveWindow()
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number: QTBUG-121488
Change-Id: Idaca35d27b843c47f4c5f88a5a68c01b3cd8fb37
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-26 18:19:37 +02:00
Frédéric Lefebvre 58fbbaf00d tst_QWidget_window::tst_dnd() remove setActiveWindow()
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number: QTBUG-121488
Change-Id: I2acc02ebd0434de54344fa1e5fa488e7cd81c106
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-26 18:19:37 +02:00
Frédéric Lefebvre e8c5cdff81 tst_QTooltip::qtbug64550_stylesheet() remove setActiveWindow()
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number: QTBUG-121488
Change-Id: I84928725fb9b6d834439aa8a64171dcf3f7a042e
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-26 18:19:37 +02:00
Thiago Macieira f7e9bb7783 QTest: replace the majority of the ugly QCOMPARE_xx macro
Using templates to make the code look nicer and be more debuggable.
Previously, if you tried to step into the QCOMPARE_xx, you'd have the
creations of qxp::function_ref from the lambdas before you got to the
actual comparison. And all of this was in-place from macro expansion, so
you couldn't tell what was happening.

Now, if you step into QCOMPARE_xx, you go to qCompareOp. There are 5
frames between that point and the actual comparison (four std::forward()
and the Compare::compare()) and debuggers could step over std::forward.
Even if they can't, both libstdc++ and libc++ implementations are simple
casts, so there's nothing more to step into.

Change-Id: I12a088d1ae424825abd3fffd171dbbf7adb7e7e2
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-26 18:19:36 +02:00
Thiago Macieira 0756cc1eae QTest: rip out qxp::function_ref from compare_helper()
[ChangeLog][QtTest] The QCOMPARE_xx macros can now only find
QTest::toString() expansions that are either found via Argument
Dependent Lookup on the type in question or are an instatiation of the
QTest::toString<T>() template. This matches the behavior of the
QCOMPARE() macro.

This changes the way how the toString() overloads are selected, so
we need to explicilty constraint the main QTest::toString() template
in order to pick the free functions when they exist.

Change-Id: Ie28eadac333c4bcd8c08fffd17c54e768c5cffd0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-04-26 18:19:36 +02:00
Thiago Macieira c14f399d2a QTest: rip out qxp::function_ref from reportResult()
This is causing huge code bloat because everything is a local lambda.
Instead, pass direct type-erased function and data pointers to the
replacement function. Testing with tst_qcborvalue, this reduces the
compilation time and the output binary size significantly:

                   Before                   After
Compiler        Time      Size          Time     Size
GCC 13.2        136.99 s  202.3 MB      13.88 s  14.3 MB
GCC 14.0        131.49 s  202.7 MB      14.69 s  14.4 MB
Clang 17        77.2 s    146.7 MB      13.62 s  12.2 MB
Clang 18        141.9 s   187.1 MB      13.62 s  12.4 MB

This causes a difference in how toString() overloads are
found. Previously it would match far more overloads because the
toString() calls were expanded by the macro. Now, we depend on
Argument-Dependent Lookup and associated namespaces, so toString()
overloads should not be in the QTest namespace any more.

With this patch applied, the testlib testcase of tst_selftest
started failing, because nullptr is now handled differently.
However, I consider it as a bugfix, because previously it was
falling back to a default implementation, and now it is using
the QTest::toString(std::nullptr_t) overload, which is a
desired behavior. Update the reference files for tst_selftest
with the new expected output.

Task-number: QTBUG-124272
Change-Id: Ie28eadac333c4bcd8c08fffd17c5484186accdf6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-04-26 18:19:36 +02:00
Thiago Macieira 4ae6f40b3a QTest: group all the toString() functionality in a single header
It was split between qtest.h and qtestcase.h, so the QTest::toString()
specializations were not available in qtestcase.h. And it was confusing.

Change-Id: Ie28eadac333c4bcd8c08fffd17c54fafc8014cc7
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-26 18:19:36 +02:00
Thiago Macieira b7fb9d8150 QTest: add removed_api.cpp and move deprecated functions to it
QtTest is not under the same Binary Compatibility guarantees as the
other modules, but let's try and do it where it's easy.

The toString() method can simply be removed from the header because it's
not a member function. Its deprecation wasn't marked with a version
number, so it starts now with 6.8.

Change-Id: Ie28eadac333c4bcd8c08fffd17c54faca7057b9c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-04-26 18:19:36 +02:00
Allan Sandfeld Jensen eccaf0abec QColorTransferTable: de-duplicate inverse lookup code
As a drive-by, drop the unnecessary floor() and just truncate. These
operations are the same for positive numbers, and by the time we reach
the code, we have already checked and dealt with negative numbers.

Change-Id: I3e99438f11e3a6c7862b8592b7bb4ddda1b33666
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-04-26 16:19:36 +00:00
Frédéric Lefebvre 02174b9680 tst_QTooltip::keyEvent() remove QApplicationPrivate::setActiveWindow()
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number: QTBUG-121488
Change-Id: I7f87b71237f679575a093ac5d28ddd2c9a911492
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-26 17:37:57 +02:00
Frédéric Lefebvre 88fd77172f tst_QShortcut::duplicatedShortcutOverride() remove setActiveWindow()
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number: QTBUG-121488
Change-Id: I6ad2841a15dd9286232ad43069e3839faa3fe901
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-26 17:37:57 +02:00
Frédéric Lefebvre 7a81b356ca tst_QShortcut::context() remove QApplicationPrivate::setActiveWindow()
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number: QTBUG-121488
Change-Id: I650e67f626865796480c422e9d7ff7dcfd11c9ca
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-26 17:37:57 +02:00
Frédéric Lefebvre 894b828dc6 tst_QTreeView::statusTip() remove QApplicationPrivate::setActiveWindow
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number: QTBUG-121488
Change-Id: Ie0754c79fc31a811b587f11924b90a376f5821a9
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-26 17:37:56 +02:00
Frédéric Lefebvre 59e0e61416 tst_QTreeView::keyboardNavigationWithDisabled remove setActiveWindow()
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number: QTBUG-121488
Change-Id: I1abfd397f74fe8ce5fb37c3ea7128e4e577e717e
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-26 17:37:56 +02:00
Frédéric Lefebvre 020b340557 tst_QTreeView::doubleClickedWithSpans() remove setActiveWindow()
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number: QTBUG-121488
Change-Id: I82752ca528752b401001e1db36f78f440e130dd7
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-26 17:37:56 +02:00
Frédéric Lefebvre 75c50c75d4 tst_QTreeView::task224091_appendColumns() remove setActiveWindow()
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number: QTBUG-121488
Change-Id: I5e840632edc7ae86a718896b744baf45b954bdda
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-26 17:37:56 +02:00
Frédéric Lefebvre d12ebc6083 tst_QTreeView::moveCursor() remove QApplicationPrivate::setActiveWindow
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number: QTBUG-121488
Change-Id: I14a0e16330560a8e18f2d0d2a20789426856390b
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-26 17:37:56 +02:00
Frédéric Lefebvre ce93040e19 tst_QTreeView::keyboardSearchMultiColumn() remove setActiveWindow()
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number: QTBUG-121488
Change-Id: I1ca04abbb1f67d5a4a6157725891a4a076abfe75
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-26 17:37:56 +02:00
Frédéric Lefebvre cf83cc430d tst_QTableView::tabFocus() remove QApplicationPrivate::setActiveWindow
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number: QTBUG-121488
Change-Id: Id6b4fb78c8ee52a5f5eb2a9737991e7ed648f710
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-26 17:37:56 +02:00
Tinja Paavoseppä 88168fa85d Android: Add QT_ANDROID_SURFACE_CONTAINER_TYPE env var
The Android QPA picks between two types of Views that can provide a
Surface for it, SurfaceView and TextureView. Normally, SurfaceView
is used if there's just one window in the app, and TextureView is
used for any additional windows, since it allows better control
over the z order between the windows. Add an environment variable
QT_ANDROID_SURFACE_CONTAINER_TYPE that can be used to
override the normal choosing strategy, and force the application
to use either one of the View classes for all the windows of the
app.
This helps with testing changes to the Android QPA windowing,
as you can use the same app to test both Surface Views easily.

Pick-to: 6.7
Change-Id: Icc15fd9675175b854354a379b6ffa7ae5532408e
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-04-26 18:37:55 +03:00
Lucie Gérard ecc9516d15 Correct license of qsignalspy.cpp
When 7bff20c9f5 renamed the file from
.qdoc to .cpp, it failed to adjust the license header from GFDL
(documentation license) to the QtTest default.

Copy the license from qsignalspy.h, whence the code originally came
from.

Task-number: QTBUG-121787
Change-Id: I969ddc2b92882107581bbd514a28af7337e0fb9a
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-04-26 15:37:55 +00:00
Christian Ehrlicher 5a7d41667d SQL/QSqlIndex: remove unused private function createField()
This function was forgotten when the Qt3 support was removed during
initial Qt5 porting (f306d18fe6).

Pick-to: 6.7
Change-Id: I83a0be0db7e81bd9d4f84683a013e1d4faab2dd8
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
2024-04-26 16:37:55 +01:00
Christian Ehrlicher 463037d9bd SQL/IBase: print warning in case of unsupported data type
Print a warning when we encounter an unsupported data type.

Pick-to: 6.7 6.5
Change-Id: If35ac4dfdf29e555ec406f592c1001b5e16f8ff2
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-26 17:37:55 +02:00
Tatiana Borisova c9ea8ac74d Move int QObject::startTimer() to the alphabetically ordered place
Change-Id: Ibd1f0ef1c57e8aa31ea7b42b2874ba860d9c4373
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-04-26 16:58:24 +02:00
Mårten Nordheim 0a5641e72c QHttpNetworkConnection: make channels member const
They are set in the ctor and should not change afterwards, so make
it explicit by making them const.

Task-number: QTBUG-102855
Change-Id: Ie1838a532f89d9cc0c3ae16521fa1829b5cdff61
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-04-26 14:58:24 +00:00
Ivan Solovev d849cb80a4 MSVC: improve QASV(const char(&str)[N]) compilation time
The lengthHelperContainer() implementation for sizeof(Char) == 1 case
is using qstrnlen() for the non-constexpr case.
qstrnlen() is an inline function which is effectively a nullptr check
and a memchr() call.

For some reason, on MSVC this combination resulted in very slow
compilation for the user projects, where each call to
QObject::setObjectName() was hitting this codepath.

Fix it by replacing the qstrnlen() call with strnlen_s() for MSVC.
It seems that for now all versions of MSVC are affected. However,
introduce a new Q_COMPILER_SLOW_QSTRNLEN_COMPILATION definition,
which will allow us to check for the compiler version later on.
For now this definition is set for all MSVC versions unconditionally.

Fixes: QTBUG-124376
Pick-to: 6.7 6.7.1
Change-Id: Id769bef1e950ffa756acf7af39d362fd8b112019
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-04-26 16:58:24 +02:00
Volker Hilsheimer 4709a65d9a Android: remove duplicated code for handling UI mode changes
The QtActivityDelegate::handleUiModeChange(int) handler implementation
is identical to the one in QtActivityDelegateBase, so no need to
override.

Change-Id: I9753bc6fa22554c99bd127bdfa85d10007eb551c
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-04-26 16:58:24 +02:00
Oliver Wolff ed191b6afa windeployqt: Deploy target dlls for directx and vc runtime
When deploying for a cross compiled target we should deploy the target
versions of directx and compiler runtime dlls. Thus a new platform was
added to utils to be able to reflect this distinction.

Fixes: QTBUG-124719
Pick-to: 6.7
Change-Id: I4dd797804fa871d76d56f8775b188d4306b51e5a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-04-26 12:55:34 +02:00
Oliver Wolff 6f995b5e24 Windows: Prevent potential "crash" in setApplicationBadge
In some circumstances our application badge code seems to throw an
exception. The issue is hard to reproduce but just catching the
exception should be enough to fall back to the "non-winrt" version of
the code.

Fixes: QTBUG-117091
Pick-to: 6.5 6.7
Change-Id: I61f4e59f7309e2bb47b50a6ca6f3099ed9cd0af1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-04-26 12:55:34 +02:00
Eskil Abrahamsen Blomfeldt 1593b1f6d6 Introduce optional smarter font merging with ContextFontMerging
This introduces an optional, slightly more expensive approach
to font merging which takes the full string into account,
instead of just going character by character.

This addresses the issue that you may sometimes get multiple fonts
to cover one string of text in a single language. With Chinese,
this is especially an issue because many fonts will only support
parts of the very large character set.

The new algorithm detects if the string was incompletely covered
by the font and tries the fallback fonts in order to find the best
match. This is obviously more expensive, especially if no perfect
match is found and we have to check all the fallbacks in the list,
but it is opt-in and only enabled if the ContextFontMerging flag
is set.

Task-number: QTBUG-121131
Change-Id: I8c7874d0918640bd83418e3c4726c89f43a220a3
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2024-04-26 12:30:53 +02:00
Antti Kokko d04deafed9 CMake: remove QT_EDITION from qconfig.pri
QT_EDITION is not used anywhere in Qt6, stop
adding it to qconfig.pri.

Packaging currently unnecessarily patches
the edition when handling the first steps after
integration and again during install time.

Pick-to: 6.7 6.5 6.2
Change-Id: I0ad1933ec8fea741796fdf6d13f627a657aac401
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
2024-04-26 12:53:11 +03:00
Mitch Curtis 468cb035ef QCocoaMenu: fix crash when app quits while menu is open
Consider the following QML code:

    import QtQuick
    import QtQuick.Controls

    ApplicationWindow {
        visible: true

        Menu {
            id: menu
            MenuItem {
                text: "Some action"
            }
        }

        TapHandler {
            acceptedButtons: Qt.RightButton
            onTapped: {
                exitAppTimer.start()
                menu.open()
            }
        }

        Timer {
            id: exitAppTimer
            interval: 1000
            onTriggered: Qt.quit()
        }
    }

With the new native Qt Quick Menu, this will create a native menu on
platforms like macOS. When the user right clicks on the window, a timer
is started and a native menu opened. After 1 second, Qt.quit() is
called while the menu is still open. As popUpContextMenu is blocking,
when the menu is finally closed (by user interaction), control returns
to QCocoaMenu::showPopup, but the QCocoaWindow has since been
destroyed.

Account for this by storing the window in a QPointer.

It's not possible to test this as native menus can't be auto-tested.

Fixes: QTBUG-124551
Pick-to: 6.5 6.7
Change-Id: I14a97073f350c38828b3e16bb157439aeeeb6529
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2024-04-26 15:58:32 +08:00
Edward Welbourne f83206229e Apply a common style to the main()s of locale database programs
Include documentation in both, using common phrasing. Take sys.argv as
a parameter, along with sys.stdout and sys.stderr, so that we can
invoke them from python when importing into a python session to debug
or test. Supply the script name to the argument parser as prog, so it
can correctly report it and forward the rest of argv to parse_args().
Remove comments anticipating one of the several calendars we don't yet
support; the existing entries suffice to make clear what shall be
needed when we get round to adding more.

Change-Id: I2cebd385679e3c84d4ccf899e60091ac823ad10d
Reviewed-by: Mate Barany <mate.barany@qt.io>
2024-04-26 07:36:16 +02:00
Edward Welbourne 165f638783 QCalendarBackend: link to the relevant plugin documentation
The docs mention in passing the option of writing a plugin, but lack
any link to where to find the details of that.

Task-number: QTBUG-115200
Change-Id: Ibd29516d63c55784236860f81048a425c9620223
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2024-04-26 07:36:16 +02:00
Edward Welbourne 065548e7b4 Modernise testlocales/ program and make it compile
After several years unused, it had bit-rotted to the point of not
compiling and failing an assertion. It also appears to have always had
a bad free() on exit, due to passing the address of a static object to
a function that took ownership and later deleted it.

Change-Id: I91856258c3fedf820bf151b5d205d257876a8e13
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2024-04-26 07:36:16 +02:00
Edward Welbourne 1d48bf34db Automate updating of list of locales for testlocales
This old test program has bitrotted due to not being autogenerated as
part of CLDR updates. Amend qlocalexml2cpp.py to regenerate it and do
such an update. It was still using Qt5's QLocale enum numeric values,
many of which have changed in Qt6. Actually fixing the code so that it
compiles and runs can wait for a later commit.

Inspired by a patch supplied by Kizito Birabwa.

Task-number: QTBUG-124200
Change-Id: I33811313976a4860aad6d7b5b88a40c5b111a4fe
Reviewed-by: Mate Barany <mate.barany@qt.io>
2024-04-26 05:36:16 +00:00
Marc Mutz cf19105e01 QThread: check various ways users may use start(Priority)
Some of these would break if we changed the start(Priority) to say
start(QThread::Priority) instead.

Pick-to: 6.7 6.5 6.2
Task-number: QTBUG-124723
Change-Id: Id3ebe73718c8acbc54a2c88158f4062fd0dd5be1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-26 00:24:54 +00:00
Wladimir Leuschner 7d7d843a3e Windows11Style:Save unpolished palette for QAbstractScrollArea::viewport
When using QWindows11Style, the viewports background has to be set to
Qt::transparent to have the effect of rounded corners in ItemViews and
Combobox flyouts. Other Windows styles do not make use of transparent
windows, so this polishment needs to be reverted in case the style
changes. Other styles also do not manipulate the
QAbstractScrollArea::viewport palette and thus changing color schemes
results in not applying the new color scheme.

Fixes: QTBUG-123928
Pick-to: 6.7 6.7.1
Change-Id: Icb529124f63587e75bb56e40e8b1fcfe3c61c55d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2024-04-26 02:24:54 +02:00
Marc Mutz 98b034e53a QRestReply: make charset parsing more robust
The old code was based on QString::split and e.g. didn't handle
escapes in quoted-strings.

Write a modern recursive-descent parser to parse out type/subtype and
charset parameter. Since we don't, yet, support CFWS (see below),
recursion depth is strictly limited, so we're not susceptible to
recursion bombs here.

It currently handles only RFC9110-style grammar, but can be easily
extended to support CFWS (RFC2822-style comments and folding
white-space) or RFC2231-style continuuations, if needed.

It's a bit more general than strictly required, because I expect this
to be reused elsewhere ere long.

Pick-to: 6.7
Fixes: QTBUG-120307
Change-Id: I309928dc350a043672dffb4a259b457764c031be
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
2024-04-26 02:24:53 +02:00
Alexey Edelev a4c6635077 Add the missing include of termios.h
The include unlocks the usage of the TIOCNOTTY constant.

Fixes: QTBUG-124642
Change-Id: Ife2475626ca61efe38ea7928a9b61a8aded1701d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-26 01:45:56 +02:00