From 83c219dfe202097c17548a9789b5e661fcee593c Mon Sep 17 00:00:00 2001 From: David Faure Date: Fri, 21 Oct 2011 21:10:28 +0200 Subject: Rename storageLocation() to writableLocation(). Change-Id: I8f6522a70950f78ddd6141360d36d104bd697e28 Reviewed-by: Thiago Macieira (Intel) --- src/corelib/io/qstandardpaths.cpp | 8 ++++---- src/corelib/io/qstandardpaths.h | 2 +- src/corelib/io/qstandardpaths_mac.cpp | 4 ++-- src/corelib/io/qstandardpaths_unix.cpp | 6 +++--- src/corelib/io/qstandardpaths_win.cpp | 6 +++--- src/gui/util/qdesktopservices.cpp | 4 ++-- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/corelib/io/qstandardpaths.cpp b/src/corelib/io/qstandardpaths.cpp index 552bb21972..7deaceefc8 100644 --- a/src/corelib/io/qstandardpaths.cpp +++ b/src/corelib/io/qstandardpaths.cpp @@ -65,7 +65,7 @@ QT_BEGIN_NAMESPACE \enum QStandardPaths::StandardLocation This enum describes the different locations that can be queried using - methods such as QStandardPaths::storageLocation, QStandardPaths::standardLocations, + methods such as QStandardPaths::writableLocation, QStandardPaths::standardLocations, and QStandardPaths::displayName. \value DesktopLocation Returns the user's desktop directory. @@ -91,11 +91,11 @@ QT_BEGIN_NAMESPACE configuration files should be written. - \sa storageLocation() standardLocations() displayName() locate() locateAll() + \sa writableLocation() standardLocations() displayName() locate() locateAll() */ /*! - \fn QString QStandardPaths::storageLocation(StandardLocation type) + \fn QString QStandardPaths::writableLocation(StandardLocation type) Returns the directory where files of \a type should be written to, or an empty string if the location cannot be determined. @@ -117,7 +117,7 @@ QT_BEGIN_NAMESPACE Returns all the directories where files of \a type belong. Much like the PATH variable, it returns the directories in order of priority, - starting with the user-specific storageLocation() for the \a type. + starting with the user-specific writableLocation() for the \a type. */ /*! diff --git a/src/corelib/io/qstandardpaths.h b/src/corelib/io/qstandardpaths.h index ac2a17ddc8..1bef1be7f6 100644 --- a/src/corelib/io/qstandardpaths.h +++ b/src/corelib/io/qstandardpaths.h @@ -75,7 +75,7 @@ public: ConfigLocation }; - static QString storageLocation(StandardLocation type); + static QString writableLocation(StandardLocation type); static QStringList standardLocations(StandardLocation type); enum LocateOption { diff --git a/src/corelib/io/qstandardpaths_mac.cpp b/src/corelib/io/qstandardpaths_mac.cpp index 4f379fac09..65c7f01fb4 100644 --- a/src/corelib/io/qstandardpaths_mac.cpp +++ b/src/corelib/io/qstandardpaths_mac.cpp @@ -117,7 +117,7 @@ static QString macLocation(QStandardPaths::StandardLocation type, short domain) return path; } -QString QStandardPaths::storageLocation(StandardLocation type) +QString QStandardPaths::writableLocation(StandardLocation type) { switch (type) { case HomeLocation: @@ -144,7 +144,7 @@ QStringList QStandardPaths::standardLocations(StandardLocation type) dirs.append(path); } - const QString localDir = storageLocation(type); + const QString localDir = writableLocation(type); dirs.prepend(localDir); return dirs; } diff --git a/src/corelib/io/qstandardpaths_unix.cpp b/src/corelib/io/qstandardpaths_unix.cpp index 12f872f5fa..89d4661215 100644 --- a/src/corelib/io/qstandardpaths_unix.cpp +++ b/src/corelib/io/qstandardpaths_unix.cpp @@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE -QString QStandardPaths::storageLocation(StandardLocation type) +QString QStandardPaths::writableLocation(StandardLocation type) { switch (type) { case HomeLocation: @@ -212,7 +212,7 @@ QString QStandardPaths::storageLocation(StandardLocation type) break; case ApplicationsLocation: - path = storageLocation(GenericDataLocation) + QLatin1String("/applications"); + path = writableLocation(GenericDataLocation) + QLatin1String("/applications"); break; default: @@ -241,7 +241,7 @@ QStringList QStandardPaths::standardLocations(StandardLocation type) } else dirs = xdgConfigDirs.split(QLatin1Char(':')); } - const QString localDir = storageLocation(type); + const QString localDir = writableLocation(type); dirs.prepend(localDir); return dirs; } diff --git a/src/corelib/io/qstandardpaths_win.cpp b/src/corelib/io/qstandardpaths_win.cpp index bd327e6f37..5716ffc6a8 100644 --- a/src/corelib/io/qstandardpaths_win.cpp +++ b/src/corelib/io/qstandardpaths_win.cpp @@ -90,7 +90,7 @@ static QString convertCharArray(const wchar_t *path) return QDir::fromNativeSeparators(QString::fromWCharArray(path)); } -QString QStandardPaths::storageLocation(StandardLocation type) +QString QStandardPaths::writableLocation(StandardLocation type) { QString result; @@ -157,7 +157,7 @@ QString QStandardPaths::storageLocation(StandardLocation type) // 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 // cache directory located in their AppData directory - return storageLocation(DataLocation) + QLatin1String("\\cache"); + return writableLocation(DataLocation) + QLatin1String("\\cache"); case RuntimeLocation: case HomeLocation: @@ -202,7 +202,7 @@ QStringList QStandardPaths::standardLocations(StandardLocation type) } #endif - const QString localDir = storageLocation(type); + const QString localDir = writableLocation(type); dirs.prepend(localDir); return dirs; } diff --git a/src/gui/util/qdesktopservices.cpp b/src/gui/util/qdesktopservices.cpp index da3b498729..ab45c17dd3 100644 --- a/src/gui/util/qdesktopservices.cpp +++ b/src/gui/util/qdesktopservices.cpp @@ -270,11 +270,11 @@ void QDesktopServices::unsetUrlHandler(const QString &scheme) */ /*! - \deprecated Use QStandardPaths::storageLocation() + \deprecated Use QStandardPaths::writableLocation() */ QString QDesktopServices::storageLocation(StandardLocation type) { - return QStandardPaths::storageLocation(static_cast(type)); + return QStandardPaths::writableLocation(static_cast(type)); } -- cgit v1.2.3