QObject: remove unused function qt_find_obj_child

qt_find_obj_child is a vestige from Qt3. It is not used nor
exported. It can safely be removed.

Change-Id: Ief6164c361a369559e067b99880c357e421e6342
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Olivier Goffart 2016-11-07 15:21:07 +01:00 committed by Olivier Goffart (Woboq GmbH)
parent be17ca27f6
commit bd75876e7e
2 changed files with 0 additions and 32 deletions

View File

@ -48,14 +48,6 @@
**
****************************************************************************/
//! [0]
QLineEdit *lineEdit = static_cast<QLineEdit *>(
qt_find_obj_child(myWidget, "QLineEdit", "my line edit"));
if (lineEdit)
lineEdit->setText("Default");
//! [0]
//! [1]
QObject *obj = new QPushButton;
obj->metaObject()->className(); // returns "QPushButton"

View File

@ -754,30 +754,6 @@ void QMetaCallEvent::placeMetaCall(QObject *object)
\sa {Object Trees & Ownership}
*/
/*!
\relates QObject
Returns a pointer to the object named \a name that inherits \a
type and with a given \a parent.
Returns 0 if there is no such child.
\snippet code/src_corelib_kernel_qobject.cpp 0
*/
void *qt_find_obj_child(QObject *parent, const char *type, const QString &name)
{
QObjectList list = parent->children();
if (list.size() == 0) return 0;
for (int i = 0; i < list.size(); ++i) {
QObject *obj = list.at(i);
if (name == obj->objectName() && obj->inherits(type))
return obj;
}
return 0;
}
/*****************************************************************************
QObject member functions
*****************************************************************************/