summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qeventdispatcher_blackberry.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-04-151-0/+2
|\ | | | | | | Change-Id: I004854a25ebbf12b1fda88900162fe7878716c58
| * Fix QNX and Blackberry -qtnamespace buildSérgio Martins2015-04-011-0/+2
| | | | | | | | | | | | Task-number: QTBUG-43569 Change-Id: I81a560d1508de4d808a807f1febdc17619cf4dda Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* | Update copyright headersJani Heikkinen2015-02-111-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. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-18/+10
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* BlackBerry: Prevent superfluous removal of socket notifiersBernd Weimer2013-11-051-12/+11
| | | | | | | | | | | | File descriptors have always been removed from bps before adding them, which lead to an annoying warning. "QEventDispatcherUNIX::registerSocketNotifier()" needs to be called after "ioEvents()" to prevent this. Task-number: QTBUG-34536 Change-Id: If074ff7a6638fe234abc100c81d094e182de7537 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* BlackBerry: improve BPS event lifetime managementJonathan Hoffmann2013-10-231-3/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In QEventDispatcherBlackberry::select(), if an event handler called through filterEvent() starts a nested event loop by creating a new QEventLoop, we will recursively enter the select() method again. However, each time bps_get_event() is called, it destroys the last event it handed out before returning the next event. We don't want it to destroy the event that triggered the nested event loop, since there may still be more handlers that need to get that event, once the nested event loop is done and control returns to the outer event loop. So we move an event to a holding channel, which takes ownership of the event. Putting the event on our own channel allows us to manage when it is destroyed, keeping it alive until we know we are done with it. Each recursive call of this function needs to have it's own holding channel, since a channel is a queue, not a stack. However, a recursive call into the select() method happens very rarely compared to the many times this method is called. We don't want to create a holding channel for each time this method is called, only when it is called recursively. Thus we have the instance variable d->holding_channel to use in the common case. We keep track of recursive calls with d->loop_level. If we are in a recursive call, then we create a new holding channel for this run. Change-Id: Ib3584676d2db5a9a3754a1535d5fb6c9e14f5dbb Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* Merge branch 'stable' into devSergio Ahumada2013-07-111-4/+10
|\ | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/mac/pbuilder_pbx.cpp src/corelib/json/qjsonwriter.cpp src/corelib/kernel/qeventdispatcher_blackberry.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm Change-Id: I24df576c4cbd18fa51b03122f71e32bb83b9028f
| * BlackBerry: Increased loop level around bps_get_eventBernd Weimer2013-06-291-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | This is needed, because bps_get_event can also invoke callbacks. Deferred deletions in such a callback are not executed for instance, because the loop level might already be at its minimum. Change-Id: I8a1b3a3f92de139575654de011352f8abc6c3c1a Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Jeff Kehres <jkehres@rim.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-05-231-0/+1
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qdatastream.cpp src/corelib/io/qdatastream.h src/corelib/json/qjsonwriter.cpp src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/xcb/qxcbkeyboard.cpp Change-Id: I46fef1455f5a9f2ce1ec394a3c65881093c51b62
| * Fix QEventDispatcherBlackberry build when debug is onRafael Roquetto2013-05-201-0/+1
| | | | | | | | | | | | | | Change-Id: Ia00d0f32e7d552421cc230ffca25085ab0a3a31e Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* | BlackBerry: Revised error handling in event dispatcherBernd Weimer2013-05-101-40/+42
|/ | | | | | | | | | | Added an upper bound check for socket notifier file descriptors. Too high FDs have been a real source of failure. Added compiler hints to allow error-free code path run faster (errors are highly unlikely) and adjusted warning messages (some were misleading and too long). Change-Id: I1c9c41f5d006ca9d3a28214c3a464555b8a1c71f Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* Work around posix violation in qnx (missing pselect())Fabian Bumberger2013-01-301-9/+9
| | | | | | | | Change-Id: I7c1ae85ee7e92da3f394b488643613894977556e Reviewed-by: Peter Hartmann <phartmann@rim.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Bernd Weimer <bweimer@rim.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* BlackBerry: Reevaluation of timer list in event dispatcherBernd Weimer2013-01-041-10/+21
| | | | | | | | | | In the event dispatcher the timer list has to be reevaluated after each call to filterEvent, because timers could be started in event filters. Change-Id: I1a275845fb74c63441f2301555f3459f8295af27 Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix some typosSergio Ahumada2012-12-211-1/+1
| | | | | Change-Id: I4e8d9bd8ea66ec810e4f1fbfd8ddbf25c4b3d980 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* BlackBerry: Restore proper BPS channel in event dispatcherBernd Weimer2012-11-211-8/+36
| | | | | | | | | | This change ensures that BPS events are delivered to the proper channel even if the application code would change the channel. Change-Id: Id44efbdd99350c639e391161dd89b8d422c4b330 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Jeff Kehres <jkehres@rim.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* Removed usage of pipe in Blackberry event dispatcherBernd Weimer2012-10-261-19/+36
| | | | | | | | | | | | Using a pipe for thread wake-ups is inefficient and can introduce significant latency. Replaced the pipe by directly sending a BPS event. Refactored the wake-up code in the private class of the UNIX event dispatcher. Change-Id: Ic073b0b56c3cbf8327fc6bc3c37132cc3583ef86 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* Fix for slowness of touch move eventsBernd Weimer2012-10-191-58/+46
| | | | | | | | | | In the event dispatcher native events will be processed in a tight loop to drain the queue. IO events and timers will be postponed. Change-Id: Ic2c06ed182027289eb5e7042fbae99efbd01ea27 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* Blackberry: Emit aboutToBlock() and awake() correctly in the dispatcherThomas McGuire2012-10-131-7/+30
| | | | | | | | | | | On Blackberry, select() can actually temporarily wake up to process mative BPS events. Make sure to emit the aboutToBlock() and awake() signals in this situation accordingly. Change-Id: Ib324e702feb1cfebdc6926f80af9c92f291a2b94 Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QNX: Fix input lagThomas McGuire2012-10-081-0/+8
| | | | | | | | We were breaking out of select() too early with a timeout of -1. Change-Id: Icd47b307a6f3a9d11c862722759e24f560e72e9e Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QNX: Remove workaround for BPS bugThomas McGuire2012-10-081-25/+6
| | | | | | | | This BPS bug has been fixed with the latest BB10 release. Change-Id: I07f86f2d18b1e04f48b95a710d57864c69726c42 Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QNX: Remove the busy loop work around for bps ignoring timeout bugSean Harmer2012-10-081-21/+41
| | | | | | | | This commit should now correctly address the throughput issue too. Change-Id: Ie75d0e6f44500f2720b7af787a58ed6c0a3c8c9d Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-23/+23
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* QNX: Add some optional debug output to event dispatcherSean Harmer2012-09-091-0/+18
| | | | | | | Change-Id: I4353619f2dc889f50a139dd5e224a79b780fb316 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QNX: Use new native event filtering apiSean Harmer2012-07-231-1/+1
| | | | | | Change-Id: Iaf25697e6250ad29085647db4b8e50e274599227 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: David Faure <faure@kde.org>
* Fix event loop throughput issueRafael Roquetto2012-07-051-8/+25
| | | | | | | | | | Currently, only one bps event can be handled per event loop iteration, bringing about a huge performance penalty. This patch fixes this issue by bulk processing events whenever they are available. Change-Id: Iecce1e86730bd90c3c81a7c6ebdf9ed83189e58e Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix socket notifier registration on Blackberry.Rafael Roquetto2012-07-041-8/+51
| | | | | | | | | | This fixes a bug on QEventDispatcherBlackberry, where registerSocketNotifier() and unregisterSocketNotifier() wrongly assumed that a file descriptor was being watched exclusively by one QSocketNotifier, while in fact there can be more than one QSocketNotifier associated with a single file descriptor. Change-Id: I0ce54bf809df109ad97f4a7f170f448d5d04d453 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Integrate Blackberry Platform Services (BPS) with Qt event loop.Jeff Kehres2012-04-241-0/+262
This ensures interoperability between the Blackbery C and C++ APIs and makes it easier to expose platform services in C++ that are exposed in BPS - since events from both APIs can be processed on the same thread. Change-Id: I7270adc64c26396f66d9126141500d5e58be51e7 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>