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:
parent
be17ca27f6
commit
bd75876e7e
@ -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]
|
//! [1]
|
||||||
QObject *obj = new QPushButton;
|
QObject *obj = new QPushButton;
|
||||||
obj->metaObject()->className(); // returns "QPushButton"
|
obj->metaObject()->className(); // returns "QPushButton"
|
||||||
|
@ -754,30 +754,6 @@ void QMetaCallEvent::placeMetaCall(QObject *object)
|
|||||||
\sa {Object Trees & Ownership}
|
\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
|
QObject member functions
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user