summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorKarsten Heimrich <karsten.heimrich@qt.io>2020-10-16 15:11:17 +0200
committerKarsten Heimrich <karsten.heimrich@qt.io>2020-10-23 11:36:47 +0200
commit216c2ed5cee6d908ba94d3c3ec533a7ea588b0a0 (patch)
tree7fcd170d7077683df482cc8bb6281a7fee113072 /src/corelib/io
parent25edeaa3d64163c43b71f8106ef04d6b494c2ed2 (diff)
Remove usage of deprecated QStandardPaths::DataLocation
* Rearrange the documention to match the enumeration order. Fixes: QTBUG-87037 Change-Id: Iad001351e0f309e694b8bbd503813017e6586a21 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qstandardpaths.cpp27
-rw-r--r--src/corelib/io/qstandardpaths.h6
-rw-r--r--src/corelib/io/qstandardpaths_win.cpp4
3 files changed, 12 insertions, 25 deletions
diff --git a/src/corelib/io/qstandardpaths.cpp b/src/corelib/io/qstandardpaths.cpp
index c44905541b..de14b44454 100644
--- a/src/corelib/io/qstandardpaths.cpp
+++ b/src/corelib/io/qstandardpaths.cpp
@@ -119,9 +119,9 @@ QT_BEGIN_NAMESPACE
\value HomeLocation Returns the user's home directory (the same as QDir::homePath()). On Unix
systems, this is equal to the HOME environment variable. This value might be
generic or application-specific, but the returned path is never empty.
- \value DataLocation Returns the same value as AppLocalDataLocation. This enumeration value
- is deprecated. Using AppDataLocation is preferable since on Windows, the roaming path is
- recommended.
+ \value AppLocalDataLocation Returns the local settings path on the Windows operating
+ system. On all other platforms, it returns the same value as AppDataLocation.
+ This enum value was added in Qt 5.4.
\value CacheLocation Returns a directory location where user-specific
non-essential (cached) data should be written. This is an application-specific directory.
The returned path is never empty.
@@ -149,9 +149,6 @@ QT_BEGIN_NAMESPACE
QStandardPaths::GenericDataLocation. The returned path is never empty.
On the Windows operating system, this returns the roaming path.
This enum value was added in Qt 5.4.
- \value AppLocalDataLocation Returns the local settings path on the Windows operating
- system. On all other platforms, it returns the same value as AppDataLocation.
- This enum value was added in Qt 5.4.
\value AppConfigLocation Returns a directory location where user-specific
configuration files should be written. This is an application-specific directory,
and the returned path is never empty.
@@ -190,7 +187,7 @@ QT_BEGIN_NAMESPACE
\row \li HomeLocation
\li "~"
\li "C:/Users/<USER>"
- \row \li DataLocation
+ \row \li AppLocalDataLocation
\li "~/Library/Application Support/<APPNAME>", "/Library/Application Support/<APPNAME>". "<APPDIR>/../Resources"
\li "C:/Users/<USER>/AppData/Local/<APPNAME>", "C:/ProgramData/<APPNAME>", "<APPDIR>", "<APPDIR>/data", "<APPDIR>/data/<APPNAME>"
\row \li CacheLocation
@@ -217,9 +214,6 @@ QT_BEGIN_NAMESPACE
\row \li AppDataLocation
\li "~/Library/Application Support/<APPNAME>", "/Library/Application Support/<APPNAME>". "<APPDIR>/../Resources"
\li "C:/Users/<USER>/AppData/Roaming/<APPNAME>", "C:/ProgramData/<APPNAME>", "<APPDIR>", "<APPDIR>/data", "<APPDIR>/data/<APPNAME>"
- \row \li AppLocalDataLocation
- \li "~/Library/Application Support/<APPNAME>", "/Library/Application Support/<APPNAME>". "<APPDIR>/../Resources"
- \li "C:/Users/<USER>/AppData/Local/<APPNAME>", "C:/ProgramData/<APPNAME>", "<APPDIR>", "<APPDIR>/data", "<APPDIR>/data/<APPNAME>"
\row \li AppConfigLocation
\li "~/Library/Preferences/<APPNAME>"
\li "C:/Users/<USER>/AppData/Local/<APPNAME>", "C:/ProgramData/<APPNAME>"
@@ -245,7 +239,7 @@ QT_BEGIN_NAMESPACE
\li "/tmp"
\row \li HomeLocation
\li "~"
- \row \li DataLocation
+ \row \li AppLocalDataLocation
\li "~/.local/share/<APPNAME>", "/usr/local/share/<APPNAME>", "/usr/share/<APPNAME>"
\row \li CacheLocation
\li "~/.cache/<APPNAME>"
@@ -263,8 +257,6 @@ QT_BEGIN_NAMESPACE
\li "~/.cache"
\row \li AppDataLocation
\li "~/.local/share/<APPNAME>", "/usr/local/share/<APPNAME>", "/usr/share/<APPNAME>"
- \row \li AppLocalDataLocation
- \li "~/.local/share/<APPNAME>", "/usr/local/share/<APPNAME>", "/usr/share/<APPNAME>"
\row \li AppConfigLocation
\li "~/.config/<APPNAME>", "/etc/xdg/<APPNAME>"
\endtable
@@ -298,7 +290,7 @@ QT_BEGIN_NAMESPACE
\row \li HomeLocation
\li "<APPROOT>/files"
\li system defined
- \row \li DataLocation
+ \row \li AppLocalDataLocation
\li "<APPROOT>/files", "<USER>/<APPNAME>/files"
\li "<APPROOT>/Library/Application Support"
\row \li CacheLocation
@@ -328,9 +320,6 @@ QT_BEGIN_NAMESPACE
\row \li AppConfigLocation
\li "<APPROOT>/files/settings"
\li "<APPROOT>/Library/Preferences/<APPNAME>"
- \row \li AppLocalDataLocation
- \li "<APPROOT>/files", "<USER>/<APPNAME>/files"
- \li "<APPROOT>/Library/Application Support"
\endtable
In the table above, \c <APPNAME> is usually the organization name, the
@@ -564,6 +553,8 @@ QString QStandardPaths::displayName(StandardLocation type)
return QCoreApplication::translate("QStandardPaths", "Temporary Directory");
case HomeLocation:
return QCoreApplication::translate("QStandardPaths", "Home");
+ case AppLocalDataLocation:
+ return QCoreApplication::translate("QStandardPaths", "Application Data");
case CacheLocation:
return QCoreApplication::translate("QStandardPaths", "Cache");
case GenericDataLocation:
@@ -579,8 +570,6 @@ QString QStandardPaths::displayName(StandardLocation type)
case DownloadLocation:
return QCoreApplication::translate("QStandardPaths", "Download");
case AppDataLocation:
- case AppLocalDataLocation:
- return QCoreApplication::translate("QStandardPaths", "Application Data");
case AppConfigLocation:
return QCoreApplication::translate("QStandardPaths", "Application Configuration");
}
diff --git a/src/corelib/io/qstandardpaths.h b/src/corelib/io/qstandardpaths.h
index cd9cb22bd2..2ee228beec 100644
--- a/src/corelib/io/qstandardpaths.h
+++ b/src/corelib/io/qstandardpaths.h
@@ -53,7 +53,6 @@ class Q_CORE_EXPORT QStandardPaths
Q_GADGET
public:
- // Do not re-order, must match QDesktopServices
enum StandardLocation {
DesktopLocation,
DocumentsLocation,
@@ -64,7 +63,7 @@ public:
PicturesLocation,
TempLocation,
HomeLocation,
- DataLocation,
+ AppLocalDataLocation,
CacheLocation,
GenericDataLocation,
RuntimeLocation,
@@ -73,8 +72,7 @@ public:
GenericCacheLocation,
GenericConfigLocation,
AppDataLocation,
- AppConfigLocation,
- AppLocalDataLocation = DataLocation
+ AppConfigLocation
};
Q_ENUM(StandardLocation)
diff --git a/src/corelib/io/qstandardpaths_win.cpp b/src/corelib/io/qstandardpaths_win.cpp
index 3637c11c0a..eb0ed58bcb 100644
--- a/src/corelib/io/qstandardpaths_win.cpp
+++ b/src/corelib/io/qstandardpaths_win.cpp
@@ -137,7 +137,7 @@ static GUID writableSpecialFolderId(QStandardPaths::StandardLocation type)
FOLDERID_Videos, // MoviesLocation
FOLDERID_Pictures, // PicturesLocation
GUID(), GUID(), // TempLocation/HomeLocation
- FOLDERID_LocalAppData, // AppLocalDataLocation ("Local" path), AppLocalDataLocation = DataLocation
+ FOLDERID_LocalAppData, // AppLocalDataLocation ("Local" path)
GUID(), // CacheLocation
FOLDERID_LocalAppData, // GenericDataLocation ("Local" path)
GUID(), // RuntimeLocation
@@ -159,7 +159,7 @@ static GUID writableSpecialFolderId(QStandardPaths::StandardLocation type)
FOLDERID_Videos, // MoviesLocation
FOLDERID_Pictures, // PicturesLocation
GUID(), GUID(), // TempLocation/HomeLocation
- FOLDERID_LocalAppDataLow,// AppLocalDataLocation ("Local" path), AppLocalDataLocation = DataLocation
+ FOLDERID_LocalAppDataLow,// AppLocalDataLocation ("Local" path)
GUID(), // CacheLocation
FOLDERID_LocalAppDataLow,// GenericDataLocation ("Local" path)
GUID(), // RuntimeLocation