diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/util/qdesktopservices.cpp | 17 | ||||
-rw-r--r-- | src/gui/util/qdesktopservices.h | 13 |
2 files changed, 17 insertions, 13 deletions
diff --git a/src/gui/util/qdesktopservices.cpp b/src/gui/util/qdesktopservices.cpp index ab45c17dd3..4fbf0a59f3 100644 --- a/src/gui/util/qdesktopservices.cpp +++ b/src/gui/util/qdesktopservices.cpp @@ -270,21 +270,16 @@ void QDesktopServices::unsetUrlHandler(const QString &scheme) */ /*! - \deprecated Use QStandardPaths::writableLocation() + \fn QString QDesktopServices::storageLocation(StandardLocation type) + \obsolete + Use QStandardPaths::writableLocation() */ -QString QDesktopServices::storageLocation(StandardLocation type) -{ - return QStandardPaths::writableLocation(static_cast<QStandardPaths::StandardLocation>(type)); -} - /*! - \deprecated Use QStandardPaths::displayName() + \fn QString QDesktopServices::displayName(StandardLocation type) + \obsolete + Use QStandardPaths::displayName() */ -QString QDesktopServices::displayName(StandardLocation type) -{ - return QStandardPaths::displayName(static_cast<QStandardPaths::StandardLocation>(type)); -} QT_END_NAMESPACE diff --git a/src/gui/util/qdesktopservices.h b/src/gui/util/qdesktopservices.h index aba51959bd..ba7702f0d7 100644 --- a/src/gui/util/qdesktopservices.h +++ b/src/gui/util/qdesktopservices.h @@ -43,6 +43,9 @@ #define QDESKTOPSERVICES_H #include <QtCore/qstring.h> +#if QT_DEPRECATED_SINCE(5, 0) +#include <QtCore/qstandardpaths.h> +#endif QT_BEGIN_HEADER @@ -63,6 +66,7 @@ public: static void setUrlHandler(const QString &scheme, QObject *receiver, const char *method); static void unsetUrlHandler(const QString &scheme); +#if QT_DEPRECATED_SINCE(5, 0) enum StandardLocation { DesktopLocation, DocumentsLocation, @@ -77,8 +81,13 @@ public: CacheLocation }; - static QString storageLocation(StandardLocation type); - static QString displayName(StandardLocation type); + QT_DEPRECATED static QString storageLocation(StandardLocation type) { + return QStandardPaths::writableLocation(static_cast<QStandardPaths::StandardLocation>(type)); + } + QT_DEPRECATED static QString displayName(StandardLocation type) { + return QStandardPaths::displayName(static_cast<QStandardPaths::StandardLocation>(type)); + } +#endif }; #endif // QT_NO_DESKTOPSERVICES |