diff options
author | Ivan Solovev <ivan.solovev@qt.io> | 2021-12-06 14:14:17 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-12-08 10:35:19 +0000 |
commit | 0ae45557bcc92e7f33eafd515d0024303c98f533 (patch) | |
tree | 60894ae66ca29c2f716eb31e136dc6337a14d63d | |
parent | 3ec991f35e0e7450c9fdc64abea4e502f44605c4 (diff) |
QBluetoothSocket Windows: actually query remote port
Before this patch we were querying local port for both localPort() and
peerPort() calls. This patch fixes it.
Change-Id: Iac1689ab22a010539c27c4890137cab8f7be5e10
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
(cherry picked from commit 973f8c6225016fe57d9e62946292f856f369561a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/bluetooth/qbluetoothsocket_winrt.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bluetooth/qbluetoothsocket_winrt.cpp b/src/bluetooth/qbluetoothsocket_winrt.cpp index dbb4583a..f886dbfd 100644 --- a/src/bluetooth/qbluetoothsocket_winrt.cpp +++ b/src/bluetooth/qbluetoothsocket_winrt.cpp @@ -661,7 +661,7 @@ quint16 QBluetoothSocketPrivateWinRT::peerPort() const hr = m_socketObject->get_Information(&info); Q_ASSERT_SUCCEEDED(hr); HString remotePortString; - hr = info->get_LocalPort(remotePortString.GetAddressOf()); + hr = info->get_RemotePort(remotePortString.GetAddressOf()); Q_ASSERT_SUCCEEDED(hr); bool ok = true; const uint port = qt_QStringFromHString(remotePortString).toUInt(&ok); |