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/bluetooth/qbluetoothserver_bluez.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/bluetooth/qbluetoothserver_bluez.cpp')
-rw-r--r-- | src/bluetooth/qbluetoothserver_bluez.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bluetooth/qbluetoothserver_bluez.cpp b/src/bluetooth/qbluetoothserver_bluez.cpp index f67dffde..100c2bec 100644 --- a/src/bluetooth/qbluetoothserver_bluez.cpp +++ b/src/bluetooth/qbluetoothserver_bluez.cpp @@ -68,7 +68,7 @@ QBluetoothSocket *QBluetoothServerPrivate::createSocketForServer( QBluetoothServerPrivate::QBluetoothServerPrivate(QBluetoothServiceInfo::Protocol sType) : maxPendingConnections(1), securityFlags(QBluetooth::Authorization), serverType(sType), - m_lastError(QBluetoothServer::NoError), socketNotifier(0) + m_lastError(QBluetoothServer::NoError) { if (sType == QBluetoothServiceInfo::RfcommProtocol) socket = createSocketForServer(QBluetoothServiceInfo::RfcommProtocol); @@ -147,7 +147,7 @@ void QBluetoothServer::close() Q_D(QBluetoothServer); delete d->socketNotifier; - d->socketNotifier = 0; + d->socketNotifier = nullptr; d->socket->close(); } @@ -239,7 +239,7 @@ bool QBluetoothServer::listen(const QBluetoothAddress &address, quint16 port) } } - d->setSocketSecurityLevel(d->securityFlags, 0); + d->setSocketSecurityLevel(d->securityFlags, nullptr); if (::listen(sock, d->maxPendingConnections) < 0) { d->m_lastError = InputOutputError; @@ -282,7 +282,7 @@ QBluetoothSocket *QBluetoothServer::nextPendingConnection() Q_D(QBluetoothServer); if (!hasPendingConnections()) - return 0; + return nullptr; int pending; if (d->serverType == QBluetoothServiceInfo::RfcommProtocol) { @@ -311,7 +311,7 @@ QBluetoothSocket *QBluetoothServer::nextPendingConnection() d->socketNotifier->setEnabled(true); } - return 0; + return nullptr; } QBluetoothAddress QBluetoothServer::serverAddress() const |