summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Update binary compatibility files for Qt5.9.0 for QtSerialportMilla Pohjanheimo2017-06-301-0/+4274
| | | | | | | Binary compatibility files updated for Qt5.9.0 Change-Id: Ib1009be62ab89954ea7221de88d8c0a748c8c017 Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* Binary compatibility file for qtserialport (5.8.0)Milla Pohjanheimo2017-02-031-0/+4259
| | | | | | | Added binary compatibility file for qtserialport Change-Id: Ic676c4a92f798746e43e11bd61deb67a3ad9031b Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-261-0/+53
|\ | | | | | | Change-Id: Ia83609bd366762621857a6c63bf935a6cd230742
| * Do not reset RTS after changing other properties on WindowsDenis Shienkov2016-09-231-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changing any of serial port properties drops RTS, which has been set earlier, since the fRtsControl field of DCB structure always has RTS_CONTROL_DISABLE value (except hardware flow control). Thus, using one EscapeCommFunction() function inside of QSP::setRequestToSend() method is not enough. We need set there also the fRtsControl field to RTS_CONTROL_ENABLE(DISABLE) value and keep it unchanged. Task-number: QTBUG-55907 Change-Id: I7e407b0de9f970f5d11f61c0e360d4735a0acb84 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-192-0/+8186
|\ \ | |/ | | | | Change-Id: I4f2c44fa70f4f0905daf22c619c597a4a1972c85
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-171-0/+3952
| |\ | | | | | | | | | Change-Id: I3c5b0052f5645ead630e33bce46b360fa0135061
| | * BC data files for QtSerialPort for Qt 5.6Milla Pohjanheimo2016-09-131-0/+3952
| | | | | | | | | | | | | | | | | | | | | Added binary compatibility data files for tst_bic test Change-Id: I0c3c4fc4e7d48fdcd1bec4a65a51a79f1a1a88ca Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
| * | BC data files for QtSerialPort (5.7)Milla Pohjanheimo2016-09-131-0/+4234
| | | | | | | | | | | | | | | | | | | | | | | | Added the generated data files for the binary compatibility tests for QtSerialPort for Qt 5.7. Change-Id: I5db1fb0e22e0ba62b7c82cbe028b6d4acc215e9d Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* | | Adjust to qtConfig() changes in qtbasev5.8.0-alpha1Lars Knoll2016-08-191-1/+1
|/ / | | | | | | | | Change-Id: Ie6e27e8ae0dce6892ee6ab7561876bc439aed073 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Add tests for RTS and DTR signalsDenis Shienkov2016-06-301-0/+81
| | | | | | | | | | | | Change-Id: I148339d731b77975ce56fa79a3ead485bbf02a87 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* | Use auto in more casesDenis Shienkov2016-06-151-1/+1
| | | | | | | | | | | | | | Change-Id: Id4fd74d4d45b28ddc60de6308386728a0eda8bb7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* | Replace 'Q_FOREACH' with the range-based 'for'Denis Shienkov2016-05-131-4/+4
| | | | | | | | | | | | Change-Id: I057267982ac946ce1ec863a79120cd21cd563c4b Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* | Unify license header usageAntti Kokko2016-02-023-48/+33
|/ | | | | | | | | Updated license headers to use new GPL-EXCEPT header instead of LGPL3 one (in those files which will be under GPL 3 with exceptions) Change-Id: I0a5ed401e2060999694063aeecbdb598246629d7 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* Fix stalling of reading with the limited buffer size on *nixDenis Shienkov2015-10-011-0/+45
| | | | | | | | | | | When the read buffer with a limited size is used, the read notifier becomes disabled when the buffer completely is filled. The notifier should be enabled again when several bytes were read from the read buffer. Change-Id: I723253fb153a1144009579141fa0ce1aca93b648 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Open the dummy device for tests on any platformDenis Shienkov2015-09-101-2/+0
| | | | | | | | | | | | | | | The virtual serial port drivers (such as com0com or tty0tty) require all pairs of devices were open, otherwise any I/O will fails. Seems, it is feature of com0com and tty0tty drivers, and maybe others drivers of virtual devices. There is only one waitForReadyReadWithTimeout() test which opens the dummy device only in Windows. So, it is necessary to open the dummy device on any platform. Change-Id: I472238704fe200309b5015c2f9740d8e4b6cb41f Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Remove the clearReceiver() function from the testsDenis Shienkov2015-09-101-54/+0
| | | | | | | | | It is not necessary any more. Now all tests with the com0com serial ports are passed without this function. Change-Id: I02b50ca5f28cf93e9e2731d3d0351607ffd2b814 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Use the termios v2 to custom baud rate switchingDenis Shienkov2015-09-091-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For a long time the Linux kernel has support new version of the termios structure (V2). To setup the user speed it is necessary to do following steps: * Query current content of termios2 by calling the ioctl() with the TCGETS2 flag. * Add to the c_cflag field the BOTHER flag. * Set to the c_ispeed/c_ospeed fields an actual values of custom speeds. * Write new content of termios2 back by calling the ioctl() with the TCSETS2 flag. This new method much simpler and is more transparent in implementation than changes of a custom divisor. It is preferable and will be used by default for all cases. If for some reason a current Linux kernel doesn't support the termios2, then will be falling back to the old method with changing of a custom divisor. Tested with the on-board and the USB (PL2303) serial ports. Task-number: QTBUG-48094 Change-Id: I49a5389b089980b616b4e2ff815ce0b579752d0e Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Massimo Callegari <massimocallegari@yahoo.it> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Refactor functionality of the loopBack testDenis Shienkov2015-09-081-23/+59
| | | | | | | | | | | | | | | | | Testing of a single port with connected Tx and Rx pins doesn't make sense since: * It is necessary existence of a real physical port. * It is impossible to set different speed for transmission and reception (in common case). Now the new test is deprived of these problems, it can reveal real mismatch of speeds. Change-Id: I1c60a373b60198d9aa9cefc329c0817981232de8 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Add auto tests to check a propertiesDenis Shienkov2015-09-081-0/+171
| | | | | | | | ... such as baudRate, dataBits, parity, stopBits, and flowControl. Change-Id: Ife5c2993e0c0302d06ef5f51a9fdc53f87f95896 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Refactor the speed configuration for *nixDenis Shienkov2015-09-071-0/+33
| | | | | | | | | | | | | | | | | | | | The internal implementation of this is a little tangled. It is reasonable to simplify it: 1. Remove the setBaudRate_helper() method, as it is equivalent to setStandardBaudRate() method. 2. Now the setStandardBaudRate() and the setCustomBaudRate() are self-sufficient methods (can setup a speed and an error codes internally) and return a boolean values. Also added the "loopback" test for check of different speeds. Tested with the on-board and the USB serial ports. Change-Id: I4320c2e29ad42a394e07753cbaea804d0faf6b78 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Increase time for testDenis Shienkov2015-09-061-1/+1
| | | | | | | | | | | ... because 500 msec is not enough for reopening of real USB serial port in synchronousReadWriteAfterAsynchronousReadWrite test. Tested with the USB serial ports from Prolific (PL2303). Change-Id: Ic944567247d1b4a9971489289279b8191704d38c Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Share some of windows specific tests and for *unixDenis Shienkov2015-09-061-5/+0
| | | | | | | | Tested on Linux with the USB serial ports PL2303. Change-Id: I37b887c7f3a9abe98a83fbf8af9587de330097b3 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Use the new signal/slot syntax everywherev5.6.0-alpha1Denis Shienkov2015-09-021-13/+13
| | | | | Change-Id: Ia9868d010106abbfeb8f8d24e84adf37de879991 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Avoid to start of communication notifier if it already is activeDenis Shienkov2015-08-271-0/+11
| | | | | | | | | | | | This happens in the QSP::clear() method, where the WaitCommEvent() function returns with an error "The parameter is incorrect", because it calls when the waiting already is active. Tested with the virtual com0com and on-board serial ports. Change-Id: I351a336f2d3c05852a654e7bccc3ff84d7aba025 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Get rid of incomplete and never used manual testsDenis Shienkov2015-08-066-326/+1
| | | | | | Change-Id: I8057ab7b7a641c8f6abde8e9063fd2ee56fc1165 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Allow to pass the flush tests using the tty0tty virtual devicesDenis Shienkov2015-08-051-0/+8
| | | | | | | | | The receiver on other side should be opened even if it is not used; otherwise the tests will be fails with the EINVAL error. Change-Id: I85ff942c5b7e8276f22867921239bfc8933dac77 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Fix reading when switching from asynchronous to synchronous approachDenis Shienkov2015-07-071-0/+104
| | | | | | | | | | | | | | | | | | | | | | | | | If one wants to use the asynchronous approach (using the signals and slots), and then - the synchronous (using the waitForXX functions) then synchronous reading stalls because the waitForReadyRead() method always returns the TimeoutError code. The reason is that the signal readyRead() is emitted before the startAsyncRead() (or the startAsyncCommunication()) called inside of completeAsyncRead(). Need to emit the readyRead() only after the next asynchronous reading (the startAsyncRead() or the startAsyncCommunication()) was cocked. Now the behavior is similar to behavior of QWindowsPipeReader. Besides, the auto-test which reveals this issue is added. Tested with the virtual com0com serial ports, using the auto-tests and set of the examples. Change-Id: I64bfb871d17c179f474d6672546e532566913a7f Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Andrzej Ostruszka <andrzej.ostruszka@gmail.com>
* Remove the QT_VERSION_CHECK(5, 0, 0) macrov5.5.0-beta1Denis Shienkov2015-04-193-29/+0
| | | | | | | | ... since current branch supports only Qt5. Change-Id: I2aaf4261b307eb6ca7ae32e94ddaf7801395f022 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Remove space between "if/elif defined" macro and its bracketDenis Shienkov2015-03-121-4/+4
| | | | | | | | It is the recommended coding-style which is used in the Qt core. Change-Id: Id2efc3b2276b2d86d75fe0b7240077dbb61286f0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-257-3531/+14562
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/serialport/qserialport_unix.cpp src/serialport/qserialport_unix_p.h src/serialport/qserialport_win.cpp src/serialport/qserialport_win_p.h src/serialport/qserialport_wince.cpp src/serialport/qserialport_wince_p.h Change-Id: Ibb917652b132e66fbb90f437bf762c1094911dc0
| * bic: Add/Replace 5.{1,2,3,4}.0 bic data for linux-gcc-amd64v5.4.25.4.2Sergio Ahumada2015-02-135-3520/+14514
| | | | | | | | | | | | | | | | | | Remove the ia32 data since there are no linux x86 machines in the CI system (which makes the data useless from an automated testing point of view) and most people use x64 these days anyway. Change-Id: If43f9164f94662dc7f7160babb9e3de709078fec Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
| * Skip the constructByInfo() test if no serial ports are found on *nixDenis Shienkov2015-01-161-1/+15
| | | | | | | | | | | | | | | | | | | | | | In unix-like systems it is possible to use socat to creation of the virtual serial ports. But these devices are symlinks on the /dev/pts devices, that is not a serial ports. Thus QSPI can not find it and will construct a null object. In this case this is not an error and we need just to skip test. Change-Id: I59bbb3c4653555be39ea6fff903c386065c10d0a Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
| * Share the clearReceiver() function and for the *nix testsDenis Shienkov2015-01-151-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The waitForReadyReadWithTimeout() test is failed when using the socat utility. The reason is that the receiver's side receive data from the previous waitForBytesWritten() test, even the receiver was closed and re-opened again in the new test. We need suppress this behavior using the clearReceiver() function when starting of waitForReadyReadWithTimeout() test. Change-Id: I6735aa9c9744ec1732f9bd4f701068a540ae2316 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
| * Autotest misconfiguration error message is more verboseSergey Belyashov2014-12-012-4/+31
| | | | | | | | | | | | | | | | Error message about missing environment variables generates list of required variables. Change-Id: Icbb680abbd9fc5d0549907b7399757d943c6d535 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* | Update copyright headersJani Heikkinen2015-02-135-60/+44
| | | | | | | | | | | | | | | | | | | | 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: I35f551de8408a2eb6a0f39df1f09d90c8084a7c0 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* | Merge "Merge remote-tracking branch 'origin/5.4' into dev" into refs/staging/devFrederik Gladhorn2015-01-205-1/+243
|\ \
| * \ Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-01-195-1/+243
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/serialport/qserialport.cpp src/serialport/qserialport.h src/serialport/qserialport_unix.cpp src/serialport/qserialport_unix_p.h src/serialport/qserialport_win.cpp src/serialport/qserialport_win_p.h src/serialport/qserialport_wince_p.h src/serialport/qt4support/include/private/qcore_unix_p.h Change-Id: Ifaa5ce8c1c0eb1c70246c54782719b91f3c95771
| | * Allow to use custom devices pathsDenis Shienkov2014-11-273-1/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QSP incorrectly transforms non-standard device names to their paths and vice-versa (for example, "/home/ttyS0", "//./COM1", and so on). Now this problem is solved: * The transformation code is moved to QSPP. * Added autotests auto/qserialportinfoprivate to testing of conversion algorithm. These tests are private and can be activated with building of QtSerialPort with: qmake "QT_CONFIG+=private_tests warnings_are_errors" \ DEFINES+=QT_BUILD_INTERNAL Tested on Windows 8, Linux, OSX with auto-tests, with on-board and virtual serial ports. Task-number: QTBUG-38639 Change-Id: I43757a7f1390f53ed2b1d70de59c6bfb71892a59 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
| | * Fix QSPI::isNull()Denis Shienkov2014-11-213-1/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The method QSPI::isNull() should return false when QSPI is empty. Tested on Winsows 8 and Linux with on-board, virtual and USB serial ports using Qt5 and then Qt4. Task-number: QTBUG-41262 Change-Id: Ic9e0afc5549311283aef7ec2ed841f5e418b7edf Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
* | | Improve usage of the break state for the Tx lineDenis Shienkov2015-01-151-0/+59
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Now the sendBreak() method is deprecated since it is blocking and impossible to implement same behavior on different platforms using their API's. Besides, this method can be implemented via setBreakEnabled() and QTimer. 2. Introduced the new property named as "breakEnabled" which consist of setBreakEnabled() and isBreakEnabled() methods and the signal breakEnabledChanged(). Note: After opening, the port always is in non-break state. Task-number: QTBUG-36571 Change-Id: Ib808dab7eaed8cc5449c66d8186a29a7b7e45afc Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* | Drop the Qt4 supportDenis Shienkov2014-10-233-15/+3
|/ | | | | | | | Now QtSerialPort can be built for Qt5 only. QtSerialPort for Qt4 is developed in a separate branch. Change-Id: Iaaa95fb7cb0aedbfc1b17ed11717fff8f9c126a0 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
* Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-10-141-7/+84
|\ | | | | | | Change-Id: Id7e66059233e8d07ba44cad19048d9cddc68e250
| * Restart of async reading when a QSP::clear() is calledDenis Shienkov2014-10-031-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The method QSP::clear() can stall reading in case of following situations: - at the moment when PurgeComm abort of previously started asynchronous reading operation - when a serial port is in hardware flow control mode - when a serial port has a limited read buffer size Therefore is necessary restart of asynchronous reading to enable of the read sequence. Change-Id: I7a722a1ee20ecba0dd631da96ca81d2937d7ca6b Reviewed-by: Robert Kurjata <rkurjata@gmail.com> Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
| * Fix reading on Windows at limited read buffer sizeDenis Shienkov2014-10-021-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case the read buffer has a limited size then are impossible to read remainder which is still can be in driver's queue, since no readyRead signal emmitted and reading are stalled. Problem is that Windows does not fire the EV_RXCHAR event in case a driver's queue has ready to read remainder; this event will be triggered only when a new data are received. The solution is to start of asynchronous read operation for reading of possible remainder from the queue after doing QSP::read() from the user. Besides is necessary to meet conditions: - do not start reading in case a reading already is started - do not start reading in case is not in limited buffer size - do not start reading in case is a previous reading returns a less data than read buffer size or are not in the hardware flow control mode Tested on Windows 8 with virtual com0com serial ports using Qt5 and then Qt4. Task-number: QTBUG-41295 Change-Id: I01797e6f8d6006751244144fead3616b1de1b811 Reviewed-by: Robert Kurjata <rkurjata@gmail.com> Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
| * Fix typo in twoStageSynchronousLoopback testDenis Shienkov2014-09-281-2/+2
| | | | | | | | | | | | | | | | | | Commit f1761c1236edce428278f7a9e8aa1091097eaa57 introduce a typo for receiverPort and senderPort variables, that lead to failure of test. Change-Id: I18ecad78bb11d7bb218a674c3c3bf9c863a2b33c Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch> Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
| * Fix order of passed parameters into QCOMPAREDenis Shienkov2014-09-281-7/+7
| | | | | | | | | | | | | | | | According to documentation the QCOMPARE should accept to the first parameter an actual value, and to the second parameter an expected value. Change-Id: I64e762e779fa6a61401f358c4dd6097dacf7a33a Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
* | Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-09-161-4/+160
|\ \ | |/ | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I5887622f233275703cca8cc2a5db4aaaccc72d97
| * Make tst_qtserialport build with Qt 4Samuel Gaist2014-09-121-4/+5
| | | | | | | | | | | | | | | | | | The newly moved twoStageSynchronousLoopback fails to compile since there's no qCompare available for int and long long with Qt 4. This patch allows to build it again with Qt 4 Change-Id: Ib3764b125f371ae70864bd578c7ccda39d08ae22 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
| * Fix a race condition at writing on Windowsv5.3.25.3.2Denis Shienkov2014-08-281-0/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. The writeStarted flag shall be reset to false after bytesWritten() signal is emitted, but not before it. 2. In case of start of writing from the startAsyncWriteTimer it is necessary to call the startAsyncWrite() method but not the completeAsyncWrite() method. It give guarantees to exclude of race condition to multiple call of the WriteFile twice until the write operation is not completed. For example, a race condition is watched in case of writing data from the slots which are connected to the bytesWritten() signal from a device; or to the timeout() signal from a timer with zero interval. To checking of these scenarios are added additional autotests. Tested on Windows 8 with the on-board and USB serial ports, using Qt5. Task-number: QTBUG-40769 Change-Id: Iedabbf38847debeee795a10fd7a4c54c65d2a338 Reviewed-by: Patrick Noffke <patrick.noffke@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* | Update license headers and add new license filesAntti Kokko2014-09-093-54/+30
|/ | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I08685205169cdd4b49a651ed98f36ba1e6c1bb29 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>