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 2025-10-13 17:23:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/qt6-serialport (Old)
 and      /work/SRC/openSUSE:Factory/.qt6-serialport.new.18484 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "qt6-serialport"

Mon Oct 13 17:23:48 2025 rev:32 rq:1310365 version:6.10.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/qt6-serialport/qt6-serialport.changes    
2025-08-29 18:35:53.067803803 +0200
+++ /work/SRC/openSUSE:Factory/.qt6-serialport.new.18484/qt6-serialport.changes 
2025-10-13 17:27:02.998577125 +0200
@@ -1,0 +2,6 @@
+Tue Oct  7 08:53:29 UTC 2025 - Christophe Marin <[email protected]>
+
+- Update to 6.10.0
+  * https://www.qt.io/blog/qt-6.10-released
+
+-------------------------------------------------------------------

Old:
----
  qtserialport-everywhere-src-6.9.2.tar.xz

New:
----
  qtserialport-everywhere-src-6.10.0.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ qt6-serialport.spec ++++++
--- /var/tmp/diff_new_pack.2VilCK/_old  2025-10-13 17:27:04.266630150 +0200
+++ /var/tmp/diff_new_pack.2VilCK/_new  2025-10-13 17:27:04.270630318 +0200
@@ -16,8 +16,8 @@
 #
 
 
-%define real_version 6.9.2
-%define short_version 6.9
+%define real_version 6.10.0
+%define short_version 6.10
 %define tar_name qtserialport-everywhere-src
 %define tar_suffix %{nil}
 #
@@ -27,10 +27,10 @@
 %endif
 #
 Name:           qt6-serialport%{?pkg_suffix}
-Version:        6.9.2
+Version:        6.10.0
 Release:        0
 Summary:        Qt 6 SerialPort library
-License:        LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+License:        GPL-2.0-only OR LGPL-3.0-only OR GPL-3.0-only
 URL:            https://www.qt.io
 Source0:        
https://download.qt.io/official_releases/qt/%{short_version}/%{real_version}%{tar_suffix}/submodules/%{tar_name}-%{real_version}%{tar_suffix}.tar.xz
 Source99:       qt6-serialport-rpmlintrc
@@ -108,7 +108,7 @@
 %{_qt6_includedir}/QtSerialPort/
 %{_qt6_libdir}/libQt6SerialPort.prl
 %{_qt6_libdir}/libQt6SerialPort.so
-%{_qt6_metatypesdir}/qt6serialport_*_metatypes.json
+%{_qt6_metatypesdir}/qt6serialport_metatypes.json
 %{_qt6_mkspecsdir}/modules/qt_lib_serialport.pri
 %{_qt6_pkgconfigdir}/Qt6SerialPort.pc
 %exclude %{_qt6_includedir}/QtSerialPort/%{real_version}/

++++++ qtserialport-everywhere-src-6.9.2.tar.xz -> 
qtserialport-everywhere-src-6.10.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtserialport-everywhere-src-6.9.2/.cmake.conf 
new/qtserialport-everywhere-src-6.10.0/.cmake.conf
--- old/qtserialport-everywhere-src-6.9.2/.cmake.conf   2025-08-17 
21:32:06.000000000 +0200
+++ new/qtserialport-everywhere-src-6.10.0/.cmake.conf  2025-10-01 
20:34:30.000000000 +0200
@@ -1,4 +1,4 @@
-set(QT_REPO_MODULE_VERSION "6.9.2")
+set(QT_REPO_MODULE_VERSION "6.10.0")
 set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "alpha1")
 set(QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_AS_CONST=1")
 list(APPEND QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_FOREACH=1")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtserialport-everywhere-src-6.9.2/.tag 
new/qtserialport-everywhere-src-6.10.0/.tag
--- old/qtserialport-everywhere-src-6.9.2/.tag  2025-08-17 21:32:06.000000000 
+0200
+++ new/qtserialport-everywhere-src-6.10.0/.tag 2025-10-01 20:34:30.000000000 
+0200
@@ -1 +1 @@
-0065f193698e984f8ab319f780f318a01265a9f6
+63c618b07d7a78905a48eaf685051898d932cb69
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtserialport-everywhere-src-6.9.2/dependencies.yaml 
new/qtserialport-everywhere-src-6.10.0/dependencies.yaml
--- old/qtserialport-everywhere-src-6.9.2/dependencies.yaml     2025-08-17 
21:32:06.000000000 +0200
+++ new/qtserialport-everywhere-src-6.10.0/dependencies.yaml    2025-10-01 
20:34:30.000000000 +0200
@@ -1,4 +1,4 @@
 dependencies:
   ../qtbase:
-    ref: 6f0d27d2e4ba5fa6562f738aaaf8eaf98ebf51e7
+    ref: 5a8637e4516bc48a0b3f4b5ec3b18618b92e7222
     required: true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtserialport-everywhere-src-6.9.2/src/serialport/doc/qtserialport.qdocconf 
new/qtserialport-everywhere-src-6.10.0/src/serialport/doc/qtserialport.qdocconf
--- 
old/qtserialport-everywhere-src-6.9.2/src/serialport/doc/qtserialport.qdocconf  
    2025-08-17 21:32:06.000000000 +0200
+++ 
new/qtserialport-everywhere-src-6.10.0/src/serialport/doc/qtserialport.qdocconf 
    2025-10-01 20:34:30.000000000 +0200
@@ -36,6 +36,9 @@
 
 examplesinstallpath = serialport
 
+# Path to the root of qtserialport (for automatic linking to source code)
+url.sources.rootdir     = ../../..
+
 depends += qtcore qtdoc qtnetwork qmake qtcmake
 
 navigation.landingpage = "Qt Serial Port"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtserialport-everywhere-src-6.9.2/src/serialport/qserialport.cpp 
new/qtserialport-everywhere-src-6.10.0/src/serialport/qserialport.cpp
--- old/qtserialport-everywhere-src-6.9.2/src/serialport/qserialport.cpp        
2025-08-17 21:32:06.000000000 +0200
+++ new/qtserialport-everywhere-src-6.10.0/src/serialport/qserialport.cpp       
2025-10-01 20:34:30.000000000 +0200
@@ -1030,6 +1030,59 @@
 }
 
 /*!
+    \since 6.10
+
+    Returns the size of the internal write buffer.
+
+    A write buffer size of \c 0 (the default) means that the buffer has
+    no size limit.
+
+    \sa setWriteBufferSize(), write()
+*/
+qint64 QSerialPort::writeBufferSize() const
+{
+    Q_D(const QSerialPort);
+    return d->writeBufferMaxSize;
+}
+
+/*!
+    \since 6.10
+
+    Sets the size of QSerialPort's internal write buffer to be \a
+    size bytes.
+
+    Sending the data over serial port is relatively slow, so in practice, when
+    \l write() is called, the data is not sent immediately. It is first stored
+    in an intermediate buffer and later written in chunks.
+
+    Thus, an attempt to write too much data or write data at a higher rate than
+    the underlying serial port can handle, can lead to a situation when the
+    internal buffer will grow. This can eventually cause the application to
+    run out of memory, specially on a device with low memory resources.
+
+    This method allows to limit the internal buffer to a certain size. If the
+    next write attempt exceeds the capacity of the buffer, the \l write()
+    method will return the amount of bytes that were actually stored in the
+    buffer. It's the user's responsibility to repeat the write attempt with the
+    rest of the bytes after the \l bytesWritten() signal was received, or after
+    the \l waitForBytesWritten() method returns \c true.
+
+    Passing \c 0 to this method means that the input buffer is not limited, and
+    all the incoming data is buffered. This is the default.
+
+    \sa writeBufferSize(), write()
+*/
+void QSerialPort::setWriteBufferSize(qint64 size)
+{
+    Q_D(QSerialPort);
+    if (size < 0)
+        size = 0;
+    d->writeBufferMaxSize = size;
+    if (isWritable())
+        d->flush();
+}
+
+/*!
     \reimp
 
     Always returns \c true. The serial port is a sequential device.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtserialport-everywhere-src-6.9.2/src/serialport/qserialport.h 
new/qtserialport-everywhere-src-6.10.0/src/serialport/qserialport.h
--- old/qtserialport-everywhere-src-6.9.2/src/serialport/qserialport.h  
2025-08-17 21:32:06.000000000 +0200
+++ new/qtserialport-everywhere-src-6.10.0/src/serialport/qserialport.h 
2025-10-01 20:34:30.000000000 +0200
@@ -179,6 +179,9 @@
     qint64 readBufferSize() const;
     void setReadBufferSize(qint64 size);
 
+    qint64 writeBufferSize() const;
+    void setWriteBufferSize(qint64 size);
+
     bool isSequential() const override;
 
     qint64 bytesAvailable() const override;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtserialport-everywhere-src-6.9.2/src/serialport/qserialport_p.h 
new/qtserialport-everywhere-src-6.10.0/src/serialport/qserialport_p.h
--- old/qtserialport-everywhere-src-6.9.2/src/serialport/qserialport_p.h        
2025-08-17 21:32:06.000000000 +0200
+++ new/qtserialport-everywhere-src-6.10.0/src/serialport/qserialport_p.h       
2025-10-01 20:34:30.000000000 +0200
@@ -130,6 +130,7 @@
     static QList<qint32> standardBaudRates();
 
     qint64 readBufferMaxSize = 0;
+    qint64 writeBufferMaxSize = 0;
 
     void setBindableError(QSerialPort::SerialPortError error)
     { setError(error); }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtserialport-everywhere-src-6.9.2/src/serialport/qserialport_unix.cpp 
new/qtserialport-everywhere-src-6.10.0/src/serialport/qserialport_unix.cpp
--- old/qtserialport-everywhere-src-6.9.2/src/serialport/qserialport_unix.cpp   
2025-08-17 21:32:06.000000000 +0200
+++ new/qtserialport-everywhere-src-6.10.0/src/serialport/qserialport_unix.cpp  
2025-10-01 20:34:30.000000000 +0200
@@ -922,10 +922,15 @@
 
 qint64 QSerialPortPrivate::writeData(const char *data, qint64 maxSize)
 {
-    writeBuffer.append(data, maxSize);
+    qint64 toAppend = maxSize;
+
+    if (writeBufferMaxSize && (writeBuffer.size() + toAppend > 
writeBufferMaxSize))
+        toAppend = writeBufferMaxSize - writeBuffer.size();
+
+    writeBuffer.append(data, toAppend);
     if (!writeBuffer.isEmpty() && !isWriteNotificationEnabled())
         setWriteNotificationEnabled(true);
-    return maxSize;
+    return toAppend;
 }
 
 bool QSerialPortPrivate::setTermios(const termios *tio)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtserialport-everywhere-src-6.9.2/src/serialport/qserialport_win.cpp 
new/qtserialport-everywhere-src-6.10.0/src/serialport/qserialport_win.cpp
--- old/qtserialport-everywhere-src-6.9.2/src/serialport/qserialport_win.cpp    
2025-08-17 21:32:06.000000000 +0200
+++ new/qtserialport-everywhere-src-6.10.0/src/serialport/qserialport_win.cpp   
2025-10-01 20:34:30.000000000 +0200
@@ -593,7 +593,12 @@
 {
     Q_Q(QSerialPort);
 
-    writeBuffer.append(data, maxSize);
+    qint64 toAppend = maxSize;
+
+    if (writeBufferMaxSize && (writeBuffer.size() + toAppend > 
writeBufferMaxSize))
+        toAppend = writeBufferMaxSize - writeBuffer.size();
+
+    writeBuffer.append(data, toAppend);
 
     if (!writeBuffer.isEmpty() && !writeStarted) {
         if (!startAsyncWriteTimer) {
@@ -604,7 +609,7 @@
         if (!startAsyncWriteTimer->isActive())
             startAsyncWriteTimer->start();
     }
-    return maxSize;
+    return toAppend;
 }
 
 OVERLAPPED *QSerialPortPrivate::waitForNotified(QDeadlineTimer deadline)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtserialport-everywhere-src-6.9.2/src/serialport/qserialportinfo_win.cpp 
new/qtserialport-everywhere-src-6.10.0/src/serialport/qserialportinfo_win.cpp
--- 
old/qtserialport-everywhere-src-6.9.2/src/serialport/qserialportinfo_win.cpp    
    2025-08-17 21:32:06.000000000 +0200
+++ 
new/qtserialport-everywhere-src-6.10.0/src/serialport/qserialportinfo_win.cpp   
    2025-10-01 20:34:30.000000000 +0200
@@ -542,8 +542,9 @@
                     deviceProductIdentifier(instanceIdentifier, 
priv.hasProductIdentifier);
 
             // This makes Windows return the same data that linux does for 
Manufacturer and Product
-            if (instanceIdentifier.startsWith(L"USB\\") && 
priv.hasVendorIdentifier &&
-                priv.hasProductIdentifier) {
+            if ((instanceIdentifier.startsWith(L"USB\\")
+                 || instanceIdentifier.startsWith(L"FTDIBUS\\"))
+                && priv.hasVendorIdentifier && priv.hasProductIdentifier) {
                 UsbData usbStrings = 
getUSBDataFromDevice(deviceInfoData.DevInst);
 
                 if (!usbStrings.iManufacturer.isEmpty())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtserialport-everywhere-src-6.9.2/tests/auto/qserialport/tst_qserialport.cpp
 
new/qtserialport-everywhere-src-6.10.0/tests/auto/qserialport/tst_qserialport.cpp
--- 
old/qtserialport-everywhere-src-6.9.2/tests/auto/qserialport/tst_qserialport.cpp
    2025-08-17 21:32:06.000000000 +0200
+++ 
new/qtserialport-everywhere-src-6.10.0/tests/auto/qserialport/tst_qserialport.cpp
   2025-10-01 20:34:30.000000000 +0200
@@ -130,6 +130,9 @@
 
     void readyReadNotRecursive();
 
+    void writeBufferSizeLimit_data();
+    void writeBufferSizeLimit();
+
 protected slots:
     void handleBytesWrittenAndExitLoopSlot(qint64 bytesWritten);
     void handleBytesWrittenAndExitLoopSlot2(qint64 bytesWritten);
@@ -1669,5 +1672,85 @@
     QCOMPARE(reader.receivedData(), alphabetArray);
 }
 
+void tst_QSerialPort::writeBufferSizeLimit_data()
+{
+    QTest::addColumn<qint64>("writeBufferSize");
+
+    QTest::newRow("NoLimit") << 0LL;
+    QTest::newRow("8Kb") << 8 * 1024LL;
+}
+
+void tst_QSerialPort::writeBufferSizeLimit()
+{
+    QFETCH(const qint64, writeBufferSize);
+
+    auto setupPort = [](QSerialPort &port) {
+        port.setBaudRate(QSerialPort::Baud115200);
+        port.setDataBits(QSerialPort::Data8);
+        port.setParity(QSerialPort::NoParity);
+        port.setStopBits(QSerialPort::OneStop);
+    };
+
+    QSerialPort sender(m_senderPortName);
+    QCOMPARE_EQ(sender.writeBufferSize(), 0); // unlimited by default
+    QSignalSpy senderSpy(&sender, &QSerialPort::bytesWritten);
+    setupPort(sender);
+    sender.setWriteBufferSize(writeBufferSize);
+    QCOMPARE_EQ(sender.writeBufferSize(), writeBufferSize);
+    QVERIFY(sender.open(QIODevice::ReadWrite));
+
+    QSerialPort receiver(m_receiverPortName);
+    setupPort(receiver);
+    QVERIFY(receiver.open(QIODevice::ReadWrite));
+
+    static constexpr qsizetype DataSize = 16 * 1024;
+    QVERIFY(DataSize > writeBufferSize); // to make sure that the test works 
correctly
+
+    const QByteArray data(DataSize, 'a');
+
+    qint64 written = 0;
+
+    const bool inputBufferLimited = (writeBufferSize > 0);
+    if (inputBufferLimited) {
+        written = sender.write(data);
+        QCOMPARE_EQ(written, writeBufferSize);
+        // Writing again should return 0, as the buffer is full
+        written = sender.write(data);
+        QCOMPARE_EQ(written, 0); // can't add more
+
+        // Wait until something is actually written to the device.
+        // NOTE: If the test fails here due to a timeout, you might
+        // want to use QTRY_VERIFY_WITH_TIMEOUT() and a larger interval.
+        // The behavior can depend on a OS & driver combination!
+        QTRY_VERIFY(senderSpy.size() > 0);
+        qint64 reportedWritten = 0;
+        for (const auto &val : std::as_const(senderSpy))
+            reportedWritten += val.at(0).toULongLong();
+
+        // Now we should be able to write at least reportedWritten bytes
+        written = sender.write(data);
+        QCOMPARE_GE(written, reportedWritten);
+    } else {
+        // Buffer is unlimited -> we should always write as much as we can
+        written = sender.write(data);
+        QCOMPARE_EQ(written, data.size());
+
+        written = sender.write(data);
+        QCOMPARE_EQ(written, data.size());
+
+        // Wait until something is actually written to the device.
+        // NOTE: If the test fails here due to a timeout, you might
+        // want to use QTRY_VERIFY_WITH_TIMEOUT() and a larger interval.
+        // The behavior can depend on a OS & driver combination!
+        QTRY_VERIFY(senderSpy.size() > 0);
+
+        written = sender.write(data);
+        QCOMPARE_EQ(written, data.size());
+    }
+
+    receiver.close();
+    sender.close();
+}
+
 QTEST_MAIN(tst_QSerialPort)
 #include "tst_qserialport.moc"

Reply via email to