summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.6' into 5.7Edward Welbourne2016-07-158-54/+134
|\ | | | | | | | | | | | | | | | | | | | | | | Alleged Conflicts: examples/webchannel/chatclient-html/doc/src/chatclient-html.qdoc examples/webchannel/chatclient-qml/doc/src/chatclient-qml.qdoc examples/webchannel/chatserver-cpp/doc/src/chatserver-cpp.qdoc In each case, the two sides agreed byte-for-byte. Not quite sure what git thought the conflict was ! Change-Id: I5da9695b667f4112848c520b630ab1304d61cea3
| * Properly unwrap QObject signal parameters on the JavaScript side.Milian Wolff2016-06-281-1/+1
| | | | | | | | | | | | | | | | | | | | This enables you to pass `QObject*` parameters via signals to the JavaScript side. The object will be serialized and then unwrapped as needed now. Task-number: QTBUG-54243 Change-Id: Ie8a6d14eb1351f14f1855d242ceb3b3f8262152d Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
| * Make passing objects from website to server possibleKai Dohmen2016-06-213-27/+56
| | | | | | | | | | | | | | | | | | | | | | | | If you get an object from the server and want to pass it back to the server via a function the id of the object is passed instead of the whole json object. On the server side QMetaObjectPublisher::invokeMethod now looks up the object in QMetaObjectPublisher::wrappedObjects by the passed object-id. Task-number: QTBUG-50075 Change-Id: Id0df2dfaa79bcba12ca48391ae7537ac1a086898 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
| * Doc: Fix linking to methods and properties within the typeLeena Miettinen2016-06-011-6/+6
| | | | | | | | | | | | | | | | | | You don't need the type name for linking within the type docs. Also, the convention in QML and Qt Quick is to use a period and not a double colon. Change-Id: Ic93bae51e766ef782f089ce69dc4e54a712445c6 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
| * Doc: Use 3rd person singular verb form to begin method docsLeena Miettinen2016-06-011-4/+5
| | | | | | | | | | | | | | And fix a typo "connectect". Change-Id: I14c4b249af3cad142a5f6042b2059f653a9c3eae Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
| * Doc: Use standard verb form to start function docsLeena Miettinen2016-05-312-5/+5
| | | | | | | | | | | | | | | | For consistency, the first verb should be in 3rd person singular form. Change-Id: I5e24ecbbac1b1ab85e737f127b021f24a55c8dd4 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
| * Doc: Fix links to other modulesLeena Miettinen2016-05-313-13/+11
| | | | | | | | | | | | | | -Remove references to Qt WebKit Change-Id: I0bd184021b1a87828e93f5783c38b9ba97f37763 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
| * Doc: Edit the index pageLeena Miettinen2016-05-311-8/+32
| | | | | | | | | | | | | | | | | | | | - Remove reference to Qt WebKit - Add Getting Started section - Use standard section titles for API Reference and Examples Change-Id: Ie5e3ac792a109f680132a79e86d5e1065f4c3829 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
| * Doc: Edit example documentationLeena Miettinen2016-05-313-2/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | - Add images to the examples. - Add instructions for running the examples - Edit for grammar and style - Add dependencies to Qt WebEngine and Qt WebSockets modules - Add a workaround for preventing autolinking of WebChannel, WebEngine and WebSockets to the wrong targets - Use explicit linking where necessary Change-Id: Ia4025284063fa09c9e2a0b2c347ee682bba8a615 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
| * Fix setting properties of QJson{Value,Array,Object} type.Milian Wolff2016-05-262-8/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to the previous issue, where these types were not properly converted to QVariant when invoking a method, we manually do the conversion now to get the desired behavior. The culprit is again that QJsonValue::toVariant converts an object e.g. to a QVariantMap, and not to a QVariant containing a QJsonObject. [ChangeLog] QObject properties of type QJsonValue, QJsonArray or QJsonObject can now be set via the Qt WebChannel. Task-number: QTBUG-48198 Change-Id: I5d574b1a5cffd6d6ad9b555f2a3e872b9c3425a7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Enable calling C++ functions taking QJson arguments via webchannel.Milian Wolff2016-05-251-5/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to convert the QJsonValue arguments to QVariants, which then failed to call a C++ function which expected on of the three QJson data types, i.e. QJsonValue, QJsonObject or QJsonArray. Instead, we now detect these three cases and manually convert the QJsonValue as needed. [ChangeLog] C++ functions taking arguments of type QJsonValue, QJsonArray or QJsonObject can now be called via the Qt WebChannel. Change-Id: I94e0c8937ca35e2ecd3554f7ddf2d4e5a3328570 Task-number: QTBUG-48198 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Doc: Edit example documentationLeena Miettinen2016-06-023-2/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add images to the examples. - Add instructions for running the examples - Edit for grammar and style - Add dependencies to Qt WebEngine and Qt WebSockets modules - Add a workaround for preventing autolinking of WebChannel, WebEngine and WebSockets to the wrong targets - Use explicit linking where necessary Change-Id: Ia4025284063fa09c9e2a0b2c347ee682bba8a615 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com> (cherry picked from commit 01ea92c7c8d77d3d3c10ab1cc4bf4f214aa07126)
* | Merge remote-tracking branch 'origin/5.6' into 5.7v5.7.0-rc1Liang Qi2016-05-191-1/+1
|\ \ | |/ | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I52dc7e8ad7a9ce6fa36ad2d6ce5d8ea29b77b400
| * Doc: Remove repository name from examplesinstallpathv5.6.1-1v5.6.15.6.1Topi Reinio2016-05-121-1/+1
| | | | | | | | | | | | | | Examples in binary packages now directly match the install path. Change-Id: I06c85e42d312bd6a1e1ae619330676b717b6ccbd Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7v5.7.0-beta1Liang Qi2016-03-074-6/+6
|\ \ | |/ | | | | Change-Id: Ifb2b9cc762b5c75f1ec3bf47c607906fdfef9bd1
| * Make public headers compile with -Wzero-as-null-pointer-constantMarc Mutz2016-03-033-4/+4
| | | | | | | | | | | | | | | | | | | | | | ... or equivalent. QtBase 5.6 headers already compile that way, so let the other modules follow suit. Change-Id: I972f844bd5845f4d7d88a14ff1b358c8c2b2643d Task-number: QTBUG-45291 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
| * consistently put {qt,qml}_{module,plugin} at the end of project filesOswald Buddenhagen2016-02-251-2/+2
| | | | | | | | | | | | | | | | this fixes static builds by ensuring that all dependencies are exported. Task-number: QTBUG-51071 Change-Id: Ibf63974f6b989abb6c7967a74ff770af09bab114 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7v5.7.0-alpha1Liang Qi2016-02-156-1/+56
|\ \ | |/ | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I42bfb38e5a9bf03b43636309fe9e29e8d772bb06
| * Add the "We mean it" warning to private headersv5.6.0-rc1v5.6.05.6.0Sergio Martins2016-02-095-0/+55
| | | | | | | | | | Change-Id: I34bcf2e4a2d66c9cb126c2edae79a45064b82a67 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
| * Doc: Update examplesinstallpath to include the repository namev5.6.0-beta1Topi Reinio2015-10-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The examplesinstallpath variable in .qdocconf files defines the path under QT_INSTALL_EXAMPLES where examples are found. To match the way examples are packaged in Qt 5.6, prefix the install path with the repository name. Task-number: QTBUG-48736 Change-Id: Iafb0663b319f97d2fa3e8f938e4546ae11eaaa69 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* | Enable using the module in a statically linked applicationAndy Shaw2016-02-041-0/+8
| | | | | | | | | | Change-Id: I79bf51daf8451fab4fc0dc6af64d119383fa7387 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Updated license headersAntti Kokko2016-01-2017-241/+343
|/ | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I2fe282e6b9d52f9635cd69e3e8de53724cbb8b0a Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-022-4/+4
|\ | | | | | | | | | | | | | | Conflicts: src/webchannel/qmetaobjectpublisher.cpp src/webchannel/webchannel.pro Change-Id: Ia573d780424399a8fa6e5a809148c888b223446a
| * Compile when QML is disabled5.5Andy Shaw2015-09-292-0/+6
| | | | | | | | | | | | | | | | | | | | Since QJSValue is part of the QML module then it should check if that is available before using it so we add a QT_NO_JSVALUE define to help with this. Task-number: QTBUG-46850 Change-Id: I1974518a5c134dbb8508a46505b43c820a7a700a Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* | Fix #include's in public headersPierre Rossi2015-08-192-3/+3
| | | | | | | | | | | | | | | | | | | | | | Uniformly use the <Module/class.h> style, like https://wiki.qt.io/Coding_Conventions mandates. Change-Id: Ia2de5fb5ba4e3229c614c204d43349bd7fcbeaab Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* | Fix builds without qml moduleJulien Corjon2015-07-242-0/+6
| | | | | | | | | | | | | | | | When we build without qml module we cannot use QJSValue in qmetaobjectpublisher Change-Id: I79d06d8cc6d43fdad57cbab17ebc1756444a7311 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* | Support subclass property getters and setters.Pierre Rossi2015-07-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QDialog for instance adds a setter for the modal property already exposed by QWidget. Object.defineProperty requires configurable set to true in order to add that setter at a later stage. Adds some reusable autotest logic with a soft dependency on QJSEngine to test some of the C++/JS integration aspects. Task-number: QTBUG-46548 Change-Id: Ibd49274f7d334c068c4006fb09417abf911c24e9 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-06-291-5/+13
|\ \ | |/ | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ia5b809f6aeaa29c6acd6f45b696da285fe06b5f2
| * Doc: Added a brief overview about the modulev5.5.0-beta1Venugopal Shivashankar2015-04-201-5/+13
| | | | | | | | | | Change-Id: Ib45c48613c687fdfcafd121ed9d4932cbc116799 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* | Fix wrap registered object issueLutz Schönemann2015-05-152-4/+7
|/ | | | | | | | | | | | | | | | When wrapping a registered object the code generated a new ID for an already known object. That new ID wasn't stored but returned to the client including the objects information. That resulted in a new created object on client side but the remote object (on the server) was not accessible. This patch fixes the issue by just returning the known ID of a known object. Because the client already has a local representation of that object it does not have to unwrap the object description. Change-Id: I31964823c84c84fd7ebce4386865c18fb5518be7 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* Update copyright headersv5.5.0-alpha1Antti Kokko2015-02-1720-120/+120
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: Iebed549451f58a9fbdd86adf5d0340412d7766d7 Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* Merge branch '5.4' into devMilian Wolff2015-02-046-92/+160
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This merge required extensive conflict handling because the bug fix in 5.4 to properly wrap and forward QObjects referenced by published objects' properties clashed with some feature additions in dev, namely the client separation logic. All unit test pass for me locally now again. Conflicts: .qmake.conf src/webchannel/qmetaobjectpublisher.cpp tests/auto/qml/tst_webchannel.qml Change-Id: If3d00e13b265c6ab9fb2c38023014f97f8e7779b
| * Update plugins.qmltypesKai Koehne2014-12-042-32/+32
| | | | | | | | | | | | | | | | Also adapt the .pro file so that future updates can just be triggered by 'make qmltypes'. Change-Id: Ide120291c89e4e37991e87663b32be03af0e3f88 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
| * Fix crash on signal after deregistrationLutz Schönemann2014-12-032-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implemented a remove method in SignalHandler that allows us to remove and disconnect an object from SignalHandler w/o decrementing the connection counter until it hits zero or deleting the object That same functionality was used to remove an object from internal lists when receiving a destroyed signal from an object. In case of deregistering an object we haven't received a destoryed signal but simulated reception of that signal and so that code was not called in that case. Change-Id: Ie20cf628a2de028375f5d29f913682e25ebf8d44 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
| * Fix: Delete objects even when no transport is availableLutz Schönemann2014-12-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | The issue is that objects that get deleted will not be removed from the internal lists. This patch checks for destroyed signals in cases when no transport is available (no connection established). cherry picked from commit 037c67962de3d74669c55a9db456ffd38a28480f Change-Id: I24e345dcbfe88e15031d288eb65abb2c3066d4c0 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
| * Make objects inside properties accessible.Milian Wolff2014-12-023-35/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to the support for factory-methods, we must wrap objects in properties to make them accessible to clients. This patch adds the required code for that. Besides support for simple properties that reference an object, this patch also adds support for list properties that contain objects. The client-side unwrap of properties is delayed until all objects are initialized, as a property might reference another registered object. Change-Id: I9fb90a8eab4c66d2f4231fdb482e0d97d128df3e Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* | Make the tests less flaky and don't send empty property updates.Milian Wolff2015-01-161-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tests have been flaky on the CI. And indeed, running the tests locally under valgrind, which heavily influences the timings, I could reproduce failures on my local machine as well. The failure was due to multiple things, but most notably boils down to intermittend property update noficiations. To reduce that, the myFactory.lastObj property is propagated up. This way, any change to that property won't be propagated to the clients and influence the test. Furthermore, the failing tests are hardened by also checking the server messages, which is crucial to correct the flow of messages. Finally, a bug was found, where an empty property change could be broadcasted to all clients, when only a specific client's object got its properties changed. This is also fixed by this patch now. Change-Id: I2c7ba53253e2841db1a290872dacb097a7b984cf Reviewed-by: Bernd Lamecker <bernd.lamecker@basyskom.com> Reviewed-by: Risto Avila <risto.avila@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* | Do not broadcast signals or property changes of wrapped qobjectsBernd Lamecker2014-12-192-27/+76
| | | | | | | | | | | | | | | | | | | | | | Signals and property changes caused by dynamically created qobjects (qobjects returned from a method call at runtime) should not be broadcasted to any client but only sent to clients which know these qobjects. Also added testcases for the changes. Change-Id: I9aacfa9e7e9df9314b44c6ba8e7339a2069e3c37 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* | Separate registered and autoregistered QObjectsSumedha Widyadharma2014-12-152-24/+39
| | | | | | | | | | | | | | | | | | | | | | Currently, a new client gets a list of _all_ registered QObjects, whether they were explicitly registered or not. This leaks internal information which the clients cannot use right away anyway. Change-Id: I4b25a731e9bc2d646f903057b409aecd34dc7f11 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* | Do not broadcast initialization data to all clients.Milian Wolff2014-12-083-51/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | Instead, send the data as a response to the initialization request message. This simplifies the code and makes it more predictable, as we do not spam all clients with initialization broadcasts anymore. Note that the pending initialization "feature" is removed, but I don't see a need for it anymore. If you want to delay client initialization, do it on the client side. Change-Id: I1ab71fd6c9e809ccb6085f1a3fbac3eb9b2e910b Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-10-203-21/+6
|\ \ | |/ | | | | | | | | | | Conflicts: examples/webchannel/webchannel.pro Change-Id: Ia768202d177a24ae90358b5d88621a5fa88f9002
| * Remove obsolete conversion work-around.5.4.0Milian Wolff2014-10-172-19/+1
| | | | | | | | | | | | | | | | | | The conversion from QJSValue to QJsonArray seems to work just fine with Qt 5.4. Originally, this work-around was introduced to fix the QML tests, which still pass without this code now. Change-Id: Id52a5a16ebe25914f01d597778152e0595c9f1f4 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Never manually connect to the destroyed signal of any object.Milian Wolff2014-10-171-1/+2
| | | | | | | | | | | | | | | | | | | | The web channel always connects to that signal automatically for internal book-keeping purposes. Thus we do not have to connect to the signal for wrapped objects. This simplifies the tests and reduces the IPC traffic for wrapped objects. Change-Id: Iaf8d9ce0b87874917cdcdf9013e21a53ee36b53a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * Minor optimization: Do not send list of empty enums.Milian Wolff2014-10-171-1/+3
| | | | | | | | | | Change-Id: I1358cab3e60158b7b21b38907f872a0a7a007e71 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-10-091-0/+1
|\ \ | |/ | | | | Change-Id: I7179dcfb603cb01a62b66d0860fb57f9ef98d6d8
| * Fix static builds and building of testsSimon Hausmann2014-10-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For static linkage we need to explicitly reference the plugin factory class, to prevent the linker from discarding the symbol. The Qt build system takes care of generating the necessary code for referencing the symbol and linking that reference into the application - see also qt.prf. For the build system to do this automatically, it needs to know the class name, which is stored in the qmldir file. This patch adds the missing class name. The first failure for this was when building the tests/auto/qml test, which specifies an IMPORTPATH that causes the qml import scanner to find the erroneous qmldir file and error out (see qt.prf). However otherwise this error would've appeared when trying to link an app on say iOS for example. Change-Id: Ia28307593e651d038ff1daaea7597f6eb5e40eb1 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* | Fix: Delete objects even when no transport is availableLutz Schönemann2014-10-061-0/+2
|/ | | | | | | | | | The issue is that objects that get deleted will not be removed from the internal lists. This patch checks for destroyed signals in cases when no transport is available (no connection established). Change-Id: I384b9e9dc280887d41bbfa59476400e9d8b1199b Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* Update license headers and add new licensesJani Heikkinen2014-08-2617-306/+170
| | | | | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Furthermore we need to update the sync.profile to not point to the dev branch in order to integrate this patch in the CI. Change-Id: I06b5496b5d865e2da4808532362616429c969658 Reviewed-by: Sergio Ahumada <sahumada@blackberry.com> Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* Get rid of setTimeout calls in qwebchannel.js client code.Milian Wolff2014-08-261-2/+2
| | | | | | | | | | | | This was a historic artefact which should not be required anymore. Back then it was added when trying to improve the perceived performance of the webchannel on an embedded device. Nowadays, using the built-in WebKit IPC mechanism instead of WebSockets, paired with the rest of the code cleanup and other changes, it should not be required anymore. Change-Id: I4b2d76d84aaf92e12592a0b2bcf94710b697846e Reviewed-by: Lutz Schönemann <lutz.schoenemann@basyskom.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Doc: Edited links JavaScript API page and other documentation fixes.Jerome Pasion2014-08-233-9/+10
| | | | | | | | | The JavaScript API page is important to the rest of the documentation but there was no link to it. Task-number: QTBUG-40756 Change-Id: Id741a67ac2b57e21da548c2961c622c7516ac8cf Reviewed-by: Milian Wolff <milian.wolff@kdab.com>