[PATCH] qt: Don't pass '.desktop' to setDesktopFileName

19 views
Skip to first unread message

Mads Kiilerich

unread,
Jul 16, 2024, 9:18:40 AMJul 16
to thg...@googlegroups.com
# HG changeset patch
# User Mads Kiilerich <ma...@kiilerich.com>
# Date 1721132701 -7200
# Tue Jul 16 14:25:01 2024 +0200
# Branch stable
# Node ID 9bb21e5f62804a556150cf7170fd28d7da86af3d
# Parent ff6a0b8a8095ea037aa0f7bc947cfe8c6f6f694b
qt: Don't pass '.desktop' to setDesktopFileName

Address the startup warning:

QGuiApplication::setDesktopFileName: the specified desktop file name ends with .desktop. For compatibility reasons, the .desktop suffix will be removed. Please specify a desktop file name without .desktop suffix

The documentation in
https://doc.qt.io/qt-6/qguiapplication.html#desktopFileName-prop was made extra
clear in https://doc.qt.io/qt-6/qguiapplication.html#desktopFileName-prop .

diff --git a/tortoisehg/hgqt/qtapp.py b/tortoisehg/hgqt/qtapp.py
--- a/tortoisehg/hgqt/qtapp.py
+++ b/tortoisehg/hgqt/qtapp.py
@@ -520,7 +520,7 @@ class QtRunner(QObject):
self._mainapp.setOrganizationDomain('tortoisehg.org')
self._mainapp.setApplicationVersion(thgversion.version())
if hasattr(self._mainapp, 'setDesktopFileName'): # introduced in Qt 5.7
- self._mainapp.setDesktopFileName('thg.desktop')
+ self._mainapp.setDesktopFileName('thg')
self._fixlibrarypaths()
self._installtranslator()
QFont.insertSubstitutions('monospace', ['monaco', 'courier new'])

Yuya Nishihara

unread,
Jul 16, 2024, 10:30:34 AMJul 16
to Mads Kiilerich, thg...@googlegroups.com
On Tue, 16 Jul 2024 15:18:28 +0200, Mads Kiilerich wrote:
> # HG changeset patch
> # User Mads Kiilerich <ma...@kiilerich.com>
> # Date 1721132701 -7200
> # Tue Jul 16 14:25:01 2024 +0200
> # Branch stable
> # Node ID 9bb21e5f62804a556150cf7170fd28d7da86af3d
> # Parent ff6a0b8a8095ea037aa0f7bc947cfe8c6f6f694b
> qt: Don't pass '.desktop' to setDesktopFileName

Queued for stable, thanks.
Reply all
Reply to author
Forward
0 new messages