| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| | |
tqtc/lts-5.15-opensource
Change-Id: I7053ce5196cadf7069fb018d2f8415d3269a8c20
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Commit f3a306a30fc4f40d1c96fee0ed44517fe8b43d76 started processing
the whole input queue in _q_notified() slot. The reads from the input
queue are guarded by the hSemaphore variable, and this approach results
in discrepancy between the hSemaphore value and the amount of messages
in the queue.
As a result, we sometimes could try to read from an empty queue, because
the semaphore still had a non-zero value.
This commit attempts to fix it by manually adjusting the hSemaphore
count in such scenarios, and also reorderding the mutex and semaphore
calls to make sure that the hSemaphore value is not modified from the
QWinOverlapped thread while it is decremented to match the messages
count.
This commit amends f3a306a30fc4f40d1c96fee0ed44517fe8b43d76.
Fixes: QTBUG-108450
Change-Id: I0c568c37119b83aafd5f98a22703b19f37b4fbc9
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit ee17a51a12428924adadd16f8c2fe8246d6bcc7f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The revert e0dc9fd876fd545a491f3d4500ca373d4df0610b
added the commercial license header. It needs to be
updated as an LGPL header for the opensource release.
Change-Id: I7e6a0fd924873a82c1f0fc6f67dbaaf0759cea20
Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
|
|\|
| |
| |
| |
| |
| | |
tqtc/lts-5.15-opensource
Change-Id: Icc487eae04437e75442c75643914a3e27baa3b2a
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Before the patch we could end up using an already deleted
QWinOverlappedIoNotifier instance if the incoming queue has more than
one message, and the user decides to close the connection (and so delete
the notifier) before processing all of them.
This patch adds an explicit check that the QWinOverlappedIoNotifier
instance is still valid.
This commit amends f3a306a30fc4f40d1c96fee0ed44517fe8b43d76
Task-number: QTBUG-101444
Change-Id: Ieae622d248629827ed627bc9c17f7b5be491b717
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 089f1cd197e93c216aae094ffbca2b4beacf57b8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QWinOverlappedIoNotifier is using an atomic 'waiting' variable to make
sure that it does not emit _q_notify() signals in synchronous mode.
However this does not work in practice, because a notification from the
I/O completion port thread can come before we enter the blocking waiting
function, and the signal will be emitted anyway.
Those signals migth never processed when using synchronous read/write,
because in such scenarios QSerialPort works in an infinite loop in its
own thread, probably without leaving a change for proper event
processing. This leads to a situation when a lot of signals are queued
on the event loop, and the memory consumption grows.
This patch introduces another atomic variable to make sure that a new
signal is never emitted until the previous one is processed. With such
approach we have maximum one signal pending on the queue.
The drawback of this approach is that when working in asynchronous
mode, notifications might come faster than we process them, so the
processing queue might grow. To solve this, we update the code that is
handles notifications in asynchronous mode to process the whole input
queue instead of only one item.
Fixes: QTBUG-101444
Fixes: QTBUG-103822
Fixes: QTBUG-93865
Fixes: QTBUG-91237
Fixes: QTBUG-87151
Change-Id: Iad3c14ea5f0d3f3f3f9d483a1e6ab3e8b3c6c573
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit a0faf986fccdce1d36f3308dc520cdac001f5264.
Part of chain revert to go back to QWinOverlappedIoNotifier.
Task-number: QTBUG-101444
Change-Id: I1e67458ffd444fc99a25077455cbe648e49bf829
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 85ee2c658a45d2958a54045951d236769640337f.
Part of chain revert to go back to QWinOverlappedIoNotifier.
Task-number: QTBUG-101444
Change-Id: I58d88dfce6736883233afd4e9557a805d1abb708
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit f6b43c36b3839dae54308a6437bbdd99ae9a44de.
Part of chain revert to go back to QWinOverlappedIoNotifier.
Task-number: QTBUG-101444
Change-Id: I393f741a627de91302689fb3f45d0082864c35df
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit aa00e8eb623d5cb4ba32860dd3671a87f3763f89.
Part of chain revert to go back to QWinOverlappedIoNotifier.
Task-number: QTBUG-101444
Change-Id: I863ee26ba010371689ccc3083435a5d28fb36fed
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
|
|/
|
|
|
|
|
|
|
|
|
| |
This reverts commit 79cc3f07a089e9f58b0b2487b274cca36261bd30.
Revert of commercial license headers is required for Qt 5.15.3
opensource release.
Task-number: QTBUG-91108
Change-Id: I1bf013ca03cbdaba7a965ff800c9a5ab9d723ca6
Reviewed-by: Antti Kokko <antti.kokko@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Updated header.COMM to the files in tqtc-qtserialport.
Examples, tests or documentation files are not updated.
The commercial license header may contain some
additional lines so that its line count equals with
the earlier license header. Reason for this is that
some autotests use hard coded line numbers and a
changes in the line count causes failures in tests.
Task-number: QTQAINFRA-4217
Change-Id: I35a7e264c70a923884ea0fec2c97ee824476062f
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Commit a1655d6ccf3 has deprecated some error conditions in
QSerialport. This patch adds a little bit more information
that these error conditions shall be handled in user code now.
Fixes: QTBUG-80930
Change-Id: I13e0a27db98729d038fef654a3a36d7091d45358
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The header file for QWinOverlappedIoNotifier is not available when building
on non-Windows platform - as the class is \internal anyway, suppress
the Clang-parser warnings by marking also the member functions as
\internal.
Remove a link to example file page terminal/console.cpp, as QDoc
no longer treats these files as linkable targets.
Fixes: QTBUG-79809
Change-Id: Ic3bc33c1c27bc234513fe6977877116ed16c22eb
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
|
|
|
|
|
|
|
| |
That condition overwrites the actual condition at the top of the file.
Fixes: QTBUG-79208
Change-Id: I70905ed693b30b6aa15b29bbf42acf33d9df2b35
Reviewed-by: Liang Qi <liang.qi@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have same 'resolveSymbols' functions names in the global
namespace as in the qtserialport module and as in the qtserialbus
module. This can lead to the arbitrary call of this function from
a different module that can lead to the crash or other issue
(e.g. to this issue QTBUG-78546). So, we can just to rename this
function that solves this issue in the future.
Change-Id: I25f9d2a33c6858c5194d8c76eefd518eecfb6f7b
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
| |
Change-Id: Ib8c633534df0cf025b8d9845de6322b8285e73c1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
|
|\
| |
| |
| | |
Change-Id: I946c7c1cfb6b34e15f21f83e7a3ce01f34874839
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 85ee2c658a45d2958a54045951d236769640337f.
That commit completely breaks the I/O on Windows.
Task-number: QTBUG-78086
Change-Id: I9125967d6cb5b1cb4e33d0bad80ee66322e5ccc7
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
|
| |
| |
| |
| |
| |
| | |
Change-Id: I007eb08f66a17d6e8ba200dc2e4e0529ba696ffa
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Fixed the build with disabled deprecated APIs.
- Made the docs for deprecated APIs to compile conditionally,
based on the deprecation version.
Task-number: QTBUG-76491
Change-Id: I38fbd84254d3d35b2bc208994c9fd70142450ad8
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|\|
| |
| |
| |
| |
| |
| | |
Conflicts:
.qmake.conf
Change-Id: I0f003a4aef121836be3ed7f1b82e23321fdfe884
|
| |\ |
|
| | |\
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Conflicts:
.qmake.conf
Change-Id: I5ce880f305ebb0af7f7803769cecf2c899bede12
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
When using the waitXXX functions in a loop, many _q_notify signals are
emitted. They are connection via Qt::QueuedConnection, but the event
loop never gets the chance to process them.
Introduce a counter to count the attempts to send a notification, but
only send it once.
Fixes: QTBUG-74961
Change-Id: I0ee4522db63844bdd37169d3a31bde2d6f92f383
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| |/ /
| | |
| | |
| | |
| | |
| | | |
Task-number: QTBUG-74391
Change-Id: I5a468676a2dd9dd44aa80d39a614b06acb0aed81
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
| |\|
| | |
| | |
| | | |
Change-Id: I3d5718006e8fee8fa3c2f97aec03183a4db1aa7c
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The 'gadget' serial devices have no parent nodes and were skipped from
enumeration. We need to check the names of these devices against the
'ttyGS' prefix and then add matching devices to the enumeration.
[ChangeLog] Fixed enumeration of 'Gadget' (/dev/ttyGS*) serial devices
on Linux.
Change-Id: I88afd80358153795152c1b2c929ca5bfb3adbabb
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit removes the QWinOverlappedIoNotifier in favor of alertable
I/O functions like {Read|Write}FileEx(). The reason is that the
QWinOverlappedIoNotifier is very complex to maintain.
To use the alertable functions in the serial port we need an
alertable analog of WaitCommEvent function. This function does not
exist in the Win32 API, but we implement it trough a set of the
system NtXXX and RtlXXX functions, which are resolved dynamically.
This patch was tested with auto-tests and the examples using the:
* com0com virtual serial port driver.
* eltima virtual serial port driver.
* pl2303 USB/serial converters.
Task-number: QTBUG-74961
Change-Id: Idc428173eee7a1066a4693de00aa38416c4ee86c
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I3931aca16393acc9c698dcf018801e1d031004bc
|
| |
| |
| |
| |
| | |
Change-Id: I9cf8c41c4fb37728154bc0cd74124a549b00e3ff
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
|
|\|
| |
| |
| | |
Change-Id: I35bc56c0e1bc2efa96c86c7a0a33322e72a4fdd9
|
| |
| |
| |
| |
| |
| | |
Change-Id: Ie4f4239368e292cfbd7e36456c7c1d638d404077
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|/
|
|
|
|
|
|
|
|
| |
It is not allowed to include files within Qt namespace.
See 5b99f3a3 in qtbase dev.
Change-Id: I21af750ef73dfe3c1191c1e8cc843c3235be3c19
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Fixes numerous warnings:
unknown pragma ignored [-Wunknown-pragmas]
when compiling with clang-cl.
Task-number: QTBUG-63512
Change-Id: Idba2ab207d6512e3930ee467b98d4dc73b8aeb25
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit d57b9e83857253a1479f89fca18ea5856db39fb7 introduced
a regression, where the QSP may ignore all the read events when
the data comes to the device within opening. In this case, even
re-opening of a device does not help.
Reason is that the QWinOverlappedIoNotifier is enabled after than
the startAsyncCommunication() called, that probably, leads to
ignoring for all EV_RXCHAR events. A workaround is to enable the
notifier before than any of I/O operation called.
Task-number: QTBUG-67224
Change-Id: I21538fddc4dfd850c600e1d74f3c393a59a00549
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Following code snippet:
QSerialPort serial("/dev/ttyUSB0");
serial.open(QIODevice::WriteOnly);
serial.write("ABCDEF");
serial.waitForBytesWritten(-1);
causes an application crash if some of data will be received by the
serial port.
Reason is that qt_poll_msecs() triggered with POLLIN event, even if the
device is opened with O_WRONLY flag. In this case the readNotification()
handler is called, which trying to reserve some space from the
uninitialized read QRingBuffer, that causes an assertion.
Solution is to don't use the POLLIN event if device is open with
O_WRONLY flag.
Change-Id: I205be31608359f52b5ef286a33dd266ed11a2649
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
.qmake.conf
Change-Id: Icf5a1d17d2a9ea612449f2fdbf6903892cbed411
|
| |
| |
| |
| |
| |
| |
| |
| | |
old header.LGPL21 was used in some src files.Replace ones in src/ with
correct header.LGPL one. Also remove unnecessary license files.
Change-Id: I1d752c8361b8b23fcd3232818553da60bbdabfca
Reviewed-by: Liang Qi <liang.qi@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
As QWinOverlappedIoNotifierPrivate is not documented, replace
the /*! ... */ comment with a standard C-style comment.
Change-Id: I813e62503214fc686b913ccd770fb6e35922baa9
Reviewed-by: Martin Smith <martin.smith@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
QDoc requires the function body to follow immediately after the
/*! ... */ comment.
Change-Id: I385bdfe16003e29950352a83ddb13fe75badcc5f
Reviewed-by: Martin Smith <martin.smith@qt.io>
|
|\|
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
examples/serialport/blockingmaster/masterthread.h
examples/serialport/blockingslave/slavethread.h
Change-Id: I6b6bf25b41ff0f1b0b9632069d3b13f6c47c6421
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The examples were already adopted to use <QSerialPort> instead
<QtSerialPort/QtSerialPort>.
Change-Id: Id9d3b0b04f31ac3d32554aa34941696903511577
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Qt includes should be added before platform-specific includes.
Change-Id: Ie8bcf306c9e0f3d5d719ee57bcddc8bd2967f5cb
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It makes sense to use the
QStandardPaths::writableLocation(QStandardPaths::TempLocation)
directory for any of Unix-like platforms, as a 'last resort'
to store the lock-files, if no other preferable directory
was found.
Change-Id: Ifd1a5789c014388509b29837171d3fdc440d63e6
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Change-Id: I844f5102077e7b4d5240947a614bfb163c8b7890
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Change-Id: I12da9eb3a57fc312fb4b029714166af10755ca76
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Change-Id: I427b993a3a71f199029a8956cdf0dc2c98f0e444
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
|