diff options
Diffstat (limited to 'src/corelib/io/qstandardpaths.cpp')
-rw-r--r-- | src/corelib/io/qstandardpaths.cpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/corelib/io/qstandardpaths.cpp b/src/corelib/io/qstandardpaths.cpp index 78bf6c7b96..55f824cdeb 100644 --- a/src/corelib/io/qstandardpaths.cpp +++ b/src/corelib/io/qstandardpaths.cpp @@ -267,6 +267,48 @@ QString QStandardPaths::findExecutable(const QString &executableName, const QStr an empty QString if no relevant location can be found. */ +#ifndef Q_OS_MAC +QString QStandardPaths::displayName(StandardLocation type) +{ + switch (type) { + case DesktopLocation: + return QCoreApplication::translate("QStandardPaths", "Desktop"); + case DocumentsLocation: + return QCoreApplication::translate("QStandardPaths", "Documents"); + case FontsLocation: + return QCoreApplication::translate("QStandardPaths", "Fonts"); + case ApplicationsLocation: + return QCoreApplication::translate("QStandardPaths", "Applications"); + case MusicLocation: + return QCoreApplication::translate("QStandardPaths", "Music"); + case MoviesLocation: + return QCoreApplication::translate("QStandardPaths", "Movies"); + case PicturesLocation: + return QCoreApplication::translate("QStandardPaths", "Pictures"); + case TempLocation: + return QCoreApplication::translate("QStandardPaths", "Temporary Directory"); + case HomeLocation: + return QCoreApplication::translate("QStandardPaths", "Home"); + case DataLocation: + return QCoreApplication::translate("QStandardPaths", "Application Data"); + case CacheLocation: + return QCoreApplication::translate("QStandardPaths", "Cache"); + case GenericDataLocation: + return QCoreApplication::translate("QStandardPaths", "Shared Data"); + case RuntimeLocation: + return QCoreApplication::translate("QStandardPaths", "Runtime"); + case ConfigLocation: + return QCoreApplication::translate("QStandardPaths", "Configuration"); + case GenericCacheLocation: + return QCoreApplication::translate("QStandardPaths", "Shared Cache"); + case DownloadLocation: + return QCoreApplication::translate("QStandardPaths", "Download"); + } + // not reached + return QString(); +} +#endif + QT_END_NAMESPACE #endif // QT_NO_STANDARDPATHS |