| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is impossible to implement this method properly on all
platforms. Its implementation is complicated and introduces
a side-effects, related to the race-conditions, permissions
and so on. The user can implement QSPI::isBusy() himself just
trying to open a desired device, what is equivalent to the
current implementation.
Change-Id: I71ef69a1a8edb7c4df23c8b2816add40475e00b5
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
| |
Change-Id: I5557b7651f96bd83a9665eee1b792d6e2b9d2409
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
| |
This method is used only once when initializing of a device.
Thus its code can be moved to an initialization place, and
this method can be removed then.
Change-Id: Ie9a40da1d6a2980829327f66830893ad7179bd57
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the error signal is connected to a slot which calls QSP::close()
and an error occurs in this method, this would lead to infinite recursion.
Other Qt I/O classes avoid this problem by not emitting errors while
closing the device, so we should not, either.
Task-number: QTBUG-50052
Change-Id: Icfbcb19c32b8bd7fc586ab5253dc754e78829f11
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
|
|
|
| |
... when udev or sysfs are unavailable.
Task-number: QTBUG-50223
Change-Id: I90ec57bcb95e6ade70eb080f553f8324b7e84387
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
|
|
| |
We need to pass a full device path into isValidSerial8250() function.
Change-Id: I771a2518fa9ec89e9519992fd52413fb0e32a4fe
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
| |
Change-Id: I1f7b5436a00dec545f6256d15147abd43f92767b
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
|
| |
Because Qt5 does not support Symbian at all.
Change-Id: I8d64db664cc54e7e5f27c031dc4c2f91d5a959f6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
This function makes sense only on *nix platforms.
Change-Id: Ia1d107e1b0d9095f4f20e1aa472798aa0af11f0f
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
|
|
| |
... because QStringList it is an overhead in there.
Change-Id: Ic5da6243348ee1a934ae2c91707de71fa7e96825
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
|
|
| |
... because use QPair and QList it is an overhead.
Change-Id: I9ed90f9301ab1fed194890e925c9124e86d3c7dc
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Also is added the test for verification of presence of ntddmodm.h file,
which contains GUID_DEVINTERFACE_MODEM definition. In case the compiler
has not this file, we define GUID_DEVINTERFACE_MODEM himself.
Change-Id: I471f76f8eabd2a200702a0970aa538c780208e18
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
| |
Task-number: QTBUG-44994
Change-Id: Id14aaa87bc648e9b775594749eaa2d6a1defdf73
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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: 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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|