1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-22 12:34:19 +00:00

Added support for url open event on Mac

This commit is contained in:
Christophe Dumez 2010-06-13 09:20:16 +00:00
parent 3affb38ba2
commit fe57cef756

View File

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