From fb86c5a47060b11a7fa6ee4d93ff51f052b904aa Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 16 May 2023 22:01:03 +0300 Subject: QGuiApplication: Remove .desktop suffix in setDesktopFileName MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The desktop file name should not contain ".desktop" suffix, but some applications still specify it anyway because of the ambiguity in the documentation that was fixed in 0c5135a9dfa6140d23d86b001c3054891c22dcb9. This change makes setDesktopFileName remove ".desktop" suffix so desktopFileName always returns a desktop file name with correct format and its users don't need to chop ".desktop". Pick-to: 6.5 Change-Id: If5abccaf3bf976449cada8891fff887870e45b5f Reviewed-by: Tor Arne Vestbø --- tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp index 5a206d8177..8542ce300f 100644 --- a/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp +++ b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp @@ -122,8 +122,8 @@ void tst_QGuiApplication::desktopFileName() QCOMPARE(QGuiApplication::desktopFileName(), QString()); - QGuiApplication::setDesktopFileName("io.qt.QGuiApplication.desktop"); - QCOMPARE(QGuiApplication::desktopFileName(), QString::fromLatin1("io.qt.QGuiApplication.desktop")); + QGuiApplication::setDesktopFileName("io.qt.QGuiApplication"); + QCOMPARE(QGuiApplication::desktopFileName(), QString::fromLatin1("io.qt.QGuiApplication")); QGuiApplication::setDesktopFileName(QString()); QCOMPARE(QGuiApplication::desktopFileName(), QString()); -- cgit v1.2.3