summaryrefslogtreecommitdiff
path: root/src/webchannel/signalhandler_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-011-1/+1
|\ | | | | | | Change-Id: Ib8b5300d27583018bc7582be41140dfda0ab5309
| * Fix asynchronous signals from QObjects in different threadsDave Andrews2016-09-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switches the signal listener in QWebChannel from using Qt::DirectConnection to Qt::AutoConnection to relay signals from QObjects in different affinities than the QWebChannel. Also adds a unit test in testAsyncObject() to verify that QWebChannel no longer crashes when receiving such a signal, and that such objects can be added and removed dynamically. Task-number: QTBUG-51366 Change-Id: I51a4886286fec9257a21ea95360c1ea8889a584a Reviewed-by: Dave Andrews <jetdog330@hotmail.com> Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7v5.7.0-alpha1Liang Qi2016-02-151-0/+11
|\ \ | |/ | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I42bfb38e5a9bf03b43636309fe9e29e8d772bb06
| * Add the "We mean it" warning to private headersv5.6.0-rc1v5.6.05.6.0Sergio Martins2016-02-091-0/+11
| | | | | | | | | | Change-Id: I34bcf2e4a2d66c9cb126c2edae79a45064b82a67 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* | Updated license headersAntti Kokko2016-01-201-14/+20
|/ | | | | | | | | | 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>
* Update copyright headersv5.5.0-alpha1Antti Kokko2015-02-171-6/+6
| | | | | | | | | 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>
* Fix crash on signal after deregistrationLutz Schönemann2014-12-031-9/+16
| | | | | | | | | | | | | | | 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>
* Update license headers and add new licensesJani Heikkinen2014-08-261-18/+10
| | | | | | | | | | | | | | - 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>
* Fix compilation when building with namespaced Qt.Milian Wolff2014-01-311-0/+4
| | | | | | | | Wrap everything in the QtWebChannel module with the Qt namespace or use the Qt namespace where appropriate. Change-Id: I1ef2b2f5eb22ec5e04ca76c034ef8ebf4043b899 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fixup license headers of the files written by me.Milian Wolff2014-01-161-3/+2
| | | | | | | | | | | | Some tests referenced Nokia in their license even though that was never the case. The tests where written completely by me after Qt Nokia times. What is missing are the examples which are still mostly original work by Noam back then in Nokia times. The rest was (re-)written by me completely since then anyways. Change-Id: Ib423fb3459bcc1f7464a02de4fd82ddfd614d282 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Simplify usage of QWebChannel on the server side.Milian Wolff2014-01-081-1/+1
| | | | | | | | | | | This is achieved by hiding the MetaObjectPublisher completely as private API. The QWebChannel is the only publisher API and now handles both the socket as well as the publisher internally. This now allows us to create a proper QML api in the new QmlWebChannel. Change-Id: I3096364af8485353ca9bc19df4a81a8e4552c3d7 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix assertion at shutdown or on QObject destruction.Milian Wolff2014-01-081-28/+35
| | | | | | | | | | When handling the destroyed signal of a QObject, the QMetaObject of the sender() will point to the global static QObject meta object. Thus, we also cache its signal argument types. This way, we are able to properly handle the destroyed signal with minimum effort. Change-Id: Iba1a3fc94d55adad178302cc847fd4285815e689 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Optimize SignalHandler by obsoleting the call to senderSignalIndex.Milian Wolff2013-12-271-17/+16
| | | | | | | | | This method is quite slow, and can be compared to two calls of sender(). We now encode the signal index in the methodId and thus do not have to call it anymore. The performance gain is about 27% (9.2 vs. 12.7ms). Change-Id: Iaa75efa27a54a21e27e62994de25cafd8136159d Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Cleanup and optimize code a bit by calling senderSignalIndex less.Milian Wolff2013-12-271-6/+10
| | | | | | | | | | | | | | Profiling shows that sender() and senderSignalIndex(), which again calls sender() internally, are the hotspots in benchPropertyUpdates. To speed things up a bit, call senderSignalIndex only once whenever a signal is emitted. The performance gain is about 27% (16ms vs. 22ms). While at it, also re-use the global s_destroyedSignalIndex static and also call sender() only once even when assertions are enabled. Change-Id: I90cd1a2b453e5c40d0f41276968f4545b42076bc Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Port MetaObjectPublisher benchmarks to C++.Milian Wolff2013-12-271-0/+2
| | | | | | | | | | | This allows us to remove the public API for the tests and allows for more tests and benchmarks in the future. To achieve this, we re-use the new qmetaobjectpublisher_p.h, which then also must be exported. Change-Id: I3c33b2f5be6cc674cd3092667151dd8da2263cf5 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Restructure sources and assimilate to Qt module structure.Milian Wolff2013-12-121-0/+278
This module can hopefully be done in time for 5.3. This commit changes the source structure and QMake files to adapt to typical Qt modules. With this in place, we can now use QT += webchannel in qmake files to link against the pure Qt/C++ QtWebChannel library. The QML plugin is separated from it and can be loaded optionally, if the quick module could be found. Also added is now a qmlplugindump for tooling integration. Note that the Qt.labs namespace is removed. The test file structure is also adapted to how its done in the QtDeclarative module. Note that this setup apparently does not support to run tests without running make install first. Change-Id: I1c15d72e7ab5f525d5a6f651f4e965ef86bc17bd Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>