Fix Info.plist file

This commit is contained in:
Christophe Dumez
2010-06-13 09:26:30 +00:00
parent 425150cd01
commit 0755eccf4f
2 changed files with 15 additions and 0 deletions

View File

@@ -29,6 +29,17 @@
<true/>
</dict>
</array>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>magnet</string>
</array>
<key>CFBundleURLName</key>
<string>BitTorrent Magnet URL</string>
</dict>
</array>
<key>CFBundleIconFile</key>
<string>qbittorrent_mac.icns</string>
<key>CFBundleInfoDictionaryVersion</key>

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;