From 925eaae08427a6d17cf965c6214e19cfa6446d92 Mon Sep 17 00:00:00 2001 From: Alex Blasche Date: Tue, 11 Mar 2014 15:48:33 +0100 Subject: Convert internal function parameter to const & Performance improvement Change-Id: I9565771ab6ed15dccc67d5d7e7d5c02759a40367 Reviewed-by: Nedim Hadzic Reviewed-by: Alex Blasche --- src/bluetooth/qbluetoothsocket_android.cpp | 5 +++-- src/bluetooth/qbluetoothsocket_p.h | 2 +- src/bluetooth/qbluetoothsocket_qnx.cpp | 4 +++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/bluetooth/qbluetoothsocket_android.cpp b/src/bluetooth/qbluetoothsocket_android.cpp index a894fed3..b208d6b1 100644 --- a/src/bluetooth/qbluetoothsocket_android.cpp +++ b/src/bluetooth/qbluetoothsocket_android.cpp @@ -82,8 +82,9 @@ bool QBluetoothSocketPrivate::ensureNativeSocket(QBluetoothServiceInfo::Protocol return false; } -//TODO Convert uuid parameter to const reference (affects QNX too) -void QBluetoothSocketPrivate::connectToService(const QBluetoothAddress &address, QBluetoothUuid uuid, QIODevice::OpenMode openMode) +void QBluetoothSocketPrivate::connectToService(const QBluetoothAddress &address, + const QBluetoothUuid &uuid, + QIODevice::OpenMode openMode) { Q_Q(QBluetoothSocket); diff --git a/src/bluetooth/qbluetoothsocket_p.h b/src/bluetooth/qbluetoothsocket_p.h index 2fabeba1..a93029de 100644 --- a/src/bluetooth/qbluetoothsocket_p.h +++ b/src/bluetooth/qbluetoothsocket_p.h @@ -96,7 +96,7 @@ public: //On QNX and Android we connect using the uuid not the port #if defined(QT_QNX_BLUETOOTH) || defined(QT_ANDROID_BLUETOOTH) - void connectToService(const QBluetoothAddress &address, QBluetoothUuid uuid, QIODevice::OpenMode openMode); + void connectToService(const QBluetoothAddress &address, const QBluetoothUuid &uuid, QIODevice::OpenMode openMode); #else void connectToService(const QBluetoothAddress &address, quint16 port, QIODevice::OpenMode openMode); #endif diff --git a/src/bluetooth/qbluetoothsocket_qnx.cpp b/src/bluetooth/qbluetoothsocket_qnx.cpp index 4e277e28..87267a46 100644 --- a/src/bluetooth/qbluetoothsocket_qnx.cpp +++ b/src/bluetooth/qbluetoothsocket_qnx.cpp @@ -75,7 +75,9 @@ bool QBluetoothSocketPrivate::ensureNativeSocket(QBluetoothServiceInfo::Protocol return false; } -void QBluetoothSocketPrivate::connectToService(const QBluetoothAddress &address, QBluetoothUuid uuid, QIODevice::OpenMode openMode) +void QBluetoothSocketPrivate::connectToService(const QBluetoothAddress &address, + const QBluetoothUuid &uuid, + QIODevice::OpenMode openMode) { Q_UNUSED(openMode); qCDebug(QT_BT_QNX) << "Connecting socket"; -- cgit v1.2.1