Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package qt6-serialport for openSUSE:Factory checked in at 2023-03-17 17:03:26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/qt6-serialport (Old) and /work/SRC/openSUSE:Factory/.qt6-serialport.new.31432 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qt6-serialport" Fri Mar 17 17:03:26 2023 rev:12 rq:1072417 version:6.4.3 Changes: -------- --- /work/SRC/openSUSE:Factory/qt6-serialport/qt6-serialport.changes 2023-01-11 14:35:15.241298592 +0100 +++ /work/SRC/openSUSE:Factory/.qt6-serialport.new.31432/qt6-serialport.changes 2023-03-17 17:04:08.097640328 +0100 @@ -1,0 +2,6 @@ +Thu Mar 16 10:00:08 UTC 2023 - Christophe Marin <christo...@krop.fr> + +- Update to 6.4.3: + * https://www.qt.io/blog/qt-6.4.3-released + +------------------------------------------------------------------- Old: ---- qtserialport-everywhere-src-6.4.2.tar.xz New: ---- qtserialport-everywhere-src-6.4.3.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qt6-serialport.spec ++++++ --- /var/tmp/diff_new_pack.Dft5qR/_old 2023-03-17 17:04:08.645643199 +0100 +++ /var/tmp/diff_new_pack.Dft5qR/_new 2023-03-17 17:04:08.649643220 +0100 @@ -16,7 +16,7 @@ # -%define real_version 6.4.2 +%define real_version 6.4.3 %define short_version 6.4 %define tar_name qtserialport-everywhere-src %define tar_suffix %{nil} @@ -27,7 +27,7 @@ %endif # Name: qt6-serialport%{?pkg_suffix} -Version: 6.4.2 +Version: 6.4.3 Release: 0 Summary: Qt 6 SerialPort library License: LGPL-3.0-only OR (GPL-2.0-only OR GPL-3.0-or-later) @@ -95,8 +95,7 @@ %if !%{qt6_docs_flavor} -%post -n libQt6SerialPort6 -p /sbin/ldconfig -%postun -n libQt6SerialPort6 -p /sbin/ldconfig +%ldconfig_scriptlets -n libQt6SerialPort6 %files -n libQt6SerialPort6 %license LICENSES/* ++++++ qtserialport-everywhere-src-6.4.2.tar.xz -> qtserialport-everywhere-src-6.4.3.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtserialport-everywhere-src-6.4.2/.QT-ENTERPRISE-LICENSE-AGREEMENT new/qtserialport-everywhere-src-6.4.3/.QT-ENTERPRISE-LICENSE-AGREEMENT --- old/qtserialport-everywhere-src-6.4.2/.QT-ENTERPRISE-LICENSE-AGREEMENT 2022-12-13 08:05:05.656459800 +0100 +++ new/qtserialport-everywhere-src-6.4.3/.QT-ENTERPRISE-LICENSE-AGREEMENT 2023-03-12 11:00:39.234240500 +0100 @@ -1061,6 +1061,7 @@ - Appendix 8: Intentionally left blank (optional) - Appendix 9: Support Terms - Appendix 10: Conversion from legacy Licenses to Subscription (optional) +- Appendix 11: TERMS OF USE - QT INSIGHT TRACKER LIBRARY APPENDIX 1: LICENSED SOFTWARE @@ -1975,3 +1976,46 @@ will continue to make such payments in accordance with the applicable order documentation, notwithstanding the fact that the Current Licenses are being converted to Development Licenses pursuant to this Appendix. + +APPENDIX 11: TERMS OF USE - QT INSIGHT TRACKER LIBRARY +Version 1.0 + +Qt Insight Tracker Library ("Tracker Library") is a software module used to +collect end user data from Customer's Application and Devices relating to The +Qt Company's Qt Insight online service the Customer is ordering from The Qt +Company under a separate service agreement ("Service Agreement"). + +Unless otherwise set forth herein, definitions written in capital letters used +herein shall have the meaning set forth in the Service Agreement. + +Subject to these terms The Qt Company grants to Customer a worldwide, +non-exclusive, non-transferable, royalty-free, revocable (for cause) right and +license, valid for the term of the Service Agreement, to + (i) use, copy and modify Tracker Library for the purpose of including it + into the Devices and Applications and solely for the purpose of being + used only in conjunction with Insight Cloud or Insight Private Cloud, + and + (ii) distribute, by itself or through its Contractors, Tracker Library as + installed, incorporated, or integrated into Applications and/or + Devices. + +Use of Tracker Library in a way or for the purpose other than the above is +strictly prohibited. Tracker Library is licensed to the Customer in all +respects "as is". + +TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THE QT COMPANY ON BEHALF OF +ITSELF AND ITS LICENSORS, SUPPLIERS AND AFFILIATES, DISCLAIMS ALL OTHER +WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND +NON-INFRINGEMENT WITH REGARD TO THE TRACKER LIBRARY. THE QT COMPANY DOES NOT +WARRANT THAT THE TRACKER LIBRARY WILL SATISFY CUSTOMER'S REQUIREMENTS OR THAT +IT WILL OPERATE WITHOUT DEFECT OR ERROR OR THAT THE OPERATION THEREOF WILL BE +UNINTERRUPTED. +IN NO EVENT SHALL THE QT COMPANY BE LIABLE TO THE CUSTOMER FOR ANY LOSS OF +PROFIT, LOSS OF DATA, LOSS OF BUSINESS OR GOODWILL OR ANY OTHER INDIRECT, +SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE COST, DAMAGES OR EXPENSE OF ANY +KIND, HOWSOEVER ARISING UNDER OR IN CONNECTION WITH THE USE OF THE TRACKER +LIBRARY. + +THE TOTAL MAXIMUM LIABILITY OF THE QT COMPANY UNDER THESE TERMS SHALL IN NO +EVENT EXCEED 10,000 EUROS. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtserialport-everywhere-src-6.4.2/.cmake.conf new/qtserialport-everywhere-src-6.4.3/.cmake.conf --- old/qtserialport-everywhere-src-6.4.2/.cmake.conf 2022-12-12 15:02:02.000000000 +0100 +++ new/qtserialport-everywhere-src-6.4.3/.cmake.conf 2023-03-11 19:16:36.000000000 +0100 @@ -1,2 +1,2 @@ -set(QT_REPO_MODULE_VERSION "6.4.2") +set(QT_REPO_MODULE_VERSION "6.4.3") set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "alpha1") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtserialport-everywhere-src-6.4.2/.tag new/qtserialport-everywhere-src-6.4.3/.tag --- old/qtserialport-everywhere-src-6.4.2/.tag 2022-12-12 15:02:02.000000000 +0100 +++ new/qtserialport-everywhere-src-6.4.3/.tag 2023-03-11 19:16:36.000000000 +0100 @@ -1 +1 @@ -a29d4f9bb7f6145a6bfe0a0bb3889412a7032bfb +139e061de1825d032ef9632bf4e0f4244aadcf98 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtserialport-everywhere-src-6.4.2/dependencies.yaml new/qtserialport-everywhere-src-6.4.3/dependencies.yaml --- old/qtserialport-everywhere-src-6.4.2/dependencies.yaml 2022-12-12 15:02:02.000000000 +0100 +++ new/qtserialport-everywhere-src-6.4.3/dependencies.yaml 2023-03-11 19:16:36.000000000 +0100 @@ -1,4 +1,4 @@ dependencies: ../qtbase: - ref: e3e40c44d3f998a433a6a1080297c5f28e9a768f + ref: 519d2d8f442409e86a0ee2fa16bd543342180861 required: true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtserialport-everywhere-src-6.4.2/include/QtSerialPort/6.4.2/QtSerialPort/private/qserialport_p.h new/qtserialport-everywhere-src-6.4.3/include/QtSerialPort/6.4.2/QtSerialPort/private/qserialport_p.h --- old/qtserialport-everywhere-src-6.4.2/include/QtSerialPort/6.4.2/QtSerialPort/private/qserialport_p.h 2022-12-12 15:02:02.000000000 +0100 +++ new/qtserialport-everywhere-src-6.4.3/include/QtSerialPort/6.4.2/QtSerialPort/private/qserialport_p.h 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -#include "../../../../../src/serialport/qserialport_p.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtserialport-everywhere-src-6.4.2/include/QtSerialPort/6.4.2/QtSerialPort/private/qserialportinfo_p.h new/qtserialport-everywhere-src-6.4.3/include/QtSerialPort/6.4.2/QtSerialPort/private/qserialportinfo_p.h --- old/qtserialport-everywhere-src-6.4.2/include/QtSerialPort/6.4.2/QtSerialPort/private/qserialportinfo_p.h 2022-12-12 15:02:02.000000000 +0100 +++ new/qtserialport-everywhere-src-6.4.3/include/QtSerialPort/6.4.2/QtSerialPort/private/qserialportinfo_p.h 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -#include "../../../../../src/serialport/qserialportinfo_p.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtserialport-everywhere-src-6.4.2/include/QtSerialPort/6.4.2/QtSerialPort/private/qtudev_p.h new/qtserialport-everywhere-src-6.4.3/include/QtSerialPort/6.4.2/QtSerialPort/private/qtudev_p.h --- old/qtserialport-everywhere-src-6.4.2/include/QtSerialPort/6.4.2/QtSerialPort/private/qtudev_p.h 2022-12-12 15:02:02.000000000 +0100 +++ new/qtserialport-everywhere-src-6.4.3/include/QtSerialPort/6.4.2/QtSerialPort/private/qtudev_p.h 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -#include "../../../../../src/serialport/qtudev_p.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtserialport-everywhere-src-6.4.2/include/QtSerialPort/6.4.2/QtSerialPort/private/qwinoverlappedionotifier_p.h new/qtserialport-everywhere-src-6.4.3/include/QtSerialPort/6.4.2/QtSerialPort/private/qwinoverlappedionotifier_p.h --- old/qtserialport-everywhere-src-6.4.2/include/QtSerialPort/6.4.2/QtSerialPort/private/qwinoverlappedionotifier_p.h 2022-12-12 15:02:02.000000000 +0100 +++ new/qtserialport-everywhere-src-6.4.3/include/QtSerialPort/6.4.2/QtSerialPort/private/qwinoverlappedionotifier_p.h 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -#include "../../../../../src/serialport/qwinoverlappedionotifier_p.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtserialport-everywhere-src-6.4.2/include/QtSerialPort/6.4.3/QtSerialPort/private/qserialport_p.h new/qtserialport-everywhere-src-6.4.3/include/QtSerialPort/6.4.3/QtSerialPort/private/qserialport_p.h --- old/qtserialport-everywhere-src-6.4.2/include/QtSerialPort/6.4.3/QtSerialPort/private/qserialport_p.h 1970-01-01 01:00:00.000000000 +0100 +++ new/qtserialport-everywhere-src-6.4.3/include/QtSerialPort/6.4.3/QtSerialPort/private/qserialport_p.h 2023-03-11 19:16:36.000000000 +0100 @@ -0,0 +1 @@ +#include "../../../../../src/serialport/qserialport_p.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtserialport-everywhere-src-6.4.2/include/QtSerialPort/6.4.3/QtSerialPort/private/qserialportinfo_p.h new/qtserialport-everywhere-src-6.4.3/include/QtSerialPort/6.4.3/QtSerialPort/private/qserialportinfo_p.h --- old/qtserialport-everywhere-src-6.4.2/include/QtSerialPort/6.4.3/QtSerialPort/private/qserialportinfo_p.h 1970-01-01 01:00:00.000000000 +0100 +++ new/qtserialport-everywhere-src-6.4.3/include/QtSerialPort/6.4.3/QtSerialPort/private/qserialportinfo_p.h 2023-03-11 19:16:36.000000000 +0100 @@ -0,0 +1 @@ +#include "../../../../../src/serialport/qserialportinfo_p.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtserialport-everywhere-src-6.4.2/include/QtSerialPort/6.4.3/QtSerialPort/private/qtudev_p.h new/qtserialport-everywhere-src-6.4.3/include/QtSerialPort/6.4.3/QtSerialPort/private/qtudev_p.h --- old/qtserialport-everywhere-src-6.4.2/include/QtSerialPort/6.4.3/QtSerialPort/private/qtudev_p.h 1970-01-01 01:00:00.000000000 +0100 +++ new/qtserialport-everywhere-src-6.4.3/include/QtSerialPort/6.4.3/QtSerialPort/private/qtudev_p.h 2023-03-11 19:16:36.000000000 +0100 @@ -0,0 +1 @@ +#include "../../../../../src/serialport/qtudev_p.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtserialport-everywhere-src-6.4.2/include/QtSerialPort/6.4.3/QtSerialPort/private/qwinoverlappedionotifier_p.h new/qtserialport-everywhere-src-6.4.3/include/QtSerialPort/6.4.3/QtSerialPort/private/qwinoverlappedionotifier_p.h --- old/qtserialport-everywhere-src-6.4.2/include/QtSerialPort/6.4.3/QtSerialPort/private/qwinoverlappedionotifier_p.h 1970-01-01 01:00:00.000000000 +0100 +++ new/qtserialport-everywhere-src-6.4.3/include/QtSerialPort/6.4.3/QtSerialPort/private/qwinoverlappedionotifier_p.h 2023-03-11 19:16:36.000000000 +0100 @@ -0,0 +1 @@ +#include "../../../../../src/serialport/qwinoverlappedionotifier_p.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtserialport-everywhere-src-6.4.2/include/QtSerialPort/qtserialportversion.h new/qtserialport-everywhere-src-6.4.3/include/QtSerialPort/qtserialportversion.h --- old/qtserialport-everywhere-src-6.4.2/include/QtSerialPort/qtserialportversion.h 2022-12-13 08:05:05.000000000 +0100 +++ new/qtserialport-everywhere-src-6.4.3/include/QtSerialPort/qtserialportversion.h 2023-03-12 11:00:39.226240600 +0100 @@ -2,8 +2,8 @@ #ifndef QT_QTSERIALPORT_VERSION_H #define QT_QTSERIALPORT_VERSION_H -#define QTSERIALPORT_VERSION_STR "6.4.2" +#define QTSERIALPORT_VERSION_STR "6.4.3" -#define QTSERIALPORT_VERSION 0x060402 +#define QTSERIALPORT_VERSION 0x060403 #endif // QT_QTSERIALPORT_VERSION_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtserialport-everywhere-src-6.4.2/src/serialport/doc/src/index.qdoc new/qtserialport-everywhere-src-6.4.3/src/serialport/doc/src/index.qdoc --- old/qtserialport-everywhere-src-6.4.2/src/serialport/doc/src/index.qdoc 2022-12-12 15:02:02.000000000 +0100 +++ new/qtserialport-everywhere-src-6.4.3/src/serialport/doc/src/index.qdoc 2023-03-11 19:16:36.000000000 +0100 @@ -7,9 +7,9 @@ \title Qt Serial Port \brief Provides an API to make serial programming simple and portable. - Qt Serial Port provides the basic functionality, which includes - configuring, I/O operations, getting and setting the control signals of the - RS-232 pinouts. + Qt Serial Port provides basic functionality for configuration, I/O + operations, and getting and setting the control signals of the RS-232 + pinouts. The following items are not supported by this module: \list @@ -19,27 +19,17 @@ \li Pinout signal change notification. \endlist - To use the serial port in your application, add the following include - statement: + \section1 Using the Module - \code - #include <QSerialPort> - \endcode - - For information about available serial ports, use the following include - statement: - - \code - #include <QSerialPortInfo> - \endcode - - To use the module with cmake, use the \c{find_package()} command to locate - the needed module components in the \c{Qt6} package: - \include qtserialport-module-use.qdocinc cmakebuild - - To use the module for building with qmake, add the module as a value of the - \c QT variable in the project's .pro file: - \include qtserialport-module-use.qdocinc qmakebuild + \include {module-use.qdocinc} {using the c++ api} + + \section2 Building with Cmake + + \include {module-use.qdocinc} {building with cmake} {SerialPort} + + \section2 Building with qmake + + \include {module-use.qdocinc} {building_with_qmake} {serialport} \section1 Module Evolution \l{Changes to Qt SerialPort} lists important changes in the module API diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtserialport-everywhere-src-6.4.2/src/serialport/qserialport.cpp new/qtserialport-everywhere-src-6.4.3/src/serialport/qserialport.cpp --- old/qtserialport-everywhere-src-6.4.2/src/serialport/qserialport.cpp 2022-12-12 15:02:02.000000000 +0100 +++ new/qtserialport-everywhere-src-6.4.3/src/serialport/qserialport.cpp 2023-03-11 19:16:36.000000000 +0100 @@ -65,6 +65,7 @@ q->setErrorString(errorInfo.errorString); error.setValue(errorInfo.errorCode); + error.notify(); emit q->errorOccurred(error); } @@ -570,16 +571,16 @@ bool QSerialPort::setDataBits(DataBits dataBits) { Q_D(QSerialPort); - + d->dataBits.removeBindingUnlessInWrapper(); const auto currentDataBits = d->dataBits.value(); if (!isOpen() || d->setDataBits(dataBits)) { - d->dataBits.setValue(dataBits); - if (currentDataBits != dataBits) + d->dataBits.setValueBypassingBindings(dataBits); + if (currentDataBits != dataBits) { + d->dataBits.notify(); emit dataBitsChanged(dataBits); + } return true; } - d->dataBits.setValue(currentDataBits); // removes the binding if necessary, keep - return false; } @@ -621,16 +622,16 @@ bool QSerialPort::setParity(Parity parity) { Q_D(QSerialPort); - + d->parity.removeBindingUnlessInWrapper(); const auto currentParity = d->parity.value(); if (!isOpen() || d->setParity(parity)) { - d->parity.setValue(parity); - if (currentParity != parity) + d->parity.setValueBypassingBindings(parity); + if (currentParity != parity) { + d->parity.notify(); emit parityChanged(parity); + } return true; } - d->parity.setValue(currentParity); // removes the binding if necessary, keep - return false; } @@ -671,16 +672,16 @@ bool QSerialPort::setStopBits(StopBits stopBits) { Q_D(QSerialPort); - + d->stopBits.removeBindingUnlessInWrapper(); const auto currentStopBits = d->stopBits.value(); if (!isOpen() || d->setStopBits(stopBits)) { - d->stopBits.setValue(stopBits); - if (currentStopBits != stopBits) + d->stopBits.setValueBypassingBindings(stopBits); + if (currentStopBits != stopBits) { + d->stopBits.notify(); emit stopBitsChanged(stopBits); + } return true; } - d->stopBits.setValue(currentStopBits); // removes the binding if necessary, keep - return false; } @@ -721,16 +722,16 @@ bool QSerialPort::setFlowControl(FlowControl flowControl) { Q_D(QSerialPort); - + d->flowControl.removeBindingUnlessInWrapper(); const auto currentFlowControl = d->flowControl.value(); if (!isOpen() || d->setFlowControl(flowControl)) { - d->flowControl.setValue(flowControl); - if (currentFlowControl != flowControl) + d->flowControl.setValueBypassingBindings(flowControl); + if (currentFlowControl != flowControl) { + d->flowControl.notify(); emit flowControlChanged(flowControl); + } return true; } - d->flowControl.setValue(currentFlowControl); // removes the binding if necessary, keep - return false; } @@ -1141,21 +1142,21 @@ bool QSerialPort::setBreakEnabled(bool set) { Q_D(QSerialPort); - + d->isBreakEnabled.removeBindingUnlessInWrapper(); const auto currentSet = d->isBreakEnabled.value(); if (isOpen()) { if (d->setBreakEnabled(set)) { - d->isBreakEnabled.setValue(set); - if (currentSet != set) + d->isBreakEnabled.setValueBypassingBindings(set); + if (currentSet != set) { + d->isBreakEnabled.notify(); emit breakEnabledChanged(set); + } return true; } } else { d->setError(QSerialPortErrorInfo(QSerialPort::NotOpenError)); qWarning("%s: device not open", Q_FUNC_INFO); } - d->isBreakEnabled.setValue(currentSet); // removes the binding if necessary, keep - return false; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtserialport-everywhere-src-6.4.2/src/serialport/qwinoverlappedionotifier.cpp new/qtserialport-everywhere-src-6.4.3/src/serialport/qwinoverlappedionotifier.cpp --- old/qtserialport-everywhere-src-6.4.2/src/serialport/qwinoverlappedionotifier.cpp 2022-12-12 15:02:02.000000000 +0100 +++ new/qtserialport-everywhere-src-6.4.3/src/serialport/qwinoverlappedionotifier.cpp 2023-03-11 19:16:36.000000000 +0100 @@ -360,8 +360,8 @@ Q_Q(QWinOverlappedIoNotifier); WaitForSingleObject(hResultsMutex, INFINITE); results.enqueue(IOResult(numberOfBytes, errorCode, overlapped)); - ReleaseMutex(hResultsMutex); ReleaseSemaphore(hSemaphore, 1, NULL); + ReleaseMutex(hResultsMutex); // Do not send a signal if we didn't process the previous one. // This is done to prevent soft memory leaks when working in a completely // synchronous way. @@ -381,6 +381,15 @@ WaitForSingleObject(hResultsMutex, INFINITE); QQueue<IOResult> values; results.swap(values); + // Decreasing the semaphore count to keep it in sync with the number + // of messages in queue. As ReleaseSemaphore does not accept negative + // values, this is sort of a recommended way to go: + // https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-releasesemaphore#remarks + int numToDecrease = values.size() - 1; + while (numToDecrease > 0) { + WaitForSingleObject(hSemaphore, 0); + --numToDecrease; + } ReleaseMutex(hResultsMutex); // 'q' can go out of scope if the user decides to close the serial port // while processing some answer. So we need to guard against that. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtserialport-everywhere-src-6.4.2/tests/auto/qserialport/tst_qserialport.cpp new/qtserialport-everywhere-src-6.4.3/tests/auto/qserialport/tst_qserialport.cpp --- old/qtserialport-everywhere-src-6.4.2/tests/auto/qserialport/tst_qserialport.cpp 2022-12-12 15:02:02.000000000 +0100 +++ new/qtserialport-everywhere-src-6.4.3/tests/auto/qserialport/tst_qserialport.cpp 2023-03-11 19:16:36.000000000 +0100 @@ -1379,30 +1379,38 @@ QCOMPARE(errorChangedSpy.at(0).value(0).toInt(), QSerialPort::SerialPortError::NoError); sp.setPortName(m_receiverPortName); - sp.open(QIODevice::ReadOnly); + const bool portOpened = sp.open(QIODevice::ReadOnly); // -- break enabled - QProperty<bool> beProp(false); - QCOMPARE(beProp.value(), false); - - sp.bindableIsBreakEnabled().setBinding(Qt::makePropertyBinding(beProp)); - QCOMPARE(sp.isBreakEnabled(), false); - - const QSignalSpy breakEnabledChangedSpy(&sp, &QSerialPort::breakEnabledChanged); - - beProp = true; - QCOMPARE(sp.isBreakEnabled(), true); - QCOMPARE(breakEnabledChangedSpy.size(), 1); - QCOMPARE(breakEnabledChangedSpy.at(0).value(0).toBool(), true); - - beProp.setBinding(sp.bindableIsBreakEnabled().makeBinding()); - sp.setBreakEnabled(false); - QCOMPARE(beProp.value(), false); - - beProp.setBinding([&] { return sp.isBreakEnabled(); }); - sp.setBreakEnabled(true); - QCOMPARE(beProp.value(), true); + if (portOpened) { + QProperty<bool> beProp(false); + QCOMPARE(beProp.value(), false); + + sp.bindableIsBreakEnabled().setBinding(Qt::makePropertyBinding(beProp)); + QCOMPARE(sp.isBreakEnabled(), false); + + const QSignalSpy breakEnabledChangedSpy(&sp, &QSerialPort::breakEnabledChanged); + + beProp = true; + QCOMPARE(sp.isBreakEnabled(), true); + QCOMPARE(breakEnabledChangedSpy.size(), 1); + QCOMPARE(breakEnabledChangedSpy.at(0).value(0).toBool(), true); + + beProp.setBinding(sp.bindableIsBreakEnabled().makeBinding()); + sp.setBreakEnabled(false); + QCOMPARE(beProp.value(), false); + + beProp.setBinding([&] { return sp.isBreakEnabled(); }); + sp.setBreakEnabled(true); + QCOMPARE(beProp.value(), true); + } else { + // setting isBreakEnabled() will return false and raise an error + const auto currErrorCount = errorChangedSpy.size(); + sp.setBreakEnabled(true); + QCOMPARE(errorProp.value(), QSerialPort::SerialPortError::NotOpenError); + QCOMPARE(errorChangedSpy.size(), currErrorCount + 1); + } } QTEST_MAIN(tst_QSerialPort)