|
|
@ -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; |
|
|
|