| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Change-Id: Ib1dcece468c8a92f63bb45af7970711c6e3f3a09
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|\
| |
| |
| | |
Change-Id: Ibf52d73727ece041fea18c0711f018ddf9cc7960
|
| |
| |
| |
| |
| | |
Change-Id: I72c455d2e5bbd660c53edd4bbb0b3fa5b08d806e
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The macro was added in the header file, but not in
the implementation file.
Change-Id: I51bc62eedbaba627fb525c04dc126bf0125e7a39
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The function toStringAndTrimNullCharacter() deletes only trailing zeroes
from right to left direction up to the first non-zero character were meet.
This can return the wrong string in case there are the zero characters to
the left of the non-zero characters.
We should look for the first zero-character from left to right direction,
and discard all right part of a string, including the zero-character.
Task-number: QTBUG-47127
Change-Id: I4d101b49bbb153bddbe535a920d616b5fef130e9
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The method QSPP::initialize() calls the GetCommState() function,
which returns with the DCB.BaudRate field being 0. The subsequent
call of SetCommState() would fail because of that.
So, we need set DCB.BaudRate to any non-zero value (for example the input
baud rate, which defaults to 9600) before calling the SetCommState()
function.
Task-number: QTBUG-46993
Change-Id: I809246b13899733f9e0bd12b3667b23c0e43b00b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Commit ad56086040e6b40565214380b083ecf986924f92 does not solve it,
because a lock-file path does not contain the device name, but now
this issue is fixed.
Task-number: QTBUG-45338
Change-Id: I876a588b035b8a8e97ff5af76f6833ae340bf7b5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Do not remove all read bytes from the input buffer,
but only the difference between the reserved ones
and the actual read ones.
Change-Id: Ib114e3972ec295f57d011ae9ffa6613313712e32
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Terminate the notifier thread instead of relying
that the 'running' member variable is evaluated.
Most of the time, the notifier thread is blocked
inside the ::WaitCommEvent() call, so even if the
main thread requests a close by setting 'running'
to false, the condition of the while loop is not
evaluated until some data come in on the serial
line, which might not happen in an acceptable time
frame.
WinCE supports proper termination of threads, so
there shouldn't be a problem with the new approach.
The code was tested on a WinCE7 system, closing and
reopening QSerialPort works as expected now.
Change-Id: Ic311a1cc5d2a1f9a1aec6750faddd396e448dd46
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It is make sense to check the returned QCFType<CFTypeRef> property on
the null-pointer and on the CFStringRef type to exclude of possible
exception.
Thanks to Orest Hera.
Change-Id: I09f784b9ce8aa471dfb53181798d0066945efc86
Reviewed-by: Dyami Caliri <dyami@dragonframe.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
CFTypeRef returned by IORegistryEntrySearchCFProperty sometimes may be
of unexpected type (as CFStringRef instead of CFNumberRef). In this case
the CFNumberGetValue() throws the exception.
The simplest fix is to check the type in searchShortIntProperty() before
calling CFNumberGetValue():
CFGetTypeID(result.as<CFNumberRef>()) == CFNumberGetTypeID().
Thanks to Orest Hera.
Task-number: QTBUG-46875
Change-Id: Id86993c008595f9762a08739bf4c5f5662643e92
Reviewed-by: Dyami Caliri <dyami@dragonframe.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
|
| |
| |
| |
| | |
Change-Id: I5a18e838b49af313b413112c3ae8df9617c7895f
|
|\ \
| | |
| | |
| | | |
Change-Id: Idb4e8013657a60e35a7772efff5e96090eb3a104
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Change-Id: Iebd67ba1ba465fd2027a19a3e14e9932e088b2dc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Because retroactive deprecations are not allowed.
Change-Id: I8f08e68c35abaae8112cb904fc1024c97453b89f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Change-Id: I2b5b2ce8f193d09697f0a0b7e7cd1520cdf488bd
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
... that simplifies the code of waitForXX() methods. In this case
we do not need to call the completion methods, because it does the
_q_notified() slot automatically even without an event loop.
Tested with the virtual com0com serial ports, using auto tests
and examples.
Change-Id: I33d6c91d1842fd3eff1673d60e8413d471725f74
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|\ \
| |/
| |
| |
| |
| |
| | |
Conflicts:
.qmake.conf
Change-Id: Idfa590f63af206db0cc09327a100cf480cabe903
|
| |
| |
| |
| | |
Change-Id: If106bffcc9c8c0f57fc375f6a92c72eec15394c5
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This was missed since Qt 5.3.
Change-Id: Ifb00421dec915682fd35587128aae6bd36bd9c9e
Reviewed-by: Eric Lemanissier <eric.lemanissier@gmail.com>
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| |
| |
| |
| |
| |
| | |
Change-Id: Iba0b5a63d225a469fd70125a90e306ef67f68cb9
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This was missed since Qt 5.2.
Task-number: QTBUG-46066
Change-Id: I105728382a682def9bbecbf1e33d28bfff00a6e8
Reviewed-by: Eric Lemanissier <eric.lemanissier@gmail.com>
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When running the App Sandbox, a system has no any temporary directories
which can be shared between applications (or, maybe, it is configurable
option):
* https://developer.apple.com/library/mac/documentation/Security/Conceptual/AppSandboxDesignGuide/AboutAppSandbox/AboutAppSandbox.html
In this case QSP::open() can not create a lock file that lead to fails
when opening.
Workaround it is to use the
QStandardPaths::writableLocation(QStandardPaths::TempLocation) for receiving
a temporal directory of application. Where the writableLocation() implicitly
uses the NSTemporaryDirectory function that is the recommended way
(see "The App Sandbox Container Directory") in here:
* https://developer.apple.com/library/mac/documentation/Security/Conceptual/AppSandboxDesignGuide/AppSandboxInDepth/AppSandboxInDepth.html#//apple_ref/doc/uid/TP40011183-CH3-SW4
This will allow to open the serial port, but the locking feature will not
work properly.
Task-number: QTBUG-45338
Change-Id: Iea52aada11493126b0f58c40488c38c86f69fca5
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
... 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>
|