mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-07 05:31:25 -07:00
Added support for url open event on Mac
This commit is contained in:
parent
3affb38ba2
commit
fe57cef756
1 changed files with 4 additions and 0 deletions
|
@ -43,6 +43,10 @@ bool QMacApplication::event(QEvent * ev) {
|
|||
case QEvent::FileOpen:
|
||||
{
|
||||
QString path = static_cast<QFileOpenEvent *>(ev)->file();
|
||||
if(path.isEmpty()) {
|
||||
// Get the url instead
|
||||
path = static_cast<QFileOpenEvent *>(ev)->url();
|
||||
}
|
||||
qDebug("Received a mac file open event: %s", qPrintable(path));
|
||||
emit newFileOpenMacEvent(path);
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue