diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2023-12-20 14:46:11 -0300 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2023-12-21 16:13:31 -0300 |
commit | efaa849023d77dfee82e4d9ff904c3711b4fb611 (patch) | |
tree | 517f51e02784e8c3d07edadef92757d3ec0b4cd2 | |
parent | b9ee6d3b2e465eb70ba43ea62d2ada5327a138c8 (diff) |
QObject: re-add the nameless qt_qFindChildren_helper to restore BC
Amends e608bc019232f6956c4520be1a6103a1845c6991 by adding the
implementation of this method whose implementation got accidentally
removed (because it became unused). It's added in removed_api.cpp
because, as the commit said, the cost for creating an empty
QAnyStringView is practically nil.
It's not zero on Windows, because the replacement function has five
parameters, so the last (the options) is passed on the stack. But that
is not enough of a justification to keep separate functions.
Pick-to: 6.7
Fixes: QTBUG-120309
Change-Id: I6e2677aad2ab45759db2fffd17a29b4ec7728426
Reviewed-by: Rym Bouabid <rym.bouabid@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
-rw-r--r-- | src/corelib/compat/removed_api.cpp | 6 | ||||
-rw-r--r-- | src/corelib/kernel/qobject.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/corelib/compat/removed_api.cpp b/src/corelib/compat/removed_api.cpp index 355d37bdb8..2f62a3055d 100644 --- a/src/corelib/compat/removed_api.cpp +++ b/src/corelib/compat/removed_api.cpp @@ -834,6 +834,12 @@ QDateTime QLocale::toDateTime(const QString &string, const QString &format, QCal #include "qobject.h" +void qt_qFindChildren_helper(const QObject *parent, const QMetaObject &mo, + QList<void*> *list, Qt::FindChildOptions options) +{ + qt_qFindChildren_helper(parent, QAnyStringView(), mo, list, options); +} + void qt_qFindChildren_helper(const QObject *parent, const QString &name, const QMetaObject &mo, QList<void*> *list, Qt::FindChildOptions options) { diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h index 5180b2335a..9916626a3c 100644 --- a/src/corelib/kernel/qobject.h +++ b/src/corelib/kernel/qobject.h @@ -50,8 +50,10 @@ Q_CORE_EXPORT void qt_qFindChildren_helper(const QObject *parent, const QString Q_CORE_EXPORT void qt_qFindChildren_helper(const QObject *parent, QAnyStringView name, const QMetaObject &mo, QList<void *> *list, Qt::FindChildOptions options); +#if QT_CORE_REMOVED_SINCE(6, 7) Q_CORE_EXPORT void qt_qFindChildren_helper(const QObject *parent, const QMetaObject &mo, QList<void *> *list, Qt::FindChildOptions options); +#endif Q_CORE_EXPORT void qt_qFindChildren_helper(const QObject *parent, const QRegularExpression &re, const QMetaObject &mo, QList<void *> *list, Qt::FindChildOptions options); #if QT_CORE_REMOVED_SINCE(6, 7) |