| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \
| |/
| |
| | |
Change-Id: I8c1dfd6b4fa2a13b45b896d03f859a127eb53078
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In the Android x86 NDK, the termios2 struct is already defined.
On ARM, it isn't defined until android-21, which is not what we
build against by default.
We should probably look for a more robust solution to this, to
support platforms where this is defined, but for now the main
issue is fixing the build.
Change-Id: I6084a90f664f9f778e6d1689106a3fb9a7ad0b2f
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The examplesinstallpath variable in .qdocconf files defines the path
under QT_INSTALL_EXAMPLES where examples are found.
To match the way examples are packaged in Qt 5.6, prefix the
install path with the repository name.
Task-number: QTBUG-48736
Change-Id: Ib1fa6c707a342c3bbbaf1ad985edd4189b93e048
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We need to use the Q_OS_OSX macro instead, because Q_OS_MAC is deprecated
and also includes iOS, which we do not support.
Besides, the *_mac file is renamed into *_osx.
Change-Id: Id8a55f4d159e6a301f508cfce37ae5e39a0b9b2a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|\ \
| |/
| |
| | |
Change-Id: I2d36b5263242f91101e3720812ecf7e91c60df2d
|
| |
| |
| |
| |
| |
| | |
Change-Id: I3dc7dcd60e66b36f0e9913760e80df798e52da80
Task-number: QTBUG-43810
Reviewed-by: Martin Smith <martin.smith@digia.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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Current approach with passing of the array's data pointer to a
Win API functions when the array is empty has potential danger.
Because the data pointer is invalid, and if a Win API function
tries to get access to this pointer then this can cause a crash
or an UB. Still this does not happens, but nobody guarantees
that this will be same in future.
It is better to pre-allocate the array with some size (e.g. with
the MAX_PATH size). In this case we can pass the data pointer
without any problem.
Besides, the Win API functions will return result with the first
pass if the array size is sufficient; otherwise it returns
ERROR_MORE_DATA error code and we can re-allocate the array with
required size and to return a result in the second pass.
We re-allocate the array with size more than required on some
bytes with filling of the array with zeros. This allows us to
convert it using QString::fromWCharArray() without specifying a
size, and to remove the toStringAndTrimNullCharacter() function.
Change-Id: I5976485286db4097514ea7b3a8adfc9a6a7cea4f
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| |
| |
| |
| |
| |
| | |
Change-Id: Ida5f8f8b3374d52b6e20e560aff97cbdc1fe8776
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Now it is used the qt_safe_select() function similar to the Qt socket
engine.
Tested on Linux (kernel 4.1.7) with the USB and virtual tty0tty
serial ports.
Change-Id: Icd7a443ee5e0b5d6453a6e9973930f41e1313eeb
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/serialport/qserialport_win.cpp
src/serialport/qserialport_wince.cpp
Change-Id: I6933b53304cf842f452404c9fac487ec6191916d
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I2712cb9157378805c7d4116c566f3188ec06bd66
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Commit a2758cf594dd08a21037873f64f72166a353aa29 introduced
a typo when the ParityError never will be detected.
Change-Id: I2e4948fab52ae9b9de482b15ecb630f1648c9978
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.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>
|
|\ \ \
| |/ /
| | |
| | | |
Change-Id: Ida48b2300ed5fb4eda3b439a44baf55e42177b00
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Now QSPI return a list of virtual serial ports
which are created by the tty0tty driver:
http://sourceforge.net/p/tty0tty/wiki/Home/
Change-Id: I7389b5ac656d54056baffd0922596feff9fe3788
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It is impossible to use a custom speed on Linux and OS X for the
separate direction; the custom speed always sets for all directions at
once.
Change-Id: I3cc0df6c5fba6c6fde38e0d49987b632f1aa571f
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
... 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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It is better to read the current termios structure each
time before changing, than to have stored it locally.
Tested with the USB serial ports.
Change-Id: I63e0c2c1c320ee4b98c8423963d78396f72eb3c2
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It is better to read the current DCB structure each
time before changing, than to have stored it locally.
Change-Id: I487931469112d657c12d99a74aa577921c042f35
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
... 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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Commit bec0b027f802d20dee00a33e9bc83d1d07b2dd42 misses cleaning of
the communicationStarted flag, that breaks the data reception
after reopening.
Change-Id: I4aa63479b3edc5c1e0a5e51f74b66fe4df15a111
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: Ia9868d010106abbfeb8f8d24e84adf37de879991
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Change-Id: I1275e80988274e2409455217d5ffb03014962604
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| |\ \
| | |/
| | |
| | | |
Change-Id: I8b8dcf2103583b0a9113a0369a89aaa71c0b1b4b
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Implementation based on the sysctl(3) system call,
in which undocumented features are used.
This implementation tested only with the USB devices,
because there is no opportunity to check it as well with
an other stuff.
Also still it is impossible to extract the description
and the manufacturer properties from the source, because
they are merged inside of one string.
Tested with the USB devices (FTDI, Prolific, ZTE, Samsung)
using FreeBSD v10.
Change-Id: I0091e4db70bfdfd4da199dd9d89dc78cf8f632b0
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
LGPLv3 refers to it but does not include it in its body.
Change-Id: Ib056b47dde3341ef9a52ffff13eed18cf3504738
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Commit 4328ab9709561842c680bc8bb7e4f2abc3ea3852 does not fix an issue,
because need to analyze ends of the deviceAbsoluteFilePath variable.
Change-Id: Idc16ab06bb06d5770fed2e05bd091fb53dd3307e
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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This error occurs at attempt to open an empty device name. In this
case we need to interpret it as QSerialPort::DeviceNotFoundError.
Change-Id: Icdf8cd5735bcc38e6ddc2ca9c326f0f993b5cd72
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: Ied609c6b2c2ae985aef1b20057741c1f4e8651f2
|
|\ \
| |/
| |
| | |
Change-Id: I913394721091750d64dad3ed0fd08ef8616edcf9
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There are no sense to keep the startAsyncWriteTimer object
when the device is closed. Because in next time the device
can be opened in read-only mode, and the startAsyncWriteTimer
will never used.
Change-Id: I315ddfa88517087dcf708b0057a0e7c27cb1a3f1
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| |
| |
| |
| |
| |
| | |
Change-Id: I8057ab7b7a641c8f6abde8e9063fd2ee56fc1165
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This avoid of the errors when the triggered notifier tries
to handle an already closed device descriptor.
Tested on Windows and Linux with the USB serial ports.
Change-Id: Iceb2e8c202b2b8d28fc87fa3a1b817df4caf39b9
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| |
| |
| |
| |
| |
| | |
Change-Id: I448179fd0ff07c45a3a7b74c675c8cc8e0579103
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
According to documentation on QObject::event(), we need to return true
in case the event was recognized and processed.
In addition, were made small modifications related to the Qt coding
style.
Tested on Linux with the virtual tty0tty serial ports.
Change-Id: Ic9a0e7e5f4957b1c1aa0a4a593ff4621792ba637
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| |
| |
| |
| |
| |
| |
| | |
Task-number: QTBUG-47210
Change-Id: I0dbed3e4e4f09b40f07f700652a762e68c27711d
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
... because earlier was used the temporal message which disappeared in
case of moving of the mouse cursor on the menu.
Change-Id: I7a7cb10120ffdd242a76e91ec08554db69e0f959
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|