diff options
author | Kevin Funk <kevin.funk@kdab.com> | 2017-09-18 11:49:52 +0200 |
---|---|---|
committer | Kevin Funk <kevin.funk@kdab.com> | 2017-09-19 11:53:55 +0000 |
commit | 58c14c4a7edcecdd9d58b682a9360c83e2274ec5 (patch) | |
tree | 7f600686e4dd92681bec09ac745a9dcd4425844b /src/plugins/platforms/windows/qwindowsdialoghelpers.cpp | |
parent | 47c92fbb0b588b443cead18a5aad5a2b5ad9e4d7 (diff) |
Replace Q_NULLPTR with nullptr where possible
Remaining uses of Q_NULLPTR are in:
src/corelib/global/qcompilerdetection.h
(definition and documentation of Q_NULLPTR)
tests/manual/qcursor/qcursorhighdpi/main.cpp
(a test executable compilable both under Qt4 and Qt5)
Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsdialoghelpers.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsdialoghelpers.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp index c4aeb15bd1..5501601c1a 100644 --- a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp +++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp @@ -711,7 +711,7 @@ QString QWindowsShellItem::libraryItemDefaultSaveFolder(IShellItem *item) { QString result; if (IShellLibrary *library = sHLoadLibraryFromItem(item, STGM_READ | STGM_SHARE_DENY_WRITE)) { - IShellItem *item = Q_NULLPTR; + IShellItem *item = nullptr; if (SUCCEEDED(library->GetDefaultSaveFolder(DSFT_DETECT, IID_IShellItem, reinterpret_cast<void **>(&item)))) { result = QDir::cleanPath(QWindowsShellItem::displayName(item, SIGDN_FILESYSPATH)); item->Release(); @@ -893,7 +893,7 @@ void QWindowsNativeFileDialogBase::setWindowTitle(const QString &title) IShellItem *QWindowsNativeFileDialogBase::shellItem(const QUrl &url) { if (url.isLocalFile()) { - IShellItem *result = Q_NULLPTR; + IShellItem *result = nullptr; const QString native = QDir::toNativeSeparators(url.toLocalFile()); const HRESULT hr = SHCreateItemFromParsingName(reinterpret_cast<const wchar_t *>(native.utf16()), @@ -901,30 +901,30 @@ IShellItem *QWindowsNativeFileDialogBase::shellItem(const QUrl &url) reinterpret_cast<void **>(&result)); if (FAILED(hr)) { qErrnoWarning("%s: SHCreateItemFromParsingName(%s)) failed", __FUNCTION__, qPrintable(url.toString())); - return Q_NULLPTR; + return nullptr; } return result; } else if (url.scheme() == QLatin1String("clsid")) { // Support for virtual folders via GUID // (see https://msdn.microsoft.com/en-us/library/windows/desktop/dd378457(v=vs.85).aspx) // specified as "clsid:<GUID>" (without '{', '}'). - IShellItem *result = Q_NULLPTR; + IShellItem *result = nullptr; const auto uuid = QUuid::fromString(url.path()); if (uuid.isNull()) { qWarning() << __FUNCTION__ << ": Invalid CLSID: " << url.path(); - return Q_NULLPTR; + return nullptr; } PIDLIST_ABSOLUTE idList; HRESULT hr = SHGetKnownFolderIDList(uuid, 0, 0, &idList); if (FAILED(hr)) { qErrnoWarning("%s: SHGetKnownFolderIDList(%s)) failed", __FUNCTION__, qPrintable(url.toString())); - return Q_NULLPTR; + return nullptr; } hr = SHCreateItemFromIDList(idList, IID_IShellItem, reinterpret_cast<void **>(&result)); CoTaskMemFree(idList); if (FAILED(hr)) { qErrnoWarning("%s: SHCreateItemFromIDList(%s)) failed", __FUNCTION__, qPrintable(url.toString())); - return Q_NULLPTR; + return nullptr; } return result; } else { |