diff options
author | Denis Shienkov <denis.shienkov@gmail.com> | 2014-12-09 23:19:44 +0300 |
---|---|---|
committer | Denis Shienkov <denis.shienkov@gmail.com> | 2014-12-10 09:49:23 +0100 |
commit | cd9c48833cf4fbf73df68dcdb83f261c03950f91 (patch) | |
tree | 4f99e51cb4b12bb5cc07e6a1dd6a7f0a3ee5eb12 /src/serialport/qserialport_wince.cpp | |
parent | 160efdbbf51c38ac973b0e36b98b72e2439f51e6 (diff) |
Use Q_NULLPTR where it is possible
Change-Id: I7261a92ea4405c8aeab7670f73e7225ed7e4d9d0
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Diffstat (limited to 'src/serialport/qserialport_wince.cpp')
-rw-r--r-- | src/serialport/qserialport_wince.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/serialport/qserialport_wince.cpp b/src/serialport/qserialport_wince.cpp index d7441e68..99cc603f 100644 --- a/src/serialport/qserialport_wince.cpp +++ b/src/serialport/qserialport_wince.cpp @@ -183,7 +183,7 @@ QSerialPortPrivate::QSerialPortPrivate(QSerialPort *q) : QSerialPortPrivateData(q) , handle(INVALID_HANDLE_VALUE) , parityErrorOccurred(false) - , eventNotifier(0) + , eventNotifier(Q_NULLPTR) { } @@ -204,7 +204,7 @@ bool QSerialPortPrivate::open(QIODevice::OpenMode mode) } handle = ::CreateFile(reinterpret_cast<const wchar_t*>(systemLocation.utf16()), - desiredAccess, 0, NULL, OPEN_EXISTING, 0, NULL); + desiredAccess, 0, Q_NULLPTR, OPEN_EXISTING, 0, Q_NULLPTR); if (handle == INVALID_HANDLE_VALUE) { q->setError(decodeSystemError()); @@ -222,7 +222,7 @@ void QSerialPortPrivate::close() { if (eventNotifier) { eventNotifier->deleteLater(); - eventNotifier = 0; + eventNotifier = Q_NULLPTR; } if (settingsRestoredOnClose) { @@ -257,9 +257,9 @@ QSerialPort::PinoutSignals QSerialPortPrivate::pinoutSignals() ret |= QSerialPort::DataCarrierDetectSignal; DWORD bytesReturned = 0; - if (!::DeviceIoControl(handle, IOCTL_SERIAL_GET_DTRRTS, NULL, 0, + if (!::DeviceIoControl(handle, IOCTL_SERIAL_GET_DTRRTS, Q_NULLPTR, 0, &modemStat, sizeof(modemStat), - &bytesReturned, NULL)) { + &bytesReturned, Q_NULLPTR)) { q->setError(decodeSystemError()); return ret; } @@ -513,7 +513,7 @@ bool QSerialPortPrivate::notifyRead() char *ptr = readBuffer.reserve(bytesToRead); DWORD readBytes = 0; - BOOL sucessResult = ::ReadFile(handle, ptr, bytesToRead, &readBytes, NULL); + BOOL sucessResult = ::ReadFile(handle, ptr, bytesToRead, &readBytes, Q_NULLPTR); if (!sucessResult) { readBuffer.truncate(bytesToRead); @@ -559,7 +559,7 @@ bool QSerialPortPrivate::notifyWrite() const char *ptr = writeBuffer.readPointer(); DWORD bytesWritten = 0; - if (!::WriteFile(handle, ptr, nextSize, &bytesWritten, NULL)) { + if (!::WriteFile(handle, ptr, nextSize, &bytesWritten, Q_NULLPTR)) { q->setError(QSerialPort::WriteError); return false; } @@ -595,7 +595,7 @@ void QSerialPortPrivate::processIoErrors(bool error) } DWORD errors = 0; - if (!::ClearCommError(handle, &errors, NULL)) { + if (!::ClearCommError(handle, &errors, Q_NULLPTR)) { q->setError(decodeSystemError()); return; } @@ -738,7 +738,7 @@ bool QSerialPortPrivate::waitForReadOrWrite(bool *selectForRead, bool *selectFor // breaker can work out before you call a method WaitCommEvent() // and so it will loop forever! WaitCommEventBreaker breaker(handle, qMax(msecs, 0)); - ::WaitCommEvent(handle, &eventMask, NULL); + ::WaitCommEvent(handle, &eventMask, Q_NULLPTR); breaker.stop(); if (breaker.isWorked()) { |