summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qeventdispatcher_winrt.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | 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-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Improve checking for event/socket notifiers and timersJonathan Liu2014-09-231-3/+9
| | | | | | | | | | | | | | | | Starting/stopping timers from another thread may result in errors that may not appear until hours, days or weeks after if a release build of Qt is used with the GLib/UNIX event dispatchers. Such errors may manifest as warnings such as "QObject::killTimer(): Error: timer id 7 is not valid for object 0x2a51b488 (), timer has not been killed" and application crashes (e.g. crashes in malloc, realloc and malloc_consolidate). Initial-patch-by: Eike Ziller <eike.ziller@digia.com> Task-number: QTBUG-40636 Change-Id: I2de50d50eb1fc7467fcebb9c73b74d2f85137933 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* winrt: Fix deadlock in thread dispatcher accessAndrew Knight2014-08-131-6/+8
| | | | | | | | | | | An event dispatcher fetching the core dispatcher can deadlock when looking up the window. Simplify this by only looking up the view, and treating the event dispatcher as one which will never obtain the core dispatcher. This fixes a deadlock which occurs when starting network delegates. Change-Id: Ic27f4ab6f168eb95f3de70d78d64f035c331a7f5 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* winrt: Fix core dispatcher lookupAndrew Knight2014-08-111-19/+33
| | | | | | | | | The core dispatcher lookup should be performed from the constructor in all cases but the first (WinMain) thread, and only rechecked if the thread changes. Change-Id: I05f0c15b3e199994aa5d740b2092b42fb8d2f596 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* winrt: Handle dispatcher thread changeAndrew Knight2014-08-071-18/+21
| | | | | | | | | | If the calling thread changes when processing events, the dispatcher will no longer have thread access and event processing will fail. This can e.g. prevent new threads from being created. To remedy this, the dispatcher object is re-fetched if the thread is changed. Change-Id: I519cff521f9b84211db3f28a7a28b532de44a6a4 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* winrt: Refactor timer callbacksAndrew Knight2014-06-251-135/+115
| | | | | | | | | | | | | | With the previous solution, a thread pool timer callback fired in the same thread as the dispatcher. Now that timers can be called from the base thread pool, callbacks can come from alternate threads and so the associated event dispatcher must be tracked. This change refactors how timer info objects are created and tracked so that they can be properly created/destroyed/queued inside the timer callbacks. All QTimer tests pass. Change-Id: I18a5573df2a8fa32d1982c61e665d5df664b6db0 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* WinRT: Prevent GUI dispatcher lookup from non-GUI threadAndrew Knight2014-03-251-0/+6
| | | | | | | | | | | When we create an event dispatcher outside of the main thread, we shouldn't be looking up the core event dispatcher as it will fail. This ends up printing a scary warning for all e.g. Qt Quick apps when in reality nothing bad actually happened. Task-number: QTBUG-35327 Change-Id: I2060f0a9d4baffc42ca727e8d4e1ef7c13f6a2df Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
* WinRT: Exit process event loop if WaitForMoreEvents is not setOliver Wolff2014-02-151-0/+2
| | | | | Change-Id: Ic74a75a56ba3f014b108e96d7a79a8623e6fa1d1 Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* WinRT: move most of GUI event dispatcher logic into coreAndrew Knight2014-02-121-8/+61
| | | | | | | | | | The native event dispatcher is responsible for delivering callbacks to non-GUI handlers, such as network socket listeners. So, the non-GUI logic is moved into the core dispatcher so that the event loop works better for apps (and test cases) which use QCoreApplication. Change-Id: Ic5f7d939cf164198fd39aa5880e265ae560b39b4 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Fix WinRT timer dispatchAndrew Knight2014-01-301-17/+17
| | | | | | | | This fixes the event dispatcher lookup on timer callbacks, which was incorrectly using only the gui event dispatcher to look up timers. Change-Id: Ia01a07f6505afd0adfc0641e9c60199f258138a1 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* WinRT: Clean up core event dispatcherAndrew Knight2014-01-071-79/+87
| | | | | | | | | | | | | | | | - Move private classes in the .cpp file (they aren't needed outside) - Conform to Qt style, such as includes and braces - Use ComPtr where appropriate - Use foreach where appropriate - Remove non-functional wake/interrupt leftovers - Remove redundant timer list - Make the timer callback a static method, so it won't crash if it gets called on shutdown Task-number: QTBUG-35945 Change-Id: I5426fba2735e908a04ea60287f9936f5abde6644 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* use apartment threading for CoInitializeExMaurice Kalinowski2013-11-051-1/+1
| | | | | | | | otherwise we are risking a lock by freeing resources from other threads when calling CoUnitialized() Change-Id: I1fe09d7d3b1674a00b44ababfc90da79580278b3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* add WinRT event dispatcherOliver Wolff2013-09-261-0/+394
Change-Id: I40b3f896b89b99e271e1a5ca625a5193f4a7f59e Done-with: Kamil Trzcinski Reviewed-by: Lars Knoll <lars.knoll@digia.com>