From c7e3fec69ea975f131a400e06853a500959bdc49 Mon Sep 17 00:00:00 2001 From: f321x Date: Thu, 24 Jul 2025 10:26:42 +0200 Subject: [PATCH] fix: remove .desktop from setDesktopFileName argument MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removes the '.desktop' suffix from the `QGuiApplication.setDesktopFileName` argument to prevent the following warning on startup of Electrum: ``` 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 [qt docs](https://doc.qt.io/qtforpython-6/PySide6/QtGui/QGuiApplication.html#PySide6.QtGui.QGuiApplication.desktopFileName) say that `desktopFileName` is "... is the file name, without the full path or the trailing “.desktop” extension of the desktop entry that represents this application according to the freedesktop desktop entry specification." --- electrum/gui/qt/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electrum/gui/qt/__init__.py b/electrum/gui/qt/__init__.py index de41bcafd..dcd5092e9 100644 --- a/electrum/gui/qt/__init__.py +++ b/electrum/gui/qt/__init__.py @@ -152,7 +152,7 @@ class ElectrumGui(BaseElectrumGui, Logger): if hasattr(QtCore.Qt, "AA_ShareOpenGLContexts"): QtCore.QCoreApplication.setAttribute(QtCore.Qt.AA_ShareOpenGLContexts) if hasattr(QGuiApplication, 'setDesktopFileName'): - QGuiApplication.setDesktopFileName('electrum.desktop') + QGuiApplication.setDesktopFileName('electrum') QGuiApplication.setApplicationName("Electrum") self.gui_thread = threading.current_thread() self.windows = [] # type: List[ElectrumWindow]