summaryrefslogtreecommitdiffstats
path: root/src/gui/util
diff options
context:
space:
mode:
authorDavid Faure <faure@kde.org>2011-10-22 11:33:06 +0200
committerQt by Nokia <qt-info@nokia.com>2011-10-23 15:28:25 +0200
commitdfa24768a3243eda68d91f573050bf23f96da2dd (patch)
tree40437c86c50a7ed1557caf8559129724899cd918 /src/gui/util
parent59f91c0194f1ac83ae78e4b22f466e25873e1282 (diff)
Deprecate QDesktopServices::storageLocation/displayName
Which required porting the related unittests to qstandardpaths Change-Id: I6eb63c46845f05cd29cc42b59872707526277c90 Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/util')
-rw-r--r--src/gui/util/qdesktopservices.cpp17
-rw-r--r--src/gui/util/qdesktopservices.h13
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