summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/MetaObjectPublisher.qml2
-rw-r--r--src/qobject.js5
-rw-r--r--src/webchannel.js5
3 files changed, 5 insertions, 7 deletions
diff --git a/src/MetaObjectPublisher.qml b/src/MetaObjectPublisher.qml
index 5c3cfca..8d93fc4 100644
--- a/src/MetaObjectPublisher.qml
+++ b/src/MetaObjectPublisher.qml
@@ -159,7 +159,6 @@ MetaObjectPublisherImpl
}
if (payload.type === "Qt.connectToSignal") {
if (object.hasOwnProperty(payload.signal)) {
- subscriberCountMap = subscriberCountMap || {};
subscriberCountMap[payload.object] = subscriberCountMap[payload.object] || {};
// if no one is connected, connect.
@@ -192,7 +191,6 @@ MetaObjectPublisherImpl
if (!object.hasOwnProperty(payload.signal)) {
return false;
}
- subscriberCountMap = subscriberCountMap || {};
subscriberCountMap[payload.object] = subscriberCountMap[payload.object] || {};
if (!subscriberCountMap[payload.object].hasOwnProperty(payload.signal)) {
diff --git a/src/qobject.js b/src/qobject.js
index e6513d5..27cb1e5 100644
--- a/src/qobject.js
+++ b/src/qobject.js
@@ -292,4 +292,9 @@ window.setupQObjectWebChannel = function(webChannel, doneCallback)
);
webChannel.exec({type:"Qt.init"});
+
+ webChannel.debug = function(message)
+ {
+ webChannel.send({"data" : {"type" : "Qt.Debug", "message" : message}});
+ };
};
diff --git a/src/webchannel.js b/src/webchannel.js
index 10a9594..f29bafc 100644
--- a/src/webchannel.js
+++ b/src/webchannel.js
@@ -127,10 +127,5 @@ var QWebChannel = function(baseUrl, initCallback)
channel.send({"id": [channel.id, id], "data": data});
};
- this.debug = function(message)
- {
- channel.send({"data" : {"type" : "Qt.Debug", "message" : message}});
- };
-
this.objectMap = {};
};