From: Mike Gelfand Date: Tue, 15 Mar 2016 06:04:49 +0000 (+0000) Subject: Fix dropping .torrent files into main window on Windows X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cc1f6f3a5c5004b19ce6188dda460676cf21616d;p=transmission 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. --- diff --git a/qt/MainWindow.cc b/qt/MainWindow.cc index aa65e2d4e..72dfe11c5 100644 --- a/qt/MainWindow.cc +++ b/qt/MainWindow.cc @@ -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); }