summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/webchannel/qwebchannel.cpp5
-rw-r--r--src/webchannel/qwebchannel.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/webchannel/qwebchannel.cpp b/src/webchannel/qwebchannel.cpp
index e4cf0d6..651de58 100644
--- a/src/webchannel/qwebchannel.cpp
+++ b/src/webchannel/qwebchannel.cpp
@@ -93,6 +93,11 @@ void QWebChannel::registerObjects(const QHash< QString, QObject * > &objects)
}
}
+QHash<QString, QObject *> QWebChannel::registeredObjects() const
+{
+ return d->publisher->registeredObjects;
+}
+
void QWebChannel::registerObject(const QString &id, QObject *object)
{
d->publisher->registerObject(id, object);
diff --git a/src/webchannel/qwebchannel.h b/src/webchannel/qwebchannel.h
index 5016b52..3e6f7a1 100644
--- a/src/webchannel/qwebchannel.h
+++ b/src/webchannel/qwebchannel.h
@@ -72,6 +72,7 @@ public:
* TODO: This must be called, before clients are initialized.
*/
void registerObjects(const QHash<QString, QObject*> &objects);
+ QHash<QString, QObject*> registeredObjects() const;
Q_INVOKABLE void registerObject(const QString &id, QObject *object);
Q_INVOKABLE void deregisterObject(QObject *object);