diff options
author | David Faure <faure@kde.org> | 2011-10-21 20:12:01 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-23 00:56:31 +0200 |
commit | 86558de34134f67cf3815a29612edc2d730f2ea2 (patch) | |
tree | 868417b17bac24be1f17080680af0f614a98b9b6 /src/gui/util/qdesktopservices.cpp | |
parent | 4a788eb8313d7c089e3a59594fc6a5c9a7dd6499 (diff) |
Move path information from QDesktopServices (gui) to QStandardPaths (core)
Change-Id: Ic596c21894d83b4dab0c3f5b1aed916ddd590f2f
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/util/qdesktopservices.cpp')
-rw-r--r-- | src/gui/util/qdesktopservices.cpp | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/src/gui/util/qdesktopservices.cpp b/src/gui/util/qdesktopservices.cpp index 7e8195afe9..da3b498729 100644 --- a/src/gui/util/qdesktopservices.cpp +++ b/src/gui/util/qdesktopservices.cpp @@ -47,6 +47,7 @@ #include "qdesktopservices_qpa.cpp" +#include <qstandardpaths.h> #include <qhash.h> #include <qobject.h> #include <qcoreapplication.h> @@ -269,28 +270,21 @@ void QDesktopServices::unsetUrlHandler(const QString &scheme) */ /*! - \fn QString QDesktopServices::storageLocation(StandardLocation type) - \since 4.4 - - Returns the default system directory where files of \a type belong, or an empty string - if the location cannot be determined. - - \note The storage location returned can be a directory that does not exist; i.e., it - may need to be created by the system or the user. - - \note On Symbian OS, ApplicationsLocation always point /sys/bin folder on the same drive - with executable. FontsLocation always points to folder on ROM drive. Symbian OS does not - have desktop concept, DesktopLocation returns same path as DocumentsLocation. - Rest of the standard locations point to folder on same drive with executable, except - that if executable is in ROM the folder from C drive is returned. + \deprecated Use QStandardPaths::storageLocation() */ +QString QDesktopServices::storageLocation(StandardLocation type) +{ + return QStandardPaths::storageLocation(static_cast<QStandardPaths::StandardLocation>(type)); +} -/*! - \fn QString QDesktopServices::displayName(StandardLocation type) - Returns a localized display name for the given location \a type or - an empty QString if no relevant location can be found. +/*! + \deprecated Use QStandardPaths::displayName() */ +QString QDesktopServices::displayName(StandardLocation type) +{ + return QStandardPaths::displayName(static_cast<QStandardPaths::StandardLocation>(type)); +} QT_END_NAMESPACE |