diff options
author | Oliver Wolff <oliver.wolff@digia.com> | 2014-06-19 12:37:48 +0200 |
---|---|---|
committer | Oliver Wolff <oliver.wolff@digia.com> | 2014-06-26 08:32:22 +0200 |
commit | 4108bfb47c058c415c43bd838248fa738a086ebe (patch) | |
tree | eebd4330a0fe6ab0f890cc46cafe3ce9fa0aabfc | |
parent | 329efea47ed47fe8c303550d34767e07f8a292e4 (diff) |
WinRT: no read-only paths in QStandardpaths::writableLocation
As FontsLocation, HomeLocation and RuntimeLocation are read-
only on WinRT WritableLocation should return empty strings
in these cases. In addition all the other options were
added to the switch statement in writableLocation.
Task-number: QTBUG-38581
Change-Id: Iab994556844e713c6fa02028a0ec824ecb5ee82b
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
-rw-r--r-- | src/corelib/io/qstandardpaths_winrt.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/corelib/io/qstandardpaths_winrt.cpp b/src/corelib/io/qstandardpaths_winrt.cpp index 84a3930ee0..feafdf2e7c 100644 --- a/src/corelib/io/qstandardpaths_winrt.cpp +++ b/src/corelib/io/qstandardpaths_winrt.cpp @@ -103,14 +103,23 @@ QString QStandardPaths::writableLocation(StandardLocation type) case GenericCacheLocation: return writableLocation(GenericDataLocation) + QLatin1String("/cache"); - case RuntimeLocation: - case HomeLocation: - result = QDir::homePath(); - break; - case TempLocation: result = QDir::tempPath(); break; + + case ApplicationsLocation: + case DesktopLocation: + case FontsLocation: + case HomeLocation: + case RuntimeLocation: + // these are read-only + break; + + case DocumentsLocation: + case MusicLocation: + case MoviesLocation: + case PicturesLocation: + case DownloadLocation: default: Q_UNIMPLEMENTED(); } |