diff options
author | Thiago Macieira <thiago@kde.org> | 2006-04-23 19:04:53 +0000 |
---|---|---|
committer | Thiago Macieira <thiago@kde.org> | 2006-04-23 19:04:53 +0000 |
commit | 4eb5b11af789ad30f9e20b0527562d73825e6f33 (patch) | |
tree | fda09fd92b76602dd0dcb7e7130f08e850a6dc13 /qt/qdbusinterface.cpp | |
parent | bed69341bb0e0e087bd7429413c32185916feef4 (diff) |
* qt/qdbusconnection_p.h:
* qt/qdbusmetaobject.cpp:
* qt/qdbusmetaobject_p.h:
* qt/qdbusintegrator.cpp: Use the new merged-interface mode
for the dynamic meta object. No need to guess which
interface to call.
* qt/qdbusabstractinterface_p.h:
* qt/qdbusconnection.cpp:
* qt/qdbusintegrator.cpp:
* qt/qdbusinterface.cpp:
* qt/qdbusinterface.h: Make findInterface always return a non-null pointer.
Add a QDBusRef that looks and behaves like DCOPRef.
Diffstat (limited to 'qt/qdbusinterface.cpp')
-rw-r--r-- | qt/qdbusinterface.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/qt/qdbusinterface.cpp b/qt/qdbusinterface.cpp index e0d1049c..ff8fdc95 100644 --- a/qt/qdbusinterface.cpp +++ b/qt/qdbusinterface.cpp @@ -63,7 +63,7 @@ QDBusInterface::~QDBusInterface() */ const QMetaObject *QDBusInterface::metaObject() const { - return d_func()->metaObject; + return d_func()->isValid ? d_func()->metaObject : &QDBusAbstractInterface::staticMetaObject; } /*! @@ -87,7 +87,7 @@ void *QDBusInterface::qt_metacast(const char *_clname) int QDBusInterface::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QDBusAbstractInterface::qt_metacall(_c, _id, _a); - if (_id < 0) + if (_id < 0 || !d_func()->isValid) return _id; return d_func()->metacall(_c, _id, _a); } @@ -238,3 +238,14 @@ int QDBusInterfacePrivate::metacall(QMetaObject::Call c, int id, void **argv) return id; } +QDBusRef::QDBusRef(QDBusConnection &conn, const QString &service, const QString &path, + const QString &interface) + : d(conn.findInterface(service, path, interface)) +{ +} + +QDBusRef::QDBusRef(const QString &service, const QString &path, const QString &interface) + : d(QDBus::sessionBus().findInterface(service, path, interface)) +{ +} + |