| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
... 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Change-Id: I3943ff6b8fee2f651317ddbaa40ef0d27dac6475
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
|
|
|
| |
For QLatin1String, startsWith/endsWith/append/operator==/... are overloaded,
so use QLatin1String instead of QStringLiteral in such cases.
Change-Id: Id040697480b7b7f195a2b83bb85ba7e0199d38e3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The commit ab51ad6a5f4e533c31bd8e5b6f16a3bcd09a3ee6 changes a behavior
of conversion from a device location to a device name and vice-versa.
Now it is expected that the location as "/dev/cu.serial1" will be
converted to the "cu.serial1" name and vice-versa. But currently the
QSPI on OSX returns the name of device as "serial1" instead of
"cu.serial1", that lead to failure of QSP::open() method.
The reason is that a device name is queried from the dictionary with the
"kIOTTYDeviceKey" key, which always returns a right part of name from a
dot. Thus, we need to use QSPI::portNameFromSystemLocation() method
instead.
Change-Id: Id7dfb2476c4a52a4c320c64588341fe6d0a5fa7d
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Change-Id: I9f11be6f1de66af70e84a00943d8cc75909e4956
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
|
|
| |
It is reasonable make it as enum and part of QSP class.
Change-Id: I13d4561568b2688f7d1a054073455c23a64c1b94
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
|
|
| |
Silences the following Valgrind warning:
Conditional jump or move depends on uninitialised value(s)
Change-Id: I8fd8cfd6aa6f75ed515e6151cfc282faca508bdc
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
| |
Change-Id: I3baab25e299862ef1dcefe1725577302c35e6118
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous commit ac0422e8c9e74f2275129e3c7c69ef64299f07a9
already fix this issue on 5.4 branch, but in 5.5 branch this
issue is appeared again.
The reason is that in 5.5 branch is used the private read buffer
from the QIODevice, but in 5.4 branch is used the own read buffer.
In 5.5 when called the QSP::readData() then it always returns an
empty buffer, since the buffer is already read inside of QIODevice.
In this case the QSP::startAsyncRead() is never called, because a
condition in the QSP::readData() is always false. Need to call the
QSP::startAsyncRead() only if the buffer has a limited size or in
the HardwareFlow mode.
Tested on Windows 8 with the virtual com0com serial ports.
Change-Id: Idc1893f5be5034f89fc7a8fdc654a8375679c21d
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
|
|
|
| |
This macro was missed in 5.5 branch, this causes a break of building.
Change-Id: I0e79e6c6cb6c347356c449959b1cf14755a42eb1
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |\
| | |
| | |
| | | |
Change-Id: I32d198d0259ec984df78df89c4bd3a6d7cb026dc
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fix grammar, spelling, and style issues.
Change-Id: I98f8429f200d24633f504f6ea701509555da38a1
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I7623182c1ce1eecd724a2b4e8593f75a1ac49cc9
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The group page listing all the examples defined also
a \page name, which caused the generated page to
contain no examples.
Also correct the group name for Command Line Enumerator
Example, and move the qtserialport-examples.qdoc to
the correct location.
Change-Id: I6ebfbe1c49d2a44e4ed631f22027659ba43ceb8d
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Task-number: QTBUG-43810
Change-Id: Iaaeea833a78af467f8ccb56ffc1de613aa3d2c35
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| |/
| |
| |
| | |
Change-Id: Ibd1acdaeaaf3ccb5e097958fed6b33749a02442f
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When are used the multiple opening and closing chains, then a read
notification can be stalled. The reason is in old heritage of a code
related to preventing of recursive calls. Thus, need just to remove this
old code. It is not the in-depth investigation of an issue but just a
workaround which can be improved in future.
Tested on Linux with on-board and socat serial ports using Qt5.
Task-number: QTBUG-43484
Change-Id: I04556fdde2775448b33d68f141f4328647c549c9
Reviewed-by: Laszlo Papp <lpapp@kde.org>
|
| |
| |
| |
| |
| |
| |
| | |
Remove the README file as it is empty.
Change-Id: Icd252062c00d81a28a41d910161a4e56d2934493
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| |\
| | |
| | |
| | | |
refs/staging/5.4
|
| | |\
| | | |
| | | |
| | | | |
Change-Id: Ic608866ccf52db4cd42bc2563a040d9cbd47d684
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
To this changelog were added wrong changes from 5.4.1.
Change-Id: I77cc5abb7d537dda3859969d18fb22546cf466ec
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Change-Id: I7c15897db3429df3a0d122893662c20ede4c8f66
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
|
| |\ \ \
| | |/ /
| |/| |
| | | | |
Change-Id: I078c03570399f5212b660b7ed29d3e45ed995896
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Change-Id: I8a3c40202a89cd1fd264e324e6379d1f6220c340
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Commit 9c88ad89801596e1d94acc4f32ff55c34118a66f solves a problem
partially. Still when used QSP::clear() with some devices (e.g.
virtual ports from the "AGG Software") the reading can be stalled.
It is reasonable to make following:
1. Prevent to reset the both readStarted and writeStarted variables
inside of QSP::clear() method. These variables shall be reset inside
of _q_completeXX() methods which will be called automatically from the
notifiers, since the PurgeComm should terminate pending read or write
operations.
2. Instead of startAsyncRead() should be called the
startAsyncCommunication(), that allow to correctly startup of the read
sequence.
This scenario can be reproduced with running of the
tst_QSerialPort::readAfterInputClear() autotest.
Tested on Windows 8 with the virtual com0com ports and with the
virtual ports from the "AGG Software" using Qt5.
Change-Id: Ic1a53334abd97667a9dd3291c3b975eb04062efd
Reviewed-by: Robert Kurjata <rkurjata@gmail.com>
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Commit ac0422e8c9e74f2275129e3c7c69ef64299f07a9 introduced a regression
that QSP::startAsyncCommunication() was called twice when a limited read
buffer is used. In the second call the WaitCommEvent function returned the
ERROR_INVALID_PARAMETER error that lead to a stall of the read sequence.
QSP::startAsyncCommunication() should be called only when the read buffer
has enough space.
Tested on Windows 8 with the virtual com0com ports using Qt5.
Change-Id: Icd6cada7c3acfd4e689ac76ec304416b00f52b50
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Commit 62dfdeb3642250bdb642dbf607a8c7b95e57835e introduce a
critical typo that revert a bug which are fixed in the
b4d5bd813f591dc618e0fff2d55d93eeccb1a26e commit.
Change-Id: I9ed29f5b443cbd7102878287d531d18a9351a2e5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: Id5237f32002f15c64ff41e59e19c6308cc1eb2b5
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Change-Id: I7261a92ea4405c8aeab7670f73e7225ed7e4d9d0
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Some devices do not support these signals, and returns an errors when attempt
to query it. But the QSP::open() always requests a status of these lines.
In this case the QSP::open() will return true, but also will setup an error
code (for example, QSP::UnsupportedOperationError for socat's devices in
Linux). That is unexpected behavior for the user.
It is reasonable do not query a state of these signals when opening.
Also we do not need to use of appropriate internal variables, and we can
remove it.
Change-Id: I277110014c20c1f2c3fdaed20c4582d1356897b9
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The ENOTTY is closer to QSP::UnsupportedOperationError, because it
is decoded as "Inappropriate ioctl for device".
Change-Id: Ibcbe09e201eeb5ede6daa417654a181dd380df5a
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Change-Id: I41d67e9ca8d9cb6042b4d8de756a22d18b077dcd
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Inside of a method is missed setup of an error code, therefore always
returns QSP::UnknownError (or some previous error).
Tested on Linux with USB PL2303, using Terminal example (when trying to
setup of an unsupported 14400 baud rate).
Change-Id: I6b3143dd6d451a32024a5ca5239dac826ceb7af6
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Otherwise it lead to emmiting of the QSP::NotOpenError in case we close
a device from a slot, which is connected to QSP::SerialPortError signal.
In this case QSP::close() called twice: from the slot, and from the
QSP::open() method (this behavior can be reproduced with Terminal
example).
So, inside of QSP::open() we need to move QIODevice::open() down, and
instead of QSP::close() to use QSPP::close().
Tested on Linux with USB PL2303 with trying to setup an unsupported
baud rate as 14400 baud.
Change-Id: I12dec085423dd9f5a08b7884f32dd2ba8aa8c951
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
When opening is fails, the QSP himself close a device. Thus, we do not
need to close device in Terminal example again, because it caused
emmiting of the QSP::NotOpenError and to showing of additional
messagebox.
Change-Id: Id8aa3f3b835fd7d4187bdf83c1d6584d5fd541f7
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Usually, a Linux kernel reserves a places for the non-PnP serial
devices, for example, such as ttyS[0-4/14]. In case the system has not a
HW devices which are attached to this places, then these devices will be
stubs and present as usual serial ports. Thus, we can know about a
validity of these devices only in attempt to open them and to query a
type of.
Note: This patch is theoretical, because are not tested for a valid 8250
devices.
Task-number: QTBUG-32024
Change-Id: I313145caadfeeee4d5fe3c8e16c1bcf4ae79214d
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Earlier, the algorithm used check for magic keywords (like "usb",
"platform" and so on) in the target path for decision-making what
of device can be skipped or accepted. But this is a wrong approach,
because on different platforms can be different key-words and we
can not know it. So, it is more reasonable to use a different
approach where we make decision by a driver name (by analogy with
current udev implementation). In this case we skip those devices
which has an empty driver name or when a name is equal to
"serial8250".
* When a driver name is empty, then we can be sure that it is
other than serial port device (e.g. as pseudo-terminal, console
and so on). Thus, it is similar to udev devices without a parent,
which we ignore.
* When a driver name is "serial8250", it is equal to "platform"
devices, which we too ignore for current implementation. Though in
a future this can be solved (i.e. we can try to detect a valid
devices based on "serial8250" driver).
Tested on Linux with on-board and USB serial ports using Qt5.
Change-Id: I884ad8f3fddff9487ad4a67c4904b57f62164e00
Reviewed-by: Rainer Keller <rainer.keller@theqtcompany.com>
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Change-Id: I5c33421338e6a64dbadeb168cf165a84bedec5b9
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
QSPI uses the wrong algorithm of devices search. In case no any devices
are detected with udev (or with sysfs), starts a search with a filters.
In this case a user gets a list of devices that are not a serial ports,
that is wrong.
The main idea should be in that udev or sysfs are the main sources of
obtaining information. In case they returns an empty list this means
that system has no serial ports.
Algorithm is:
Try to find devices through udev. If it fails (system error or udev is
not present), then try to find using sysfs; otherwise return udev result,
even if it has an empty list. If sysfs is fails (permission denied or
sysfs is not present), then try to find devices in /dev/ as last attempt;
otherwise return sysfs result, even if it has an empty list.
Tested on Linux (with udev, sysfs, filters) using FTDI serial ports.
Change-Id: I0132e27f720b007ea3f4861e9cd7ed77833cff8c
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
When a system has many serial ports, the last of them are
not visible on the screen, because a widget has a big height.
So, it is reasonable to add scrolling of all serial ports info.
Change-Id: Ic13b58fba38a17d6f5142476bca501a0d26ec76d
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Change-Id: Ica127147999eaecc3d03189cfa9cd893115b846c
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Terminal example allows to select only available devices which are
received from QSPI. Now it is possible to enter and to open of any
custom device.
Change-Id: I83172a346cb5dc0e20c217957133e9e3e506d8a4
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Error message about missing environment variables generates list of
required variables.
Change-Id: Icbb680abbd9fc5d0549907b7399757d943c6d535
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|