Rename storageLocation() to writableLocation().
Change-Id: I8f6522a70950f78ddd6141360d36d104bd697e28 Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
This commit is contained in:
parent
ddc093b90e
commit
83c219dfe2
@ -65,7 +65,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
\enum QStandardPaths::StandardLocation
|
\enum QStandardPaths::StandardLocation
|
||||||
|
|
||||||
This enum describes the different locations that can be queried using
|
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.
|
and QStandardPaths::displayName.
|
||||||
|
|
||||||
\value DesktopLocation Returns the user's desktop directory.
|
\value DesktopLocation Returns the user's desktop directory.
|
||||||
@ -91,11 +91,11 @@ QT_BEGIN_NAMESPACE
|
|||||||
configuration files should be written.
|
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
|
Returns the directory where files of \a type should be written to, or an empty string
|
||||||
if the location cannot be determined.
|
if the location cannot be determined.
|
||||||
@ -117,7 +117,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
Returns all the directories where files of \a type belong.
|
Returns all the directories where files of \a type belong.
|
||||||
|
|
||||||
Much like the PATH variable, it returns the directories in order of priority,
|
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.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -75,7 +75,7 @@ public:
|
|||||||
ConfigLocation
|
ConfigLocation
|
||||||
};
|
};
|
||||||
|
|
||||||
static QString storageLocation(StandardLocation type);
|
static QString writableLocation(StandardLocation type);
|
||||||
static QStringList standardLocations(StandardLocation type);
|
static QStringList standardLocations(StandardLocation type);
|
||||||
|
|
||||||
enum LocateOption {
|
enum LocateOption {
|
||||||
|
@ -117,7 +117,7 @@ static QString macLocation(QStandardPaths::StandardLocation type, short domain)
|
|||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString QStandardPaths::storageLocation(StandardLocation type)
|
QString QStandardPaths::writableLocation(StandardLocation type)
|
||||||
{
|
{
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case HomeLocation:
|
case HomeLocation:
|
||||||
@ -144,7 +144,7 @@ QStringList QStandardPaths::standardLocations(StandardLocation type)
|
|||||||
dirs.append(path);
|
dirs.append(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString localDir = storageLocation(type);
|
const QString localDir = writableLocation(type);
|
||||||
dirs.prepend(localDir);
|
dirs.prepend(localDir);
|
||||||
return dirs;
|
return dirs;
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
QString QStandardPaths::storageLocation(StandardLocation type)
|
QString QStandardPaths::writableLocation(StandardLocation type)
|
||||||
{
|
{
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case HomeLocation:
|
case HomeLocation:
|
||||||
@ -212,7 +212,7 @@ QString QStandardPaths::storageLocation(StandardLocation type)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ApplicationsLocation:
|
case ApplicationsLocation:
|
||||||
path = storageLocation(GenericDataLocation) + QLatin1String("/applications");
|
path = writableLocation(GenericDataLocation) + QLatin1String("/applications");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -241,7 +241,7 @@ QStringList QStandardPaths::standardLocations(StandardLocation type)
|
|||||||
} else
|
} else
|
||||||
dirs = xdgConfigDirs.split(QLatin1Char(':'));
|
dirs = xdgConfigDirs.split(QLatin1Char(':'));
|
||||||
}
|
}
|
||||||
const QString localDir = storageLocation(type);
|
const QString localDir = writableLocation(type);
|
||||||
dirs.prepend(localDir);
|
dirs.prepend(localDir);
|
||||||
return dirs;
|
return dirs;
|
||||||
}
|
}
|
||||||
|
@ -90,7 +90,7 @@ static QString convertCharArray(const wchar_t *path)
|
|||||||
return QDir::fromNativeSeparators(QString::fromWCharArray(path));
|
return QDir::fromNativeSeparators(QString::fromWCharArray(path));
|
||||||
}
|
}
|
||||||
|
|
||||||
QString QStandardPaths::storageLocation(StandardLocation type)
|
QString QStandardPaths::writableLocation(StandardLocation type)
|
||||||
{
|
{
|
||||||
QString result;
|
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
|
// 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
|
// location for everyone. Most applications seem to be using a
|
||||||
// cache directory located in their AppData directory
|
// cache directory located in their AppData directory
|
||||||
return storageLocation(DataLocation) + QLatin1String("\\cache");
|
return writableLocation(DataLocation) + QLatin1String("\\cache");
|
||||||
|
|
||||||
case RuntimeLocation:
|
case RuntimeLocation:
|
||||||
case HomeLocation:
|
case HomeLocation:
|
||||||
@ -202,7 +202,7 @@ QStringList QStandardPaths::standardLocations(StandardLocation type)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const QString localDir = storageLocation(type);
|
const QString localDir = writableLocation(type);
|
||||||
dirs.prepend(localDir);
|
dirs.prepend(localDir);
|
||||||
return dirs;
|
return dirs;
|
||||||
}
|
}
|
||||||
|
@ -270,11 +270,11 @@ void QDesktopServices::unsetUrlHandler(const QString &scheme)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\deprecated Use QStandardPaths::storageLocation()
|
\deprecated Use QStandardPaths::writableLocation()
|
||||||
*/
|
*/
|
||||||
QString QDesktopServices::storageLocation(StandardLocation type)
|
QString QDesktopServices::storageLocation(StandardLocation type)
|
||||||
{
|
{
|
||||||
return QStandardPaths::storageLocation(static_cast<QStandardPaths::StandardLocation>(type));
|
return QStandardPaths::writableLocation(static_cast<QStandardPaths::StandardLocation>(type));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user