diff options
author | Kevin Funk <kfunk@kde.org> | 2017-09-24 23:54:54 +0200 |
---|---|---|
committer | Kevin Funk <kevin.funk@kdab.com> | 2017-09-29 19:14:13 +0000 |
commit | 844382001f8deaa7fcc9faac779b24188f35329b (patch) | |
tree | 30253a96379774154edbaa35c0fb6f90ed788307 /src/bluetooth/osx | |
parent | 38e561011bb248ae9b803084eb66824588c7b22a (diff) |
Replace Q_NULLPTR with nullptr
Change-Id: Ica194c2568465a94d851ddeaf62ca71b33fe4464
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/bluetooth/osx')
-rw-r--r-- | src/bluetooth/osx/osxbtl2capchannel.mm | 4 | ||||
-rw-r--r-- | src/bluetooth/osx/osxbtobexsession.mm | 22 | ||||
-rw-r--r-- | src/bluetooth/osx/osxbtrfcommchannel.mm | 4 | ||||
-rw-r--r-- | src/bluetooth/osx/osxbtutility_p.h | 10 |
4 files changed, 20 insertions, 20 deletions
diff --git a/src/bluetooth/osx/osxbtl2capchannel.mm b/src/bluetooth/osx/osxbtl2capchannel.mm index 02ec4f90..474fe04b 100644 --- a/src/bluetooth/osx/osxbtl2capchannel.mm +++ b/src/bluetooth/osx/osxbtl2capchannel.mm @@ -210,7 +210,7 @@ QT_USE_NAMESPACE - (BluetoothDeviceAddress)peerAddress { const BluetoothDeviceAddress *const addr = device ? [device getAddress] - : Q_NULLPTR; + : nullptr; if (addr) return *addr; @@ -245,7 +245,7 @@ QT_USE_NAMESPACE Q_ASSERT_X(length, Q_FUNC_INFO, "invalid data size"); Q_ASSERT_X(connected && channel, Q_FUNC_INFO, "invalid L2CAP channel"); - return [channel writeAsync:data length:length refcon:Q_NULLPTR]; + return [channel writeAsync:data length:length refcon:nullptr]; } diff --git a/src/bluetooth/osx/osxbtobexsession.mm b/src/bluetooth/osx/osxbtobexsession.mm index b8e604c8..e228d6db 100644 --- a/src/bluetooth/osx/osxbtobexsession.mm +++ b/src/bluetooth/osx/osxbtobexsession.mm @@ -489,11 +489,11 @@ QT_USE_NAMESPACE const OBEXError status = [session OBEXConnect:kOBEXConnectFlagNone maxPacketLength:[QT_MANGLE_NAMESPACE(OSXBTOBEXSession) maxPacketLength] - optionalHeaders:Q_NULLPTR + optionalHeaders:nullptr optionalHeadersLength:0 eventSelector:@selector(OBEXConnectHandler:) selectorTarget:self - refCon:Q_NULLPTR]; + refCon:nullptr]; if (status != kOBEXSuccess) { currentRequest = OSXBluetooth::OBEXNoop; @@ -572,11 +572,11 @@ QT_USE_NAMESPACE return kOBEXSessionNotConnectedError; currentRequest = OBEXAbort; - const OBEXError status = [session OBEXAbort:Q_NULLPTR + const OBEXError status = [session OBEXAbort:nullptr optionalHeadersLength:0 eventSelector:@selector(OBEXAbortHandler:) selectorTarget:self - refCon:Q_NULLPTR]; + refCon:nullptr]; if (status != kOBEXSuccess) currentRequest = OBEXNoop; @@ -677,7 +677,7 @@ QT_USE_NAMESPACE bodyDataLength:[chunk length] eventSelector:@selector(OBEXPutHandler:) selectorTarget:self - refCon:Q_NULLPTR]; + refCon:nullptr]; if (status == kOBEXSuccess) { if (delegate && fileSize && !input->isSequential()) @@ -737,16 +737,16 @@ QT_USE_NAMESPACE return; } - void *dataPtr = chunk ? [chunk mutableBytes] : Q_NULLPTR; + void *dataPtr = chunk ? [chunk mutableBytes] : nullptr; const NSUInteger dataSize = chunk ? [chunk length] : 0; const OBEXError status = [session OBEXPut:lastChunk - headersData:Q_NULLPTR + headersData:nullptr headersDataLength:0 bodyData:dataPtr bodyDataLength:dataSize eventSelector:@selector(OBEXPutHandler:) selectorTarget:self - refCon:Q_NULLPTR]; + refCon:nullptr]; if (status != kOBEXSuccess) { qCWarning(QT_BT_OSX) << "failed to send the next memory chunk"; @@ -778,11 +778,11 @@ QT_USE_NAMESPACE currentRequest = OSXBluetooth::OBEXDisconnect; - [session OBEXDisconnect:Q_NULLPTR + [session OBEXDisconnect:nullptr optionalHeadersLength:0 eventSelector:@selector(OBEXDisconnectHandler:) selectorTarget:self - refCon:Q_NULLPTR]; + refCon:nullptr]; } - (void)OBEXDisconnectHandler:(const OBEXSessionEvent*)event @@ -806,7 +806,7 @@ QT_USE_NAMESPACE // Clear the delegate and reset the request, // do not try any of OBEX commands - the session will be deleted // immediately. - delegate = Q_NULLPTR; + delegate = nullptr; // This will stop any handler (callback) preventing // any read/write to potentially deleted objects. currentRequest = OSXBluetooth::OBEXNoop; diff --git a/src/bluetooth/osx/osxbtrfcommchannel.mm b/src/bluetooth/osx/osxbtrfcommchannel.mm index ea679ec8..bd87aae0 100644 --- a/src/bluetooth/osx/osxbtrfcommchannel.mm +++ b/src/bluetooth/osx/osxbtrfcommchannel.mm @@ -210,7 +210,7 @@ QT_USE_NAMESPACE - (BluetoothDeviceAddress)peerAddress { const BluetoothDeviceAddress *const addr = device ? [device getAddress] - : Q_NULLPTR; + : nullptr; if (addr) return *addr; @@ -248,7 +248,7 @@ QT_USE_NAMESPACE Q_ASSERT_X(length, Q_FUNC_INFO, "invalid data size"); Q_ASSERT_X(connected && channel, Q_FUNC_INFO, "invalid RFCOMM channel"); - return [channel writeAsync:data length:length refcon:Q_NULLPTR]; + return [channel writeAsync:data length:length refcon:nullptr]; } diff --git a/src/bluetooth/osx/osxbtutility_p.h b/src/bluetooth/osx/osxbtutility_p.h index 148ebc0b..441d4183 100644 --- a/src/bluetooth/osx/osxbtutility_p.h +++ b/src/bluetooth/osx/osxbtutility_p.h @@ -82,7 +82,7 @@ public: // add a default ctor??? This will make the semantics more // transparent + will simplify the future transition to ARC // (if it will ever happen). - explicit ObjCScopedPointer(T *ptr = Q_NULLPTR) : QScopedPointer(ptr){} + explicit ObjCScopedPointer(T *ptr = nullptr) : QScopedPointer(ptr){} operator T*() const { return data(); @@ -196,7 +196,7 @@ template<class T> class CFStrongReference { public: CFStrongReference() - : m_ptr(Q_NULLPTR) + : m_ptr(nullptr) { } @@ -230,13 +230,13 @@ public: CFStrongReference(CFStrongReference &&xval) { m_ptr = xval.m_ptr; - xval.m_ptr = Q_NULLPTR; + xval.m_ptr = nullptr; } CFStrongReference &operator = (CFStrongReference &&xval) { m_ptr = xval.m_ptr; - xval.m_ptr = Q_NULLPTR; + xval.m_ptr = nullptr; return *this; } #endif @@ -270,7 +270,7 @@ public: T take() { T p = m_ptr; - m_ptr = Q_NULLPTR; + m_ptr = nullptr; return p; } private: |