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>
This commit is contained in:
parent
329efea47e
commit
4108bfb47c
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user