Merge remote-tracking branch 'origin/pr/3637'

This commit is contained in:
Florian Bruhin 2018-02-26 07:16:19 +01:00
commit bd79d7e071

View File

@ -840,7 +840,11 @@ class Application(QApplication):
def event(self, e):
"""Handle macOS FileOpen events."""
if e.type() == QEvent.FileOpen:
open_url(e.url(), no_raise=True)
url = e.url()
if url.isValid():
open_url(url, no_raise=True)
else:
message.error("Invalid URL: {}".format(url.errorString()))
else:
return super().event(e)