diff options
author | Alex Blasche <alexander.blasche@qt.io> | 2018-08-22 14:08:18 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@qt.io> | 2018-08-24 05:44:21 +0000 |
commit | fcf1f30d5fc541a15f0dd4df40a1869630aa3478 (patch) | |
tree | 3310037c3740b939e72fb51efdb066f2c64536b5 /src/imports/bluetooth/qdeclarativebluetoothsocket.cpp | |
parent | 89e92af7948cde05bbb07a082835344f3f3adb4e (diff) |
Code cleanup: Use nullptr wherever possible
Change-Id: I7dd2d055c8d667f049d7cb2c371619137bf76030
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/imports/bluetooth/qdeclarativebluetoothsocket.cpp')
-rw-r--r-- | src/imports/bluetooth/qdeclarativebluetoothsocket.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/imports/bluetooth/qdeclarativebluetoothsocket.cpp b/src/imports/bluetooth/qdeclarativebluetoothsocket.cpp index 07de35bc..0deb82a5 100644 --- a/src/imports/bluetooth/qdeclarativebluetoothsocket.cpp +++ b/src/imports/bluetooth/qdeclarativebluetoothsocket.cpp @@ -79,7 +79,7 @@ class QDeclarativeBluetoothSocketPrivate { public: QDeclarativeBluetoothSocketPrivate(QDeclarativeBluetoothSocket *bs) - : m_dbs(bs), m_service(0), m_socket(0), + : m_dbs(bs), m_error(QDeclarativeBluetoothSocket::NoError), m_state(QDeclarativeBluetoothSocket::NoServiceSet), m_componentCompleted(false), @@ -125,8 +125,8 @@ public: } QDeclarativeBluetoothSocket *m_dbs; - QDeclarativeBluetoothService *m_service; - QBluetoothSocket *m_socket; + QDeclarativeBluetoothService *m_service = nullptr; + QBluetoothSocket *m_socket = nullptr; QDeclarativeBluetoothSocket::Error m_error; QDeclarativeBluetoothSocket::SocketState m_state; bool m_componentCompleted; @@ -269,7 +269,7 @@ void QDeclarativeBluetoothSocket::socket_connected() void QDeclarativeBluetoothSocket::socket_disconnected() { d->m_socket->deleteLater(); - d->m_socket = 0; + d->m_socket = nullptr; emit connectedChanged(); } |