summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorVlad Zahorodnii <vlad.zahorodnii@kde.org>2023-05-16 22:01:03 +0300
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-05-31 07:38:35 +0000
commit8851c0f4a2e2b2457de8a8fa039b0ac6702edde5 (patch)
tree6442457a41f5907fbfbad0c3fb39e451d3c5c114 /tests
parent806bcef1ed4872704d9ece9064f8b0b5fbfc73e6 (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". Change-Id: If5abccaf3bf976449cada8891fff887870e45b5f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit fb86c5a47060b11a7fa6ee4d93ff51f052b904aa) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests')
-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());