qt_qFindChild(ren)_helper: remove pointless checks
The only callers are QObject::findChild(ren), and they always pass valid pointers, so there's no point of checking them. Change-Id: I789abc3a53db523acf06c1a8a340094a71c79e41 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
f6b64c3c62
commit
d896f78999
@ -1959,8 +1959,8 @@ void QObject::killTimer(int id)
|
||||
void qt_qFindChildren_helper(const QObject *parent, const QString &name,
|
||||
const QMetaObject &mo, QList<void*> *list, Qt::FindChildOptions options)
|
||||
{
|
||||
if (!parent || !list)
|
||||
return;
|
||||
Q_ASSERT(parent);
|
||||
Q_ASSERT(list);
|
||||
const QObjectList &children = parent->children();
|
||||
QObject *obj;
|
||||
for (int i = 0; i < children.size(); ++i) {
|
||||
@ -1981,8 +1981,8 @@ void qt_qFindChildren_helper(const QObject *parent, const QString &name,
|
||||
void qt_qFindChildren_helper(const QObject *parent, const QRegularExpression &re,
|
||||
const QMetaObject &mo, QList<void*> *list, Qt::FindChildOptions options)
|
||||
{
|
||||
if (!parent || !list)
|
||||
return;
|
||||
Q_ASSERT(parent);
|
||||
Q_ASSERT(list);
|
||||
const QObjectList &children = parent->children();
|
||||
QObject *obj;
|
||||
for (int i = 0; i < children.size(); ++i) {
|
||||
@ -2003,8 +2003,7 @@ void qt_qFindChildren_helper(const QObject *parent, const QRegularExpression &re
|
||||
*/
|
||||
QObject *qt_qFindChild_helper(const QObject *parent, const QString &name, const QMetaObject &mo, Qt::FindChildOptions options)
|
||||
{
|
||||
if (!parent)
|
||||
return nullptr;
|
||||
Q_ASSERT(parent);
|
||||
const QObjectList &children = parent->children();
|
||||
QObject *obj;
|
||||
int i;
|
||||
|
Loading…
x
Reference in New Issue
Block a user