summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothtransferreply_osx.mm
diff options
context:
space:
mode:
authorAndré Klitzing <aklitzing@gmail.com>2019-07-19 11:06:59 +0200
committerAndré Klitzing <aklitzing@gmail.com>2019-07-19 11:27:49 +0200
commit8110fdd4c6d80d05934768fa808a4cb187212fe0 (patch)
treeeed715b102a46cd406b4949a25abddb6f32d92d8 /src/bluetooth/qbluetoothtransferreply_osx.mm
parent263fc5186325a7dd59a7533b98b3bf1296ea0d16 (diff)
Core/IO/Bluetooth - fix ambiguous conversions for macOS
This is a sibling of QTBUG-76847 on macOS instead of iOS. Change-Id: I3df6e28d65b9835f5f54e92d462d23423c48d835 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/bluetooth/qbluetoothtransferreply_osx.mm')
-rw-r--r--src/bluetooth/qbluetoothtransferreply_osx.mm10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bluetooth/qbluetoothtransferreply_osx.mm b/src/bluetooth/qbluetoothtransferreply_osx.mm
index 65c8f82d..40a747f8 100644
--- a/src/bluetooth/qbluetoothtransferreply_osx.mm
+++ b/src/bluetooth/qbluetoothtransferreply_osx.mm
@@ -136,13 +136,13 @@ QBluetoothTransferReplyOSXPrivate::~QBluetoothTransferReplyOSXPrivate()
// The OBEX session will be closed then. If
// somehow IOBluetooth/OBEX still has a reference to our
// session, it will not call any of delegate's callbacks.
- if (session)
+ if (session.data())
[session closeSession];
}
bool QBluetoothTransferReplyOSXPrivate::isActive() const
{
- return agent || (session && [session hasActiveRequest]);
+ return agent.data() || (session.data() && [session hasActiveRequest]);
}
bool QBluetoothTransferReplyOSXPrivate::startOPP(const QBluetoothAddress &device)
@@ -218,7 +218,7 @@ void QBluetoothTransferReplyOSXPrivate::sendConnect(const QBluetoothAddress &dev
void QBluetoothTransferReplyOSXPrivate::sendPut()
{
Q_ASSERT_X(inputStream, Q_FUNC_INFO, "invalid input stream (null)");
- Q_ASSERT_X(session, Q_FUNC_INFO, "invalid OBEX session (nil)");
+ Q_ASSERT_X(session.data(), Q_FUNC_INFO, "invalid OBEX session (nil)");
Q_ASSERT_X([session isConnected], Q_FUNC_INFO, "not connected");
Q_ASSERT_X(![session hasActiveRequest], Q_FUNC_INFO,
"session already has an active request");
@@ -268,7 +268,7 @@ void QBluetoothTransferReplyOSXPrivate::OBEXConnectError(OBEXError errorCode, OB
Q_UNUSED(errorCode)
Q_UNUSED(response)
- if (session) {
+ if (session.data()) {
setReplyError(QBluetoothTransferReply::SessionError,
QCoreApplication::translate(TRANSFER_REPLY, TR_CONNECT_FAILED));
} else {
@@ -283,7 +283,7 @@ void QBluetoothTransferReplyOSXPrivate::OBEXConnectError(OBEXError errorCode, OB
void QBluetoothTransferReplyOSXPrivate::OBEXConnectSuccess()
{
// Now that OBEX connect succeeded, we can send an OBEX put request.
- if (!session) {
+ if (!session.data()) {
// We're still in OBEXConnect(), it'll take care of next steps.
return;
}