summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qstandardpaths_unix.cpp
diff options
context:
space:
mode:
authorDavid Faure <faure@kde.org>2011-11-03 19:13:32 +0100
committerQt by Nokia <qt-info@nokia.com>2011-11-04 10:54:54 +0100
commit272d20ce27bfde44fe0ea85d90fe178bb01198da (patch)
treecbf115bf061c1af44f29286a569ad07ab0988842 /src/corelib/io/qstandardpaths_unix.cpp
parentae6e7e3d59439008e7369da8083f4e5c4f6f980a (diff)
QStandardPaths: add DownloadLocation.
Only properly implemented on unix (XDG), falls back to Document location on Mac and Windows, because not easily available with the current API being used by either one. Change-Id: Id269f0e3c4e3a68e19205de96c0b39980fde80ff Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qstandardpaths_unix.cpp')
-rw-r--r--src/corelib/io/qstandardpaths_unix.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/corelib/io/qstandardpaths_unix.cpp b/src/corelib/io/qstandardpaths_unix.cpp
index 059bf3bd10..b1c5869f71 100644
--- a/src/corelib/io/qstandardpaths_unix.cpp
+++ b/src/corelib/io/qstandardpaths_unix.cpp
@@ -173,6 +173,9 @@ QString QStandardPaths::writableLocation(StandardLocation type)
case MoviesLocation:
key = QLatin1String("VIDEOS");
break;
+ case DownloadLocation:
+ key = QLatin1String("DOWNLOAD");
+ break;
default:
break;
}
@@ -210,7 +213,9 @@ QString QStandardPaths::writableLocation(StandardLocation type)
case MoviesLocation:
path = QDir::homePath() + QLatin1String("/Videos");
break;
-
+ case DownloadLocation:
+ path = QDir::homePath() + QLatin1String("/Downloads");
+ break;
case ApplicationsLocation:
path = writableLocation(GenericDataLocation) + QLatin1String("/applications");
break;