summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qcfsocketnotifier.cpp
Commit message (Collapse)AuthorAgeFilesLines
* macOS: Notify socket notifier on connection error6.0Morten Johan Sørvig2021-07-021-3/+11
| | | | | | | | | | | | | | Enable kCFSocketConnectCallBack to get connection made/failed notifications. For the error case, the data pointer will be set (it points to an int with the error code). Change-Id: Ib51c0ae7c2c74d7bc2fea3c8b7aa9033a860f602 Fixes: QTBUG-91619 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit d492245d9f98e410e1748f28a598945244dbafa8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Make QEventDispatcherCoreFoundaton work on secondary threadsMorten Johan Sørvig2018-08-091-3/+3
| | | | | | | | | | | | | | | | | | | We were using CFRunLoopGetMain() everywhere. Get the correct run loop using CFRunLoopGetCurrent() during initialization, and store it. Event dispatcher initialization must now be delayed until after the constructor has run, since event dispatchers may be created on the main thread and then moved to the target thread. Initialize on first call to processEvents() where the current thread will be the correct thread. Use the stored m_runLoop instead of CFRunLoopGetMain(). This is required for wakeUp() and interrupt() which may be called from another thread. Change-Id: I6fffcfd4394899c4a12f241c42781979aaf99d5e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QCFSocketNotifier: fix registering a source in the run loopAlex Trotsenko2017-05-031-2/+11
| | | | | | | | | | | | | | Even if a callback type is not automatically re-enabled, callbacks are implicitly enabled when the source has been added to the run loop. In this case, calling CFSocketEnableCallBacks() could produce an extra notification if there is a pending event in the queue. The bug is quite unstable and completely depends on the internal OS delays. So, it can't be tested inside Qt. Task-number: QTBUG-59930 Change-Id: I751b8b8cf99cb86b80055f2214a42a638f01abe4 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Updated license headersJani Heikkinen2016-01-151-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: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QtCore: eradicate all Q_FOREACH loops [kernel]Marc Mutz2016-01-121-3/+3
| | | | | | | | Saves just 168b in text size on optimized GCC 4.9 Linux AMD64 builds, but most for loops are in non-Linux code. Change-Id: I4f20a65c2e4953011308ff831c9e8fa37a25274b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-231-0/+1
| | | | | | | | Conflicts: src/corelib/kernel/qcfsocketnotifier.cpp src/tools/qdoc/qdocindexfiles.cpp Change-Id: Iae365b23afc611de8794f22cceae8b210d25aa8a
* Fix compilation on OSX when building in a namespace.Erik Verbruggen2015-10-201-0/+3
| | | | | Change-Id: I377d9ffe95b72e098a91e6da564b59a56b34cf4e Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* Move QEventDispatcherCoreFoundation to QtCoreMorten Johan Sørvig2015-10-161-0/+303
Export it for use by the iOS platform plugin. Also move QCFSocketNotifier, and export for use by the Cocoa platform plugin. This is a pure code move with no intended behavior changes, in anticipation of using the Core Foundation event dispatcher as the default Qt Core event dispatcher on OS X. Change-Id: I43677d2f6f3c1d0ed0415c964225aa97d2f13078 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>