diff options
Diffstat (limited to 'src/dbus/qdbusconnection.cpp')
-rw-r--r-- | src/dbus/qdbusconnection.cpp | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/src/dbus/qdbusconnection.cpp b/src/dbus/qdbusconnection.cpp index 2384cf3..c8cf6ea 100644 --- a/src/dbus/qdbusconnection.cpp +++ b/src/dbus/qdbusconnection.cpp @@ -52,6 +52,7 @@ #include "qdbusconnection_p.h" #include "qdbusinterface_p.h" #include "qdbusutil_p.h" +#include "qdbusconnectionmanager_p.h" #include "qdbusthreaddebug_p.h" @@ -59,27 +60,6 @@ QT_BEGIN_NAMESPACE -class QDBusConnectionManager -{ -public: - QDBusConnectionManager() {} - ~QDBusConnectionManager(); - - QDBusConnectionPrivate *connection(const QString &name) const; - void removeConnection(const QString &name); - void setConnection(const QString &name, QDBusConnectionPrivate *c); - - QDBusConnectionPrivate *sender() const; - void setSender(const QDBusConnectionPrivate *s); - - mutable QMutex mutex; -private: - QHash<QString, QDBusConnectionPrivate *> connectionHash; - - mutable QMutex senderMutex; - QString senderName; // internal; will probably change -}; - Q_GLOBAL_STATIC(QDBusConnectionManager, _q_manager) QDBusConnectionPrivate *QDBusConnectionManager::sender() const @@ -126,6 +106,11 @@ QDBusConnectionManager::~QDBusConnectionManager() connectionHash.clear(); } +QDBusConnectionManager* QDBusConnectionManager::instance() +{ + return _q_manager(); +} + Q_DBUS_EXPORT void qDBusBindToApplication(); void qDBusBindToApplication() { |