summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qcommandlineparser.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2023-08-18 21:51:31 -0600
committerThiago Macieira <thiago.macieira@intel.com>2023-08-22 10:17:33 -0700
commit4368179c37cae05d16109e319fc1c77490754c7d (patch)
treee61dfe6f8c6952ca5a6aba0d73a48a72c7de4ad5 /src/corelib/tools/qcommandlineparser.cpp
parent3c56f561e48b6feae39a75b2f40906c1be819f56 (diff)
QTimer: fix regression on singleShot-invoking non-mormalized SLOT()s
The was introduced with the rewrite of QMetaObject::invokeMethod() in commit 0f76e55bc440a70f5d9530a192c9ce6334a8f06, 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>
Diffstat (limited to 'src/corelib/tools/qcommandlineparser.cpp')
0 files changed, 0 insertions, 0 deletions