summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qstandardpaths.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/io/qstandardpaths.cpp')
-rw-r--r--src/corelib/io/qstandardpaths.cpp30
1 files changed, 22 insertions, 8 deletions
diff --git a/src/corelib/io/qstandardpaths.cpp b/src/corelib/io/qstandardpaths.cpp
index ba1de461f8..c5c596fd2e 100644
--- a/src/corelib/io/qstandardpaths.cpp
+++ b/src/corelib/io/qstandardpaths.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -137,6 +137,10 @@ QT_BEGIN_NAMESPACE
\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.
+ This enum value was added in Qt 5.5.
The following table gives examples of paths on different operating systems.
The first path is the writable path (unless noted). Other, additional
@@ -201,6 +205,9 @@ QT_BEGIN_NAMESPACE
\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"
+ \row \li AppConfigLocation
+ \li "~/Library/Preferences/<APPNAME>"
+ \li "C:/Users/<USER>/AppData/Local/<APPNAME>", "C:/ProgramData/<APPNAME>"
\endtable
\table
@@ -262,6 +269,9 @@ QT_BEGIN_NAMESPACE
\row \li AppLocalDataLocation
\li "<APPROOT>/data", "<APPROOT>/app/native/assets"
\li "~/.local/share/<APPNAME>", "/usr/local/share/<APPNAME>", "/usr/share/<APPNAME>"
+ \row \li AppConfigLocation
+ \li "<APPROOT>/data/Settings"
+ \li "~/.config/<APPNAME>", "/etc/xdg/<APPNAME>"
\endtable
\table
@@ -302,6 +312,8 @@ QT_BEGIN_NAMESPACE
\li "<APPROOT>/cache" (there is no shared cache)
\row \li AppDataLocation
\li "<APPROOT>/files", "<USER>/<APPNAME>/files"
+ \row \li AppConfigLocation
+ \li "<APPROOT>/files/settings"
\endtable
In the table above, \c <APPNAME> is usually the organization name, the
@@ -560,6 +572,8 @@ QString QStandardPaths::displayName(StandardLocation type)
case AppDataLocation:
case AppLocalDataLocation:
return QCoreApplication::translate("QStandardPaths", "Application Data");
+ case AppConfigLocation:
+ return QCoreApplication::translate("QStandardPaths", "Application Configuration");
}
// not reached
return QString();
@@ -580,7 +594,7 @@ QString QStandardPaths::displayName(StandardLocation type)
This affects the locations into which test programs might write files:
GenericDataLocation, DataLocation, ConfigLocation, GenericConfigLocation,
- GenericCacheLocation, CacheLocation.
+ AppConfigLocation, GenericCacheLocation, CacheLocation.
Other locations are not affected.
On Unix, \c XDG_DATA_HOME is set to \e ~/.qttest/share, \c XDG_CONFIG_HOME is