summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp')
-rw-r--r--tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp17
1 files changed, 1 insertions, 16 deletions
diff --git a/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp b/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp
index b338e01684..e75626eda7 100644
--- a/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp
+++ b/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QTest>
@@ -42,10 +42,6 @@ public slots:
}
};
-#if QT_VERSION < QT_VERSION_CHECK(6, 6, 0)
-# define CAN_IMPLICITLY_UNSET
-#endif
-
void tst_qdesktopservices::handlers()
{
MyUrlHandler fooHandler;
@@ -53,12 +49,10 @@ void tst_qdesktopservices::handlers()
QDesktopServices::setUrlHandler(QString("foo"), &fooHandler, "handle");
QDesktopServices::setUrlHandler(QString("bar"), &barHandler, "handle");
-#ifndef CAN_IMPLICITLY_UNSET
const auto unsetHandlers = qScopeGuard([] {
QDesktopServices::unsetUrlHandler(u"bar"_s);
QDesktopServices::unsetUrlHandler(u"foo"_s);
});
-#endif
QUrl fooUrl("foo://blub/meh");
QUrl barUrl("bar://hmm/hmmmm");
@@ -68,15 +62,6 @@ void tst_qdesktopservices::handlers()
QCOMPARE(fooHandler.lastHandledUrl.toString(), fooUrl.toString());
QCOMPARE(barHandler.lastHandledUrl.toString(), barUrl.toString());
-
-#ifdef CAN_IMPLICITLY_UNSET
- for (int i = 0; i < 2; ++i)
- QTest::ignoreMessage(QtWarningMsg,
- "Please call QDesktopServices::unsetUrlHandler() before destroying a "
- "registered URL handler object.\n"
- "Support for destroying a registered URL handler object is deprecated, "
- "and will be removed in Qt 6.6.");
-#endif
}
QTEST_MAIN(tst_qdesktopservices)