summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/kernel
diff options
context:
space:
mode:
authorVlad Zahorodnii <vlad.zahorodnii@kde.org>2023-05-16 22:01:03 +0300
committerVlad Zahorodnii <vlad.zahorodnii@kde.org>2023-05-30 23:51:56 +0300
commitfb86c5a47060b11a7fa6ee4d93ff51f052b904aa (patch)
tree9bc45a3765d8680af083fb28d205a50090a89c9d /tests/auto/gui/kernel
parentd68dbd8b7d018f0a4f0eddf558b5524f608f949a (diff)
QGuiApplication: Remove .desktop suffix in setDesktopFileName
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ø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'tests/auto/gui/kernel')
-rw-r--r--tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp4
1 files changed, 2 insertions, 2 deletions
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());