summaryrefslogtreecommitdiff
path: root/src/src.pro
diff options
context:
space:
mode:
authorMilian Wolff <milian.wolff@kdab.com>2013-01-18 16:27:42 +0100
committerPierre Rossi <pierre.rossi@gmail.com>2013-11-01 13:57:42 +0100
commit62c243c979b172ae554f372a0d883c0273cafc53 (patch)
tree432211b3d834cf3702012afffc510c349e436e3b /src/src.pro
parentb23f72024c14153d233563f600a359456649aaaf (diff)
downloadqtwebchannel-62c243c979b172ae554f372a0d883c0273cafc53.tar.gz
Refactor the QObject QWebChannel and make the API reusable.
It might becme a very common use case of the QWebChannel QML plugin. Thus it should be as simple as possible for third party consumers to setup a QWebChannel for QObject publishing. The new API basically moves the QtMetaObjectPublisher along with the JavaScript marshalling to the qwebchannl/src folder. The updated qtobject example shows how this new API can be used. Furthermore note how it is now trivially possible to register multiple objects, which was not easily possible before. Some notes on the applied refactoring: - qobject.js contains the JavaScript QObject binding and was refactored to support multiple objects. - the MetaObjectPublisher contains a new handleRequest function which handles the QML-side of the QObject binding. This is implemented in QML, while the other book keeping and esp. the classInfoForObject is still handled in C++ via the QtMetaObjectPublisher class (which is registered as MetaObjectPublisherPrivate and used by MetaObjectPublisher) Change-Id: Id45121bb654447e095bf8a8062d0c8edf9dcb018 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
Diffstat (limited to 'src/src.pro')
-rw-r--r--src/src.pro7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/src.pro b/src/src.pro
index 1f940c6..1f5a62e 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -13,7 +13,6 @@ SOURCES += qwebchannel_plugin.cpp
HEADERS += qwebchannel_plugin.h
OTHER_FILES = qmldir \
- qwebchannel.js \
qtc_packaging/debian_harmattan/rules \
qtc_packaging/debian_harmattan/README \
qtc_packaging/debian_harmattan/copyright \
@@ -21,7 +20,9 @@ OTHER_FILES = qmldir \
qtc_packaging/debian_harmattan/compat \
qtc_packaging/debian_harmattan/changelog \
webchannel.js \
- webchannel-iframe.html
+ qobject.js \
+ webchannel-iframe.html \
+ MetaObjectPublisher.qml
!equals(_PRO_FILE_PWD_, $$OUT_PWD) {
copy_qmldir.target = $$OUT_PWD/qmldir
@@ -33,7 +34,7 @@ OTHER_FILES = qmldir \
target.path = $$[QT_INSTALL_QML]/$$TARGETPATH
-qmldir.files += $$PWD/qmldir
+qmldir.files += $$PWD/qmldir $$PWD/MetaObjectPublisher.qml
qmldir.path += $$[QT_INSTALL_QML]/$$TARGETPATH
INSTALLS += target qmldir