qt5base-lts/tests/auto/corelib
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
..
animation tst_QParallelAnimationGroup: fix memleak 2023-07-14 14:56:03 +02:00
global Mark all of Qt as free of Q_FOREACH, except where it isn't 2023-08-19 05:19:42 +00:00
io Make IDB settings work sync with JSPI 2023-08-21 19:39:21 +02:00
ipc QNativeIpcKey: add qHash() function 2023-07-25 12:31:04 +02:00
itemmodels tst_QSortFilterProxyModel: fix mem-leaks II: sortStable() 2023-07-19 04:51:26 +00:00
kernel QTimer: fix regression on singleShot-invoking non-mormalized SLOT()s 2023-08-22 10:17:33 -07:00
mimetypes tst_qmimedatabase: compile with QT_NO_FOREACH; port to ranged-for 2023-08-19 19:17:17 +03:00
platform CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
plugin QUuid: convert bswap(Id128Bytes) to a hidden friend of Id128Bytes 2023-08-18 18:00:09 +02:00
serialization Rename accent color in QPalette 2023-08-18 00:38:38 +02:00
text QString/QByteArray: fix append() wrt. raw data 2023-08-21 23:27:56 +02:00
thread Mark all of Qt as free of Q_FOREACH, except where it isn't 2023-08-19 05:19:42 +00:00
time Update QTimeZone data to CLDR v43 2023-08-07 19:51:09 +02:00
tools tst_QFreeList: build with QT_NO_FOREACH 2023-08-19 16:29:54 +03:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00