feat: register as zip/mrpack handler on macOS

Signed-off-by: Ryan Cao <70191398+ryanccn@users.noreply.github.com>
This commit is contained in:
Ryan Cao
2022-10-22 20:51:46 +08:00
parent 7a8c963722
commit a406aeb3ea
2 changed files with 30 additions and 0 deletions

View File

@ -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<QFileOpenEvent*>(event);
m_mainWindow->droppedURLs({ ev->url() });
return true;
}
#endif
return QApplication::event(event);