Fix dropping .torrent files into main window on Windows

Previously used `QUrl::fromPercentEncoding()` leads to paths like
"/C:/test/a.torrent" which obviously aren't valid filesystem paths.
This commit is contained in:
Mike Gelfand 2016-03-15 06:04:49 +00:00
parent c955c04d8f
commit cc1f6f3a5c
1 changed files with 2 additions and 2 deletions

View File

@ -1444,8 +1444,8 @@ MainWindow::dropEvent (QDropEvent * event)
{
const QUrl url (key);
if (url.scheme () == QLatin1String ("file"))
key = QUrl::fromPercentEncoding (url.path().toUtf8());
if (url.isLocalFile ())
key = url.toLocalFile ();
qApp->addTorrent (key);
}