QStandardPaths_win: Add mapping for DownloadLocation
Un-special-case for DownloadLocation. I assume the original code is written like that to be compatible with some really old versions of Windows. Change-Id: I643401910bae9a061f2e02c651971b4f2dd46901 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
This commit is contained in:
parent
54945d58b3
commit
c1f7194b44
@ -130,7 +130,8 @@ static GUID writableSpecialFolderId(QStandardPaths::StandardLocation type)
|
|||||||
FOLDERID_LocalAppData, // GenericDataLocation ("Local" path)
|
FOLDERID_LocalAppData, // GenericDataLocation ("Local" path)
|
||||||
GUID(), // RuntimeLocation
|
GUID(), // RuntimeLocation
|
||||||
FOLDERID_LocalAppData, // ConfigLocation ("Local" path)
|
FOLDERID_LocalAppData, // ConfigLocation ("Local" path)
|
||||||
GUID(), GUID(), // DownloadLocation/GenericCacheLocation
|
FOLDERID_Downloads, // DownloadLocation
|
||||||
|
GUID(), // GenericCacheLocation
|
||||||
FOLDERID_LocalAppData, // GenericConfigLocation ("Local" path)
|
FOLDERID_LocalAppData, // GenericConfigLocation ("Local" path)
|
||||||
FOLDERID_RoamingAppData,// AppDataLocation ("Roaming" path)
|
FOLDERID_RoamingAppData,// AppDataLocation ("Roaming" path)
|
||||||
FOLDERID_LocalAppData, // AppConfigLocation ("Local" path)
|
FOLDERID_LocalAppData, // AppConfigLocation ("Local" path)
|
||||||
@ -154,7 +155,8 @@ static GUID writableSpecialFolderId(QStandardPaths::StandardLocation type)
|
|||||||
FOLDERID_LocalAppDataLow,// GenericDataLocation ("Local" path)
|
FOLDERID_LocalAppDataLow,// GenericDataLocation ("Local" path)
|
||||||
GUID(), // RuntimeLocation
|
GUID(), // RuntimeLocation
|
||||||
FOLDERID_LocalAppDataLow,// ConfigLocation ("Local" path)
|
FOLDERID_LocalAppDataLow,// ConfigLocation ("Local" path)
|
||||||
GUID(), GUID(), // DownloadLocation/GenericCacheLocation
|
FOLDERID_Downloads, // DownloadLocation
|
||||||
|
GUID(), // GenericCacheLocation
|
||||||
FOLDERID_LocalAppDataLow,// GenericConfigLocation ("Local" path)
|
FOLDERID_LocalAppDataLow,// GenericConfigLocation ("Local" path)
|
||||||
FOLDERID_RoamingAppData, // AppDataLocation ("Roaming" path)
|
FOLDERID_RoamingAppData, // AppDataLocation ("Roaming" path)
|
||||||
FOLDERID_LocalAppDataLow,// AppConfigLocation ("Local" path)
|
FOLDERID_LocalAppDataLow,// AppConfigLocation ("Local" path)
|
||||||
@ -185,12 +187,6 @@ QString QStandardPaths::writableLocation(StandardLocation type)
|
|||||||
{
|
{
|
||||||
QString result;
|
QString result;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case DownloadLocation:
|
|
||||||
result = sHGetKnownFolderPath(FOLDERID_Downloads);
|
|
||||||
if (result.isEmpty())
|
|
||||||
result = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CacheLocation:
|
case CacheLocation:
|
||||||
// Although Microsoft has a Cache key it is a pointer to IE's cache, not a cache
|
// 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
|
// location for everyone. Most applications seem to be using a
|
||||||
|
Loading…
x
Reference in New Issue
Block a user