commit qt6-connectivity for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package qt6-connectivity for openSUSE:Factory checked in at 2024-10-03 18:01:50 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/qt6-connectivity (Old) and /work/SRC/openSUSE:Factory/.qt6-connectivity.new.19354 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "qt6-connectivity" Thu Oct 3 18:01:50 2024 rev:25 rq:1205121 version:6.7.3 Changes: -------- --- /work/SRC/openSUSE:Factory/qt6-connectivity/qt6-connectivity.changes 2024-06-24 20:49:40.220354929 +0200 +++ /work/SRC/openSUSE:Factory/.qt6-connectivity.new.19354/qt6-connectivity.changes 2024-10-03 18:01:52.381916660 +0200 @@ -1,0 +2,6 @@ +Sat Sep 28 08:22:56 UTC 2024 - Christophe Marin <christophe@krop.fr> + +- Update to 6.7.3 + * https://www.qt.io/blog/qt-6.7.3-released + +------------------------------------------------------------------- Old: ---- qtconnectivity-everywhere-src-6.7.2.tar.xz New: ---- qtconnectivity-everywhere-src-6.7.3.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qt6-connectivity.spec ++++++ --- /var/tmp/diff_new_pack.yzvYwc/_old 2024-10-03 18:01:53.157948969 +0200 +++ /var/tmp/diff_new_pack.yzvYwc/_new 2024-10-03 18:01:53.161949135 +0200 @@ -16,7 +16,7 @@ # -%define real_version 6.7.2 +%define real_version 6.7.3 %define short_version 6.7 %define tar_name qtconnectivity-everywhere-src %define tar_suffix %{nil} @@ -27,7 +27,7 @@ %endif # Name: qt6-connectivity%{?pkg_suffix} -Version: 6.7.2 +Version: 6.7.3 Release: 0 Summary: Qt 6 connectivity tools and libraries License: LGPL-3.0-only OR (GPL-2.0-only OR GPL-3.0-or-later) ++++++ qtconnectivity-everywhere-src-6.7.2.tar.xz -> qtconnectivity-everywhere-src-6.7.3.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtconnectivity-everywhere-src-6.7.2/.cmake.conf new/qtconnectivity-everywhere-src-6.7.3/.cmake.conf --- old/qtconnectivity-everywhere-src-6.7.2/.cmake.conf 2024-06-08 01:54:23.000000000 +0200 +++ new/qtconnectivity-everywhere-src-6.7.3/.cmake.conf 2024-09-19 20:58:48.000000000 +0200 @@ -1,4 +1,4 @@ -set(QT_REPO_MODULE_VERSION "6.7.2") +set(QT_REPO_MODULE_VERSION "6.7.3") 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/qtconnectivity-everywhere-src-6.7.2/.tag new/qtconnectivity-everywhere-src-6.7.3/.tag --- old/qtconnectivity-everywhere-src-6.7.2/.tag 2024-06-08 01:54:23.000000000 +0200 +++ new/qtconnectivity-everywhere-src-6.7.3/.tag 2024-09-19 20:58:48.000000000 +0200 @@ -1 +1 @@ -b42c3e57081283d79dc06f5c230abcea9e54b93d +06de765c6d3e649cd1b045e8b00be2d0a3e6ec27 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtconnectivity-everywhere-src-6.7.2/dependencies.yaml new/qtconnectivity-everywhere-src-6.7.3/dependencies.yaml --- old/qtconnectivity-everywhere-src-6.7.2/dependencies.yaml 2024-06-08 01:54:23.000000000 +0200 +++ new/qtconnectivity-everywhere-src-6.7.3/dependencies.yaml 2024-09-19 20:58:48.000000000 +0200 @@ -1,7 +1,7 @@ dependencies: ../qtbase: - ref: b5fbe0923cfc566036b83c3d968f225b26117efc + ref: 92b685784960eea6eb353688cf0edeb94d69c6cd required: true ../qtdeclarative: - ref: 12533cc0bd83a2076efb4af0bc1832b0db9568fc + ref: 34ffe0c15a9564fefcf01a738eb0bde370399959 required: false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtconnectivity-everywhere-src-6.7.2/src/android/bluetooth/src/org/qtproject/qt/android/bluetooth/QtBluetoothLE.java new/qtconnectivity-everywhere-src-6.7.3/src/android/bluetooth/src/org/qtproject/qt/android/bluetooth/QtBluetoothLE.java --- old/qtconnectivity-everywhere-src-6.7.2/src/android/bluetooth/src/org/qtproject/qt/android/bluetooth/QtBluetoothLE.java 2024-06-08 01:54:23.000000000 +0200 +++ new/qtconnectivity-everywhere-src-6.7.3/src/android/bluetooth/src/org/qtproject/qt/android/bluetooth/QtBluetoothLE.java 2024-09-19 20:58:48.000000000 +0200 @@ -1530,6 +1530,7 @@ break; case Mtu: skip = executeMtuExchange(); + break; case Rssi: skip = executeRemoteRssiRead(); break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtconnectivity-everywhere-src-6.7.2/src/bluetooth/darwin/btrfcommchannel.mm new/qtconnectivity-everywhere-src-6.7.3/src/bluetooth/darwin/btrfcommchannel.mm --- old/qtconnectivity-everywhere-src-6.7.2/src/bluetooth/darwin/btrfcommchannel.mm 2024-06-08 01:54:23.000000000 +0200 +++ new/qtconnectivity-everywhere-src-6.7.3/src/bluetooth/darwin/btrfcommchannel.mm 2024-09-19 20:58:48.000000000 +0200 @@ -6,14 +6,23 @@ #include "btdelegates_p.h" #include "btutility_p.h" +#include <QtCore/qtimer.h> + QT_USE_NAMESPACE +namespace { + +static constexpr auto channelOpenTimeoutMs = std::chrono::milliseconds{20000}; + +} // namespace + @implementation DarwinBTRFCOMMChannel { QT_PREPEND_NAMESPACE(DarwinBluetooth)::ChannelDelegate *delegate; IOBluetoothDevice *device; IOBluetoothRFCOMMChannel *channel; bool connected; + std::unique_ptr<QTimer> channelOpenTimer; } - (id)initWithDelegate:(DarwinBluetooth::ChannelDelegate *)aDelegate @@ -89,12 +98,24 @@ const IOReturn status = [device openRFCOMMChannelAsync:&channel withChannelID:channelID delegate:self]; if (status != kIOReturnSuccess) { - qCCritical(QT_BT_DARWIN) << "failed to open L2CAP channel"; + qCCritical(QT_BT_DARWIN) << "failed to open RFCOMM channel"; // device is still autoreleased. device = nil; return status; } + if (!channelOpenTimer) { + channelOpenTimer.reset(new QTimer); + QObject::connect(channelOpenTimer.get(), &QTimer::timeout, + channelOpenTimer.get(), [self]() { + qCDebug(QT_BT_DARWIN) << "Could not open the RFCOMM channel within the specified " + "timeout. Assuming that the remote device is not available."; + [self handleChannelOpenTimeout]; + }); + channelOpenTimer->setSingleShot(true); + } + channelOpenTimer->start(channelOpenTimeoutMs); + [channel retain];// What if we're closed already? [device retain]; @@ -121,10 +142,13 @@ { Q_UNUSED(rfcommChannel); + Q_ASSERT_X(channelOpenTimer.get(), Q_FUNC_INFO, "invalid timer (null)"); Q_ASSERT_X(delegate, Q_FUNC_INFO, "invalid delegate (null)"); + channelOpenTimer->stop(); if (error != kIOReturnSuccess) { delegate->setChannelError(error); + delegate->channelClosed(); } else { connected = true; delegate->channelOpenComplete(); @@ -221,5 +245,14 @@ return [channel writeAsync:data length:length refcon:nullptr]; } +- (void)handleChannelOpenTimeout +{ + Q_ASSERT_X(delegate, Q_FUNC_INFO, "invalid delegate (null)"); + Q_ASSERT_X(channel, Q_FUNC_INFO, "invalid RFCOMM channel"); + + delegate->setChannelError(kIOReturnNotOpen); + [channel closeChannel]; + delegate->channelClosed(); +} @end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtconnectivity-everywhere-src-6.7.2/src/bluetooth/darwin/btrfcommchannel_p.h new/qtconnectivity-everywhere-src-6.7.3/src/bluetooth/darwin/btrfcommchannel_p.h --- old/qtconnectivity-everywhere-src-6.7.2/src/bluetooth/darwin/btrfcommchannel_p.h 2024-06-08 01:54:23.000000000 +0200 +++ new/qtconnectivity-everywhere-src-6.7.3/src/bluetooth/darwin/btrfcommchannel_p.h 2024-09-19 20:58:48.000000000 +0200 @@ -67,6 +67,8 @@ - (IOReturn) writeSync:(void*)data length:(UInt16)length; - (IOReturn) writeAsync:(void*)data length:(UInt16)length; +- (void)handleChannelOpenTimeout; + @end QT_NAMESPACE_ALIAS_OBJC_CLASS(DarwinBTRFCOMMChannel); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtconnectivity-everywhere-src-6.7.2/src/bluetooth/qbluetoothlocaldevice.cpp new/qtconnectivity-everywhere-src-6.7.3/src/bluetooth/qbluetoothlocaldevice.cpp --- old/qtconnectivity-everywhere-src-6.7.2/src/bluetooth/qbluetoothlocaldevice.cpp 2024-06-08 01:54:23.000000000 +0200 +++ new/qtconnectivity-everywhere-src-6.7.3/src/bluetooth/qbluetoothlocaldevice.cpp 2024-09-19 20:58:48.000000000 +0200 @@ -74,8 +74,8 @@ as service discovery can be skipped on devices not in LimitedInquiry mode. In this mode, the device will be connectable and powered on, if required. This mode is is not supported on Android. - \note On \macos, it is not possible to set the \l hostMode() to - HostConnectable or HostPoweredOff. + \note On \macos, it is not possible to set the \l hostMode(). The + reported host modes are limited to HostPoweredOff and HostConnectable. \note On Windows, it is not possible to set the \l hostMode() to HostDiscoverable or HostDiscoverableLimitedInquiry. Using these modes is diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtconnectivity-everywhere-src-6.7.2/src/bluetooth/qbluetoothlocaldevice_macos.mm new/qtconnectivity-everywhere-src-6.7.3/src/bluetooth/qbluetoothlocaldevice_macos.mm --- old/qtconnectivity-everywhere-src-6.7.2/src/bluetooth/qbluetoothlocaldevice_macos.mm 2024-06-08 01:54:23.000000000 +0200 +++ new/qtconnectivity-everywhere-src-6.7.3/src/bluetooth/qbluetoothlocaldevice_macos.mm 2024-09-19 20:58:48.000000000 +0200 @@ -18,15 +18,33 @@ #include <Foundation/Foundation.h> #include <IOBluetooth/IOBluetooth.h> +#include <CoreBluetooth/CoreBluetooth.h> #include <algorithm> QT_BEGIN_NAMESPACE +class QBluetoothLocalDevicePrivate; +QT_END_NAMESPACE + +@interface QT_MANGLE_NAMESPACE(QDarwinBluetoothStateMonitor) : NSObject <CBCentralManagerDelegate> + +@property (strong, nonatomic) CBCentralManager *manager; +@property (assign, nonatomic) QT_PREPEND_NAMESPACE(QBluetoothLocalDevicePrivate) *localDevicePrivate; + +- (instancetype)initWith:(QT_PREPEND_NAMESPACE(QBluetoothLocalDevicePrivate) *)localDevicePrivate; +- (CBManagerState)currentState; +- (void)startMonitoring; +- (void)stopMonitoring; + +@end + +QT_BEGIN_NAMESPACE class QBluetoothLocalDevicePrivate : public DarwinBluetooth::PairingDelegate, public DarwinBluetooth::ConnectionMonitor { friend class QBluetoothLocalDevice; + Q_DECLARE_PUBLIC(QBluetoothLocalDevice) public: typedef QBluetoothLocalDevice::Pairing Pairing; @@ -38,6 +56,8 @@ void requestPairing(const QBluetoothAddress &address, Pairing pairing); Pairing pairingStatus(const QBluetoothAddress &address) const; + void bluetoothStateChanged(CBManagerState newState); + private: // PairingDelegate: @@ -59,6 +79,9 @@ void unpair(const QBluetoothAddress &deviceAddress); + DarwinBluetooth::ObjCScopedPointer<QT_MANGLE_NAMESPACE(QDarwinBluetoothStateMonitor)> bluetoothStateMonitor; + QBluetoothLocalDevice::HostMode hostMode = QBluetoothLocalDevice::HostMode::HostPoweredOff; + QBluetoothLocalDevice *q_ptr; using HostController = DarwinBluetooth::ObjCScopedPointer<IOBluetoothHostController>; @@ -113,14 +136,45 @@ // This one is optional, if it fails to initialize, we do not care at all. connectionMonitor.reset([[DarwinBTConnectionMonitor alloc] initWithMonitor:this], DarwinBluetooth::RetainPolicy::noInitialRetain); + // Set the initial host mode + if ([hostController powerState]) + hostMode = QBluetoothLocalDevice::HostConnectable; + else + hostMode = QBluetoothLocalDevice::HostPoweredOff; + + // Start monitoring for bluetooth state changes + bluetoothStateMonitor.reset([[QT_MANGLE_NAMESPACE(QDarwinBluetoothStateMonitor) alloc] initWith:this], + DarwinBluetooth::RetainPolicy::doInitialRetain); + [bluetoothStateMonitor startMonitoring]; } QBluetoothLocalDevicePrivate::~QBluetoothLocalDevicePrivate() { - + [bluetoothStateMonitor stopMonitoring]; [connectionMonitor stopMonitoring]; } +void QBluetoothLocalDevicePrivate::bluetoothStateChanged(CBManagerState state) +{ + Q_Q(QBluetoothLocalDevice); + qCDebug(QT_BT_DARWIN) << "Bluetooth state changed to" << state; + // States other than 'powered ON' and 'powered OFF' are ambiguous to map + // unto Qt HostModes. For example lack of permissions might temporarily + // generate an 'unauthorized' state irrespective of bluetooth power state. + QBluetoothLocalDevice::HostMode mode; + if (state == CBManagerState::CBManagerStatePoweredOff) + mode = QBluetoothLocalDevice::HostPoweredOff; + else if (state == CBManagerState::CBManagerStatePoweredOn) + mode = QBluetoothLocalDevice::HostConnectable; + else + return; + + if (hostMode != mode) { + hostMode = mode; + emit q->hostModeStateChanged(hostMode); + } +} + bool QBluetoothLocalDevicePrivate::isValid() const { return hostController; @@ -375,10 +429,22 @@ QBluetoothLocalDevice::HostMode QBluetoothLocalDevice::hostMode() const { - if (!isValid() || ![d_ptr->hostController powerState]) + Q_D(const QBluetoothLocalDevice); + if (!isValid()) return HostPoweredOff; - return HostConnectable; + auto state = [d->bluetoothStateMonitor currentState]; + // If the monitored state is unknown or ambiguous, use the HCI state directly. + // Otherwise use the monitored state. We can't use HCI state always, because there can + // be a significant delay from "monitored state change" to "HCI state change", causing + // handlers of hostModeStateChanged() signal to perceive conflicting results (signal + // parameter value vs. what this getter returns). + if (state == CBManagerState::CBManagerStatePoweredOff) + return HostPoweredOff; + else if (state == CBManagerState::CBManagerStatePoweredOn) + return HostConnectable; + + return [d->hostController powerState] ? HostConnectable : HostPoweredOff; } QList<QBluetoothAddress> QBluetoothLocalDevice::connectedDevices() const @@ -455,3 +521,45 @@ } QT_END_NAMESPACE + +@implementation QT_MANGLE_NAMESPACE(QDarwinBluetoothStateMonitor) + +- (instancetype)initWith:(QT_PREPEND_NAMESPACE(QBluetoothLocalDevicePrivate) *)localDevicePrivate +{ + if ((self = [super init])) { + self.manager = nil; + self.localDevicePrivate = localDevicePrivate; + } + return self; +} + +- (void)startMonitoring +{ + if (self.manager != nil) + return; + self.manager = [[CBCentralManager alloc] initWithDelegate:self queue:nil]; +} + +- (void)stopMonitoring +{ + if (self.manager == nil) + return; + self.manager.delegate = nil; + self.manager = nil; +} + +- (CBManagerState)currentState +{ + Q_ASSERT(self.manager); + return self.manager.state; +} + +- (void)centralManagerDidUpdateState:(CBCentralManager *)aManager +{ + Q_ASSERT(self.manager); + Q_ASSERT(self.localDevicePrivate); + Q_ASSERT(self.manager == aManager); + self.localDevicePrivate->bluetoothStateChanged(aManager.state); +} + +@end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtconnectivity-everywhere-src-6.7.2/src/bluetooth/qbluetoothsocket_macos.mm new/qtconnectivity-everywhere-src-6.7.3/src/bluetooth/qbluetoothsocket_macos.mm --- old/qtconnectivity-everywhere-src-6.7.2/src/bluetooth/qbluetoothsocket_macos.mm 2024-06-08 01:54:23.000000000 +0200 +++ new/qtconnectivity-everywhere-src-6.7.3/src/bluetooth/qbluetoothsocket_macos.mm 2024-09-19 20:58:48.000000000 +0200 @@ -497,6 +497,8 @@ // (thus close/abort probably will not work). if (!isConnecting) { + if (state == QBluetoothSocket::SocketState::ConnectedState) + q_ptr->setSocketError(QBluetoothSocket::SocketError::RemoteHostClosedError); q_ptr->setOpenMode(QIODevice::NotOpen); q_ptr->setSocketState(QBluetoothSocket::SocketState::UnconnectedState); emit q_ptr->readChannelFinished(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtconnectivity-everywhere-src-6.7.2/src/tools/sdpscanner/main.cpp new/qtconnectivity-everywhere-src-6.7.3/src/tools/sdpscanner/main.cpp --- old/qtconnectivity-everywhere-src-6.7.2/src/tools/sdpscanner/main.cpp 2024-06-08 01:54:23.000000000 +0200 +++ new/qtconnectivity-everywhere-src-6.7.3/src/tools/sdpscanner/main.cpp 2024-09-19 20:58:48.000000000 +0200 @@ -60,7 +60,8 @@ xmlOutput.append(snBuffer); break; case SDP_UINT64: - qsnprintf(snBuffer, BUFFER_SIZE, "<uint64 value=\"0x%016x\"/>\n", data->val.uint64); + qsnprintf(snBuffer, BUFFER_SIZE, "<uint64 value=\"0x%016llx\"/>\n", + qulonglong(data->val.uint64)); xmlOutput.append(snBuffer); break; case SDP_UINT128: @@ -83,7 +84,8 @@ xmlOutput.append(snBuffer); break; case SDP_INT64: - qsnprintf(snBuffer, BUFFER_SIZE, "<int64 value=\"%d\"/>/n", data->val.int64); + qsnprintf(snBuffer, BUFFER_SIZE, "<int64 value=\"%lld\"/>/n", + qlonglong(data->val.int64)); xmlOutput.append(snBuffer); break; case SDP_INT128:
participants (1)
-
Source-Sync