From 9b10e3f43eae7e598e8bfdaff51488691649059e Mon Sep 17 00:00:00 2001 From: Wilco Greven Date: Sat, 20 Jul 2019 13:10:59 +0200 Subject: [PATCH] Set applicationName and desktopFileName before instantiating the application. When these are set after instantiating the application Anki will load both $XDG CONFIG HOME/.config/Ankirc and $XDG CONFIG HOME/.config/ankirc. --- aqt/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aqt/__init__.py b/aqt/__init__.py index c30b2bd7d..1645209b1 100644 --- a/aqt/__init__.py +++ b/aqt/__init__.py @@ -310,9 +310,9 @@ def _run(argv=None, exec=True): QCoreApplication.setAttribute(Qt.AA_EnableHighDpiScaling) # create the app - app = AnkiApp(argv) QCoreApplication.setApplicationName("Anki") QGuiApplication.setDesktopFileName("anki.desktop") + app = AnkiApp(argv) if app.secondInstance(): # we've signaled the primary instance, so we should close return