summaryrefslogtreecommitdiffstats
path: root/src/serialport/qserialportinfo_wince.cpp
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-02-20 15:55:55 +0100
committerFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-02-25 10:22:53 +0100
commita325de1910e6627e4d042114d22303cc68fae7a9 (patch)
treecabf88f9e4e42579e6695ecff5e6ab787f3922ab /src/serialport/qserialportinfo_wince.cpp
parentd42d5838b9a4c3cbd6b0e67dabce658ba737eba8 (diff)
parentb84fe7eb3d6d977a347bfbb82da724409b2eda69 (diff)
Merge remote-tracking branch 'origin/5.4' into 5.5
Conflicts: .qmake.conf src/serialport/qserialport_unix.cpp src/serialport/qserialport_unix_p.h src/serialport/qserialport_win.cpp src/serialport/qserialport_win_p.h src/serialport/qserialport_wince.cpp src/serialport/qserialport_wince_p.h Change-Id: Ibb917652b132e66fbb90f437bf762c1094911dc0
Diffstat (limited to 'src/serialport/qserialportinfo_wince.cpp')
-rw-r--r--src/serialport/qserialportinfo_wince.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/serialport/qserialportinfo_wince.cpp b/src/serialport/qserialportinfo_wince.cpp
index 2b247b9c..aa590ba6 100644
--- a/src/serialport/qserialportinfo_wince.cpp
+++ b/src/serialport/qserialportinfo_wince.cpp
@@ -46,7 +46,7 @@ static QString findDescription(HKEY parentKeyHandle, const QString &subKey)
const static QString valueName(QStringLiteral("FriendlyName"));
QString result;
- HKEY hSubKey = 0;
+ HKEY hSubKey = Q_NULLPTR;
LONG res = ::RegOpenKeyEx(parentKeyHandle, reinterpret_cast<const wchar_t *>(subKey.utf16()),
0, KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS, &hSubKey);
@@ -55,12 +55,12 @@ static QString findDescription(HKEY parentKeyHandle, const QString &subKey)
DWORD dataType = 0;
DWORD dataSize = 0;
res = ::RegQueryValueEx(hSubKey, reinterpret_cast<const wchar_t *>(valueName.utf16()),
- NULL, &dataType, NULL, &dataSize);
+ Q_NULLPTR, &dataType, Q_NULLPTR, &dataSize);
if (res == ERROR_SUCCESS) {
QByteArray data(dataSize, 0);
res = ::RegQueryValueEx(hSubKey, reinterpret_cast<const wchar_t *>(valueName.utf16()),
- NULL, NULL,
+ Q_NULLPTR, Q_NULLPTR,
reinterpret_cast<unsigned char *>(data.data()),
&dataSize);
@@ -81,7 +81,7 @@ static QString findDescription(HKEY parentKeyHandle, const QString &subKey)
QByteArray data(dataSize, 0);
while (::RegEnumKeyEx(hSubKey, index++,
reinterpret_cast<wchar_t *>(data.data()), &dataSize,
- NULL, NULL, NULL, NULL) == ERROR_SUCCESS) {
+ Q_NULLPTR, Q_NULLPTR, Q_NULLPTR, Q_NULLPTR) == ERROR_SUCCESS) {
result = findDescription(hSubKey,
QString::fromUtf16(reinterpret_cast<ushort *>(data.data()), dataSize));
@@ -128,7 +128,7 @@ QList<qint32> QSerialPortInfo::standardBaudRates()
bool QSerialPortInfo::isBusy() const
{
const HANDLE handle = ::CreateFile(reinterpret_cast<const wchar_t*>(systemLocation().utf16()),
- GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
+ GENERIC_READ | GENERIC_WRITE, 0, Q_NULLPTR, OPEN_EXISTING, 0, Q_NULLPTR);
if (handle == INVALID_HANDLE_VALUE) {
if (::GetLastError() == ERROR_ACCESS_DENIED)
@@ -142,7 +142,7 @@ bool QSerialPortInfo::isBusy() const
bool QSerialPortInfo::isValid() const
{
const HANDLE handle = ::CreateFile(reinterpret_cast<const wchar_t*>(systemLocation().utf16()),
- GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
+ GENERIC_READ | GENERIC_WRITE, 0, Q_NULLPTR, OPEN_EXISTING, 0, Q_NULLPTR);
if (handle == INVALID_HANDLE_VALUE) {
if (::GetLastError() != ERROR_ACCESS_DENIED)