mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 07:18:08 +00:00
Added support for url open event on Mac
This commit is contained in:
parent
3affb38ba2
commit
fe57cef756
@ -43,6 +43,10 @@ bool QMacApplication::event(QEvent * ev) {
|
|||||||
case QEvent::FileOpen:
|
case QEvent::FileOpen:
|
||||||
{
|
{
|
||||||
QString path = static_cast<QFileOpenEvent *>(ev)->file();
|
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));
|
qDebug("Received a mac file open event: %s", qPrintable(path));
|
||||||
emit newFileOpenMacEvent(path);
|
emit newFileOpenMacEvent(path);
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user