qt5base-lts/tests/auto
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
..
bic/data Add binary compatibility file built against 6.5.0 2023-04-19 15:40:36 +00:00
cmake _qt_internal_create_moc_command: Fix genex parse 2023-08-17 13:09:46 +02:00
concurrent tst_QtConcurrentMedian: compile with QT_NO_FOREACH 2023-08-19 16:28:20 +03:00
corelib QTimer: fix regression on singleShot-invoking non-mormalized SLOT()s 2023-08-22 10:17:33 -07:00
dbus tests/auto/: port Q_FOREACH to ranged-for, local const containers 2023-08-19 16:29:25 +03:00
gui tests/auto/*: port Q_FOREACH to ranged-for, make container const 2023-08-19 16:29:30 +03:00
guiapplauncher Move Weather Anchor Layout example to manual tests 2023-03-02 05:55:57 +01:00
network tst_QSslSocket: skip tests requiring TLS v 1.0 downgrade 2023-08-22 16:26:02 +02:00
opengl tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
other tst_gestures: clean-up the BLACKLIST 2023-08-22 15:19:50 +00:00
printsupport tst_QPrintDevice: compile with QT_NO_FOREACH 2023-08-19 19:17:18 +03:00
shared tests: remove PlatformInputContext::filterEvent() 2023-01-18 13:21:06 +01:00
sql tst_qvfssql: Don't use appless main 2023-08-11 15:45:36 +02:00
testlib tst_selftests: compile with QT_NO_FOREACH 2023-08-19 16:30:13 +03:00
tools tst_qmakelib: compile with QT_NO_FOREACH 2023-08-19 19:17:17 +03:00
wasm CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
widgets tst_QDockWidget: Fix compiler warning in non-development build 2023-08-22 15:37:46 +02:00
xml CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
CMakeLists.txt tests/tools: only run qdbus{cpp2xml,xml2cpp} tests if D-Bus is available 2023-08-14 20:19:36 -07:00
network-settings.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00