From 1e5bfc9f66996dc60dc068201c43bd4dcc26f390 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Jastrz=C4=99bski?= Date: Tue, 21 Jan 2014 18:09:22 +0100 Subject: [PATCH] OSX: Fixed file association (close #65) --- kcc.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/kcc.py b/kcc.py index 41a1c1b..2b1edd5 100755 --- a/kcc.py +++ b/kcc.py @@ -108,6 +108,14 @@ class QApplicationMessaging(QtWidgets.QApplication): self._memory.detach() self._server.close() + def event(self, e): + if e.type() == QtCore.QEvent.FileOpen: + # noinspection PyArgumentList + self.messageFromOtherInstance.emit(bytes(e.file(), 'UTF-8')) + return True + else: + return QtWidgets.QApplication.event(self, e) + def isRunning(self): return self._running