diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2018-07-27 11:22:57 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2018-07-31 13:33:14 +0200 |
commit | 23c9d4c98f3c6729b56700edc1d7144b444b16db (patch) | |
tree | 27b20ccbf3c101dbc7bcb1e509882b6c7fc75962 /src/corelib/io/qstandardpaths_win.cpp | |
parent | f69a5857d115786f44d053e68c36f74526020e82 (diff) | |
parent | 0ef66e98ccf4946a0e4513ab5fc157df0f0aca4e (diff) |
Merge branch '5.11' into dev
Conflicts:
qmake/library/qmakebuiltins.cpp
src/plugins/platforms/windows/qwindowstabletsupport.h
src/plugins/platforms/xcb/qxcbconnection.cpp
src/plugins/platforms/xcb/qxcbconnection.h
src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
src/plugins/platforms/xcb/qxcbwindow.cpp
src/widgets/styles/qstylesheetstyle.cpp
tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
Done-With: Gatis Paeglis <gatis.paeglis@qt.io>
Change-Id: I000b0eb3cea2a5c7a99b95732bfdd41507cf916e
Diffstat (limited to 'src/corelib/io/qstandardpaths_win.cpp')
-rw-r--r-- | src/corelib/io/qstandardpaths_win.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/corelib/io/qstandardpaths_win.cpp b/src/corelib/io/qstandardpaths_win.cpp index eeb02419c3..1809861fc6 100644 --- a/src/corelib/io/qstandardpaths_win.cpp +++ b/src/corelib/io/qstandardpaths_win.cpp @@ -129,7 +129,7 @@ static GUID writableSpecialFolderId(QStandardPaths::StandardLocation type) } // Convenience for SHGetKnownFolderPath(). -static QString sHGetKnownFolderPath(const GUID &clsid, QStandardPaths::StandardLocation type, bool warn = false) +static QString sHGetKnownFolderPath(const GUID &clsid) { QString result; typedef HRESULT (WINAPI *GetKnownFolderPath)(const GUID&, DWORD, HANDLE, LPWSTR*); @@ -141,11 +141,6 @@ static QString sHGetKnownFolderPath(const GUID &clsid, QStandardPaths::StandardL if (Q_LIKELY(sHGetKnownFolderPath && SUCCEEDED(sHGetKnownFolderPath(clsid, KF_FLAG_DONT_VERIFY, 0, &path)))) { result = convertCharArray(path); CoTaskMemFree(path); - } else { - if (warn) { - qErrnoWarning("SHGetKnownFolderPath() failed for standard location \"%s\".", - qPrintable(displayName(type))); - } } return result; } @@ -155,7 +150,7 @@ QString QStandardPaths::writableLocation(StandardLocation type) QString result; switch (type) { case DownloadLocation: - result = sHGetKnownFolderPath(FOLDERID_Downloads, type); + result = sHGetKnownFolderPath(FOLDERID_Downloads); if (result.isEmpty()) result = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation); break; @@ -164,7 +159,7 @@ QString QStandardPaths::writableLocation(StandardLocation type) // Although Microsoft has a Cache key it is a pointer to IE's cache, not a cache // location for everyone. Most applications seem to be using a // cache directory located in their AppData directory - result = sHGetKnownFolderPath(writableSpecialFolderId(AppLocalDataLocation), type, /* warn */ true); + result = sHGetKnownFolderPath(writableSpecialFolderId(AppLocalDataLocation)); if (!result.isEmpty()) { appendTestMode(result); appendOrganizationAndApp(result); @@ -173,7 +168,7 @@ QString QStandardPaths::writableLocation(StandardLocation type) break; case GenericCacheLocation: - result = sHGetKnownFolderPath(writableSpecialFolderId(GenericDataLocation), type, /* warn */ true); + result = sHGetKnownFolderPath(writableSpecialFolderId(GenericDataLocation)); if (!result.isEmpty()) { appendTestMode(result); result += QLatin1String("/cache"); @@ -190,7 +185,7 @@ QString QStandardPaths::writableLocation(StandardLocation type) break; default: - result = sHGetKnownFolderPath(writableSpecialFolderId(type), type, /* warn */ isConfigLocation(type)); + result = sHGetKnownFolderPath(writableSpecialFolderId(type)); if (!result.isEmpty() && isConfigLocation(type)) { appendTestMode(result); if (!isGenericConfigLocation(type)) @@ -214,7 +209,7 @@ QStringList QStandardPaths::standardLocations(StandardLocation type) // type-specific handling goes here if (isConfigLocation(type)) { - QString programData = sHGetKnownFolderPath(FOLDERID_ProgramData, type); + QString programData = sHGetKnownFolderPath(FOLDERID_ProgramData); if (!programData.isEmpty()) { if (!isGenericConfigLocation(type)) appendOrganizationAndApp(programData); |