| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
.qmake.conf
examples/serialport/blockingmaster/masterthread.cpp
Change-Id: I3716089bae99247f98ed02656d4418de5f866c1d
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
[ChangeLog][QSerialPort] Added a note to the documentation that
waitForReadyRead() and waitForBytesWritten() never time out if
the parameter msecs is -1.
Change-Id: I5852da14faf1bba5a338db6a8764da582238aae7
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| |
| |
| |
| |
| |
| | |
Change-Id: I427b993a3a71f199029a8956cdf0dc2c98f0e444
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
|
|\ \
| |/
| |
| |
| |
| |
| |
| | |
Conflicts:
.qmake.conf
src/serialport/qserialport_win.cpp
Change-Id: Icc832e218a1135cb82e780ccaa63abd990289eaf
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We should not add the size of the internal write buffer here because
QIODevice::bytesToWrite() already checks it. Also, take into account
the size of 'writeChunkBuffer' on Windows.
Change-Id: I87dfcb4dd1cd9d2bbb6f82a084d79fb4db9323d8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The limitations were introduced by the commit 56c001b, but were not
documented.
Change-Id: I5e44ab78e2e5cce2477ebc1f83280fa8c22e0ef6
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Read notifications should be enabled all the time while the device is
opened unless the buffer size limit is reached. To enable the read
notifier again, the user needs to read the data or enlarge the buffer
with a setReadBufferSize() call.
According to that scenario, it's very likely that the device will
toggle the state of notifier twice (on->off->on) in one notification
cycle. This patch prevents this unnecessary toggling by:
- unconditionally setting the notifier's state in setReadBufferSize()/
readData();
- deferring the notification disabling in readNotification() on Unix
and in completeAsyncRead() on Windows to the next notification
cycle.
Change-Id: I97fc041bb705c034a7e73d1437e64b9b34dc2c18
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reduces the number of syscalls and thus the CPU load when dealing
with fast ports. And 32KiB seems still small enough to be no concern on
modern hardware even if it's excessive for a given port.
Change-Id: I4749e4255627d3abf2393323216e01ac6436413b
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|/
|
|
|
|
|
|
|
| |
The event mask variable is used only once in process of initialization,
so we do not need to keep this variable as the class member.
Change-Id: I1f97a312cc92345d435dee821fefb8c2de33665e
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
|
|
| |
... where has been added the '\c' tag where it is required.
Change-Id: Ie346fc147deb535501eb365693a2ff5fe22a98f9
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
| |
qserialport.cpp: In member function 'void QSerialPort::setSettingsRestoredOnClose(bool)':
qserialport.cpp:627:9: warning: 'void QSerialPort::settingsRestoredOnCloseChanged(bool)' is deprecated [-Wdeprecated-declarations]
Change-Id: I4ed17403cd1692c4f965a69be711f0c5b03a8376
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|\
| |
| |
| | |
Change-Id: I4f2c44fa70f4f0905daf22c619c597a4a1972c85
|
| |\
| | |
| | |
| | | |
Change-Id: I3c5b0052f5645ead630e33bce46b360fa0135061
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
... otherwise the snippet with the blocking reading does not
make sense logically.
Change-Id: I5a037e7c44f50e57a1c48ab37764f9e7367a6dec
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Make the name of the signal and the name of the getter unambiguous,
which in turn allows the easy use of Qt 5-style connects.
This commit message was taken from commit qtbase/4672e31.
[ChangeLog][QtSerialPort][QSerialPort] Deprecated QSP::error()
signal in favor of new QSP::errorOccurred() one.
Change-Id: I3f04bb8b1ae686d5368d43741cd0e97748b31b8f
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
.qmake.conf
src/serialport/qserialport.cpp
Change-Id: I858fec6e426f5fd867b7eda7b1db69a2d447b357
|
| |\ \
| | |/
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/serialport/qserialport_win.cpp
Change-Id: I8f3403d448ef2e51cf2870b331c61ab808393e34
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
QRingBuffer does not guarantee that the read pointer which is
returned by QRingBuffer::readPointer() will stay valid after
calling QRingBuffer::reserve() or QRingBuffer::append().
Thus, we need to detach the buffer's segment and pass it to the
WriteFile() function to ensure it stays unmodified for the whole
time of the asynchronous operation.
Change-Id: I5a42086b4339a050a4df57c39348864502be2c74
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Anton Kudryavtsev <a.kudryavtsev@netris.ru>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
As Windows CE support has been stopped since Qt 5.7.
Change-Id: I850c5e1e41508502a9e82491f89488facca40f51
Reviewed-by: Anton Kudryavtsev <a.kudryavtsev@netris.ru>
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Currently, the method QSP::open() several times calls the system
functions to get/set of DCB/termios structures for each parameter.
It is not rational and should be minimized as possible, in ideally
to once executed.
Change-Id: If1f308176a82f3c8896fc648bf656f089e099f3f
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
... and adjust their documentation a bit.
[ChangeLog][QtSerialPort][QSerialPort] Added missing parameters for
waitFor() methods
Change-Id: I95d7076bfef47dd75d37960ca8a719ae779737d6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|/ /
| |
| |
| |
| |
| | |
Change-Id: Ieda6cd8452391a1fd3276a35c9854cf764dbb679
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
... due to 'forever' is planned to be deprecated in Qt,
and as 'for' is standard keyword.
Change-Id: I05bec96d637389a22a2633e4b2bd8384ba17de10
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Now we can drop the WinCE (5/6) support, because its compilers
do not support the C++11 features, that lead to the further
API limitations and so on.
Change-Id: I2431d15b1361f1e093fc09ff7fbe824daeac3984
Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|\ \
| |/
| |
| | |
Change-Id: I35f19a7d266f90e957bfe01534a40c4d98b40b34
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It is an error when the RTS changes manually when the
HardwareFlowControl is set. In this case the driver operates with the
RTS automatically, so manual control is not allowed. But some drivers
ignore this requirement and do not return errors in attempt of manual
RTS control. Thus, we have to forbid change of RTS and to return the
UnsupportedOperationError error.
Change-Id: I80bc87d51d9c653ed15ec310fca654243821b1e7
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Update old header.LGPL3 to header.LGPL
Change-Id: I1b17b6f798ee521d2e3bd8c37024df7cd65ee0c4
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
|
|\ \
| |/
| |
| | |
Change-Id: Idc590cb4d891d7701cc443be80275c4d9ccfa5a6
|
| |
| |
| |
| |
| |
| | |
Task-number: QTBUG-44994
Change-Id: Id14aaa87bc648e9b775594749eaa2d6a1defdf73
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|/
|
|
|
|
|
| |
These conditions are checked in the base implementation.
Change-Id: I4bb010d48c6a581a140ba697f9dc31390d2067d2
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Commit qtbase/ed0c0070f9b05c647019270dfc42073d071c830a
introduces a new helper function qt_subtract_from_timeout()
which can be used to reduce a code duplication.
Change-Id: I5c4941360f524225c14eac8c308fb16a546c802f
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is impossible to implement all these features on all platforms,
and particular drivers may not support them, too.
Consequently, the user should handle such errors themselves by applying
platform-specific ioctls on the device descriptor and/or parsing the
stream's byte-stuffing.
This commit also deprecates ParityError, FramingError, and
BreakConditionError.
Tested on Windows and Linux with the virtual and the
USB serial ports.
Change-Id: I4ffc2f067787bc304a83326acb2a2421b428f986
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is impossible to fix the dataErrorPolicy property that it worked at
any platforms (this property does not work at all), besides, this
property was deprecated. Therefore we can use always only the
IgnorePolicy value for all cases, that will not be worse than it is.
It gives a chance to get rid of internal code, related to dataErrorPolicy
handling in favor to fixing of the Mark/Space parity handling, and the
Parity/Frame/BreackCondition errors handling.
Change-Id: Ib0c5d1396819aabe459002c5ca5cca5840052eff
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
| |
Change-Id: I1275e80988274e2409455217d5ffb03014962604
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|\
| |
| |
| | |
Change-Id: I8b8dcf2103583b0a9113a0369a89aaa71c0b1b4b
|
| |
| |
| |
| |
| |
| |
| |
| | |
qserialport.cpp:1373:32: warning: unused variable 'd' [-Wunused-variable]
Change-Id: I31adafe0089d13362b4a7c0efeddfbfb138f9415
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
|
|
| |
Change-Id: Ic85e246c6bd5a6684f44940fb1c229835083c9dc
Task-number: QTBUG-45391
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
|
|\
| |
| |
| | |
Change-Id: Ibf52d73727ece041fea18c0711f018ddf9cc7960
|
| |
| |
| |
| |
| | |
Change-Id: I72c455d2e5bbd660c53edd4bbb0b3fa5b08d806e
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The macro was added for the signals in the header file, but not
in the implementation file.
Change-Id: Ie10b6bfffcbd8012f8e50b2009d95d826d983199
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The macro was added in the header file, but not in
the implementation file.
Change-Id: Ia46563d19fba7dd1a1e1fbe40039f62667d32b11
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
|
| |
| |
| |
| |
| |
| | |
Change-Id: Ic083cbd58e4e775ede0cdf610f61407003834207
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Sometimes the error string would contain a wrong description which
did not correspond to the system error code. The reason was
qt_error_string() being called too late, when the system error
might have already been overwritten.
The error processing is now in QSPP::getSystemError(), which returns both
the error code and the error description as soon as possible.
* Now the QSPP::getSystemError() returns the new class
QSerialPortErrorInfo which contains all necessary fields.
* The new method QSPP::setError() which accepts the
QSerialPortErrorInfo as input parameter is used.
* The old private method QSP::setError() is removed, because
it is not used anywhere.
Change-Id: Ia7e4d617b863e2131175c52812cdf426ed963795
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It is not worth to spread the platform-specifics over multiple
files, as the difference are actually tiny and much better
expressed with an ifdef.
Change-Id: I5279e05d52ce5243ad3d0655c6353e1fb18891a1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Because we now (in the Qt 5.5 branch) use QIODevicePrivate's internal read
buffer directly, there is no need to call buffer.read() in QSP::readData().
There is also no point in keeping the platform-specific implementations of
QSPP::readData(), so remove them.
Tested on Windows using the virtual com0com serial ports, and on
Linux usig the virtual tty0tty serial ports.
Change-Id: I136c6d10708cc6fc99a77c351c3945470530845d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
|
| |
| |
| |
| |
| |
| | |
Change-Id: I2b5b2ce8f193d09697f0a0b7e7cd1520cdf488bd
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QSP::clearError() calls setError() with an empty error string.
But setError() anyway calls the qt_error_string() that sets an
error string from an system error which occurred before, that
is garbage in this case.
Thus, we need to call qt_error_string() only if the input
QSP::SerialPortError is not NoError.
Change-Id: I0260159d74579de47bcf1c7b2f4e747be6817269
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| |
| |
| |
| |
| |
| | |
Change-Id: I2313bd6160ffe18766b50257957b2cc66834290d
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|