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:
parent
c955c04d8f
commit
cc1f6f3a5c
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue