summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qsocketnotifier.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Fix the spurious socket notifications under WindowsAlex Trotsenko2015-09-101-36/+0
| | | | | | | | | | | | | | | | | | | | | | | To handle network events, QEventDispatcherWin32 uses I/O model based on notifications through the window message queue. Having successfully posted notification of a particular event to an application window, no further messages for that network event will be posted to the application window until the application makes the function call that implicitly re-enables notification of that network event. With these semantics, an application need not read all available data in response to an FD_READ message: a single recv in response to each FD_READ message is appropriate. If an application issues multiple recv calls in response to a single FD_READ, it can receive multiple FD_READ messages (including spurious). To solve this issue, this patch always disables the notifier after getting a notification, and re-enables it only when the message queue is empty. Task-number: QTBUG-46552 Change-Id: I05df67032911cd1f5927fa7912f7864bfbf8711e Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* 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-0/+4
| | | | | | | | | | | | | | | | 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>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-081-1/+1
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Avoid socket notifiers on invalid file descriptorsBernd Weimer2013-04-031-5/+4
| | | | | | | | | | There is potential trouble and no point in registering a QSocketNotifier on an invalid file descriptor. This is prevented now in addition to the existing warning. Change-Id: I6fc3c639b167ea98d09a2738986360cc4b3fc210 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QThread: fix race when setting the eventDispatcherDavid Faure2013-03-221-5/+5
| | | | | | | Use QAtomicPointer to make this thread-safe. Change-Id: If71f204699fcefabdb59bd26342d777d1cc9e2a7 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Core/kernel: Make some signals private.Stephen Kelly2012-10-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | There are more opportunities in QtCore and the rest of Qt to make signals private instead of public. This is a test-dart to see if there is any reason not to do this. It would be nice to make QObject::destroyed private, but as it has a default argument it would be source incompatible to anyone connecting to the SIGNAL(destroyed()) instead of SIGNAL(destroyed(QObject*)). Currently the function-pointer-based connect syntax does not accept a functor (or lambda) with a different number of arguments than the signal. Olivier says a fix for that might come in 5.1, but for now the qfiledialog2 test is changed to not use that anymore. Also, the function pointer for a private signal can not be assigned to a local variable, so the qmetamethod test is changed to not do so anymore. Change-Id: Iaf776b822f9ba364f2c184df0c6b23811da56e44 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | 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>
* Doc: Add \inmodule QtCore to all QtCore class doc bodiesThiago Macieira2012-08-231-0/+1
| | | | | Change-Id: I19100755c97cc155c76a859e19940e9f9222d34e Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Fix more qdoc errorsLars Knoll2012-08-201-3/+2
| | | | | Change-Id: Ieed340068327f37ea0f549d24ea49235994118f4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtNetwork: Handle FD_CLOSE on WindowsMartin Petersson2012-08-011-2/+2
| | | | | | | | | | | | | We need to handle FD_CLOSE separately on Windows as this will be sent only once. When we get FD_CLOSE we need to check if there is more data available for reading. It there is this might indicate that there is another FD_READ that we need to handle after the FD_CLOSE. So in this case we will manually create another close event. Task-number: QTBUG-19409 Task-number: QTBUG-25386 Change-Id: Ie19906bc3f64fb6a85a508a5ab12caac5d70ccdb Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Socket FD are now of type qintptr.Jonas M. Gastal2012-06-011-1/+1
| | | | | | | | | | This should've been done together with the bulk of other changes in: bdce61002255b5f8b3213e93175cefdfebfde2cc and bf7f17060773803f332e8c729a70f47b94243890 Task-number: QTBUG-19004 Change-Id: I6d95a29140c1de5e6800812add9d7882511b909a Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Move QSocketNotifier data members to a private classShane Kearns2012-05-041-20/+38
| | | | | | | | This is a binary incompatible change to allow future changes to QSocketNotifier to be possible in a binary compatible way. Change-Id: If90f3393e84edd3b1ac4d4132fa8e59b6b87a8ec Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove the usage of deprecated qdoc macros.Casper van Donderen2012-03-021-8/+8
| | | | | | | | | | | QDoc now has support for Doxygen style commands for italics, bold and list items. This change applies that change in QDoc to the actual documentation. Task-number: QTBUG-24578 Change-Id: I519bf9c29b14092e3ab6067612f42bf749eeedf5 Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Make socket descriptors qintptr.Jonas M. Gastal2012-01-051-1/+1
| | | | | | | | | | Windows x64 uses 64 bits integer for sockets, to ensure compatibility we should use ptr sized integers for our socket descriptors. Task-number: QTBUG-19004 Change-Id: I4b56023874a4f1bad107c66c054fecfedde33d88 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove the remaining QT3_SUPPORT code in corelibLars Knoll2011-06-291-34/+0
| | | | | | | Change-Id: I6641c62d75d2034a46ea7cc869ae65285ae8b8f4 Reviewed-on: http://codereview.qt.nokia.com/866 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Liang Qi <liang.qi@nokia.com>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+323
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12