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.

Fixes: QTBUG-120309
Change-Id: I6e2677aad2ab45759db2fffd17a29b4ec7728426
Reviewed-by: Rym Bouabid <rym.bouabid@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit efaa849023d77dfee82e4d9ff904c3711b4fb611)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Thiago Macieira 2023-12-20 14:46:11 -03:00 committed by Qt Cherry-pick Bot
parent c6219ebfb5
commit f8a8b99f98
2 changed files with 8 additions and 0 deletions

View File

@ -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)
{

View File

@ -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)