From a406aeb3ea8e44f2f511a0755f10d4639f8bfca2 Mon Sep 17 00:00:00 2001 From: Ryan Cao <70191398+ryanccn@users.noreply.github.com> Date: Sat, 22 Oct 2022 20:51:46 +0800 Subject: feat: register as zip/mrpack handler on macOS Signed-off-by: Ryan Cao <70191398+ryanccn@users.noreply.github.com> --- launcher/Application.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'launcher/Application.cpp') diff --git a/launcher/Application.cpp b/launcher/Application.cpp index 6ffec1ae..bcb3aa0d 100644 --- a/launcher/Application.cpp +++ b/launcher/Application.cpp @@ -943,6 +943,13 @@ bool Application::event(QEvent* event) { emit clickedOnDock(); } m_prevAppState = ev->applicationState(); + return true; + } + + if (event->type() == QEvent::FileOpen) { + auto ev = static_cast(event); + m_mainWindow->droppedURLs({ ev->url() }); + return true; } #endif return QApplication::event(event); -- cgit