From b91aca7b0e213552c87ddfa12c16541cfa2142d2 Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Tue, 19 Oct 2010 04:06:41 +0000 Subject: Restore the original prototype for QXmppClient::findExtension(), it is modeled after QObject::findChild(). --- src/QXmppClient.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/QXmppClient.h') diff --git a/src/QXmppClient.h b/src/QXmppClient.h index 5db4136f..382aee50 100644 --- a/src/QXmppClient.h +++ b/src/QXmppClient.h @@ -99,12 +99,12 @@ public: QList extensions(); - /// \return pointer to the desired extension. - /// Returns NULL if extension is not found. + /// \brief Returns the extension which can be cast into type T, or 0 + /// if there is no such extension. /// /// Usage example: /// \code - /// QXmppDiscoveryManager* ext = client->findExtension(); + /// QXmppDiscoveryManager* ext = client->findExtension(); /// if(ext) /// { /// //extension found, do stuff... @@ -112,12 +112,12 @@ public: /// \endcode /// template - T* findExtension() + T findExtension() { QList list = extensions(); for (int i = 0; i < list.size(); ++i) { - T* extension = qobject_cast(list.at(i)); + T extension = qobject_cast(list.at(i)); if(extension) return extension; } -- cgit v1.2.3