qt5base-lts/tests/auto/corelib/kernel
Thiago Macieira 4368179c37 QTimer: fix regression on singleShot-invoking non-mormalized SLOT()s
The was introduced with the rewrite of QMetaObject::invokeMethod() in
commit 0f76e55bc4, because we have an
optimization for zero timers to avoid creating a temporary
QSingleShotTimer object. The old implementation did attempt to normalize
the target slot name, but did so because it looked metamethods up using
QMetaObject::indexOfMethod:

    int idx = meta->indexOfMethod(sig.constData());
    if (idx < 0) {
        QByteArray norm =
QMetaObject::normalizedSignature(sig.constData());
        idx = meta->indexOfMethod(norm.constData());
    }

The new implementation does not use this method so it didn't need to
attempt to normalize.

I am fixing this only in QTimer and not in QMetaObject::invokeMethodImpl
(even though it is trivial to do so) because I don't believe spaces in a
pure string to invokeMethod were ever expected to work:

    QMetaObject::invokeMethod(obj, "slotName ", Qt::QueuedConnection);

The Q_ARG and Q_RETURN_ARG (for code not recompiled) still does
normalization inside QMetaType::fromName().

Fixes: QTBUG-116060
Pick-to: 6.5 6.6
Change-Id: I964c2b1e6b834feb9710fffd177cac60c83ef413
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-08-22 10:17:33 -07:00
..
qapplicationstatic CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qcoreapplication CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qdeadlinetimer CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qelapsedtimer CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qeventdispatcher QEventDispatcher: test with glib disabled too 2023-08-11 16:45:40 +03:00
qeventloop Remove the unix dispatcher from WASM builds 2023-08-22 17:19:50 +02:00
qjnienvironment CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qjniobject CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qjnitypes CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qmath CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qmetacontainer CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qmetaenum CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qmetamethod CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qmetaobject CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qmetaobjectbuilder CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qmetaproperty CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qmetatype QMetaType: fix recursive detection of std::optional operators 2023-07-31 18:43:55 -07:00
qmimedata tests/auto/*: port Q_FOREACH to ranged-for 2023-08-19 16:29:09 +03:00
qobject QObject: Do not register an observer when writing objectName property 2023-08-21 14:15:51 +02:00
qpermission CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qpointer CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qproperty CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qsignalblocker CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qsignalmapper CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qsocketnotifier QSocketNotifier: firm up the ordering in unexpectedDisconnection() 2023-07-11 13:44:29 -07:00
qtimer QTimer: fix regression on singleShot-invoking non-mormalized SLOT()s 2023-08-22 10:17:33 -07:00
qtranslator Give QLocale::uiLanguages() a separator parameter 2023-08-16 16:25:48 +02:00
qvariant tests/auto/*: port Q_FOREACH to ranged-for 2023-08-19 16:29:09 +03:00
qwineventnotifier CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qwinregistrykey CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00