diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-05-12 14:30:36 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-05-13 14:38:23 +0200 |
commit | 082eebe6a47c910593f87798bf688149e6ca5534 (patch) | |
tree | c6e2a5dea5f9618f70b2214ae9d4a0a70824a619 /tests/auto/gui | |
parent | c85603385130703f9a24dd4d80978c70888d3ad1 (diff) |
Remove deprecated QDesktopServices APIs
Change-Id: Ic21ad2938b20c1aa3ae499a921c9cff92f615816
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/auto/gui')
-rw-r--r-- | tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp b/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp index 4d95345de9..7c864a078c 100644 --- a/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp +++ b/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp @@ -28,7 +28,6 @@ #include <QtTest/QtTest> -#include <qdebug.h> #include <qdesktopservices.h> #include <qregularexpression.h> @@ -39,9 +38,6 @@ class tst_qdesktopservices : public QObject private slots: void openUrl(); void handlers(); -#if QT_DEPRECATED_SINCE(5, 0) - void testDataLocation(); -#endif }; void tst_qdesktopservices::openUrl() @@ -87,39 +83,6 @@ void tst_qdesktopservices::handlers() QCOMPARE(barHandler.lastHandledUrl.toString(), barUrl.toString()); } -#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) -#define Q_XDG_PLATFORM -#endif - -#if QT_DEPRECATED_SINCE(5, 0) -void tst_qdesktopservices::testDataLocation() -{ - // This is the one point where QDesktopServices and QStandardPaths differ. - // QDesktopServices on unix returns "data"/orgname/appname for DataLocation, for Qt4 compat. - // And the appname in qt4 defaulted to empty, not to argv[0]. - { - const QString base = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation); - const QString app = QDesktopServices::storageLocation(QDesktopServices::DataLocation); -#ifdef Q_XDG_PLATFORM - QCOMPARE(app, base + "/data//"); // as ugly as in Qt4 -#else - QCOMPARE(app, base); -#endif - } - QCoreApplication::instance()->setOrganizationName("Qt"); - QCoreApplication::instance()->setApplicationName("QtTest"); - { - const QString base = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation); - const QString app = QDesktopServices::storageLocation(QDesktopServices::DataLocation); -#ifdef Q_XDG_PLATFORM - QCOMPARE(app, base + "/data/Qt/QtTest"); -#else - QCOMPARE(app, base + "/Qt/QtTest"); -#endif - } -} -#endif - QTEST_MAIN(tst_qdesktopservices) #include "tst_qdesktopservices.moc" |