diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-01-24 08:54:38 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-01-28 21:14:58 +0000 |
commit | 61d50cbc96e5331218a6a4e5614f50211f06c718 (patch) | |
tree | 83571cad118c7c5cd70126ae2a6db01d2d462d93 /src/plugins/platforms/windows/qwindowsservices.cpp | |
parent | 850858cce6191593aaab3176932bc04a6f97f202 (diff) |
Windows/Direct2d QPA: Use nullptr
Change-Id: I6ce01caa58de78e0eb61e243ee1e7b05cc1f5568
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsservices.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsservices.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/platforms/windows/qwindowsservices.cpp b/src/plugins/platforms/windows/qwindowsservices.cpp index b6ed27464e..9504513a5e 100644 --- a/src/plugins/platforms/windows/qwindowsservices.cpp +++ b/src/plugins/platforms/windows/qwindowsservices.cpp @@ -58,9 +58,9 @@ static inline bool shellExecute(const QUrl &url) ? QDir::toNativeSeparators(url.toLocalFile()) : url.toString(QUrl::FullyEncoded); const quintptr result = - reinterpret_cast<quintptr>(ShellExecute(0, 0, + reinterpret_cast<quintptr>(ShellExecute(nullptr, nullptr, reinterpret_cast<const wchar_t *>(nativeFilePath.utf16()), - 0, 0, SW_SHOWNORMAL)); + nullptr, nullptr, SW_SHOWNORMAL)); // ShellExecute returns a value greater than 32 if successful if (result <= 32) { qWarning("ShellExecute '%s' failed (error %s).", qPrintable(url.toString()), qPrintable(QString::number(result))); @@ -84,7 +84,7 @@ static inline QString mailCommand() QString keyName; if (!RegOpenKeyEx(HKEY_CURRENT_USER, mailUserKey, 0, KEY_READ, &handle)) { DWORD bufferSize = BufferSize; - if (!RegQueryValueEx(handle, L"Progid", 0, 0, reinterpret_cast<unsigned char*>(command), &bufferSize)) + if (!RegQueryValueEx(handle, L"Progid", nullptr, nullptr, reinterpret_cast<unsigned char*>(command), &bufferSize)) keyName = QString::fromWCharArray(command); RegCloseKey(handle); } @@ -95,7 +95,7 @@ static inline QString mailCommand() command[0] = 0; if (!RegOpenKeyExW(HKEY_CLASSES_ROOT, reinterpret_cast<const wchar_t*>(keyName.utf16()), 0, KEY_READ, &handle)) { DWORD bufferSize = BufferSize; - RegQueryValueEx(handle, L"", 0, 0, reinterpret_cast<unsigned char*>(command), &bufferSize); + RegQueryValueEx(handle, L"", nullptr, nullptr, reinterpret_cast<unsigned char*>(command), &bufferSize); RegCloseKey(handle); } // QTBUG-57816: As of Windows 10, if there is no mail client installed, an entry like @@ -136,8 +136,8 @@ static inline bool launchMail(const QUrl &url) STARTUPINFO si; ZeroMemory(&si, sizeof(si)); si.cb = sizeof(si); - if (!CreateProcess(NULL, reinterpret_cast<wchar_t *>(const_cast<ushort *>(command.utf16())), - NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) { + if (!CreateProcess(nullptr, reinterpret_cast<wchar_t *>(const_cast<ushort *>(command.utf16())), + nullptr, nullptr, FALSE, 0, nullptr, nullptr, &si, &pi)) { qErrnoWarning("Unable to launch '%s'", qPrintable(command)); return false; } |