mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 07:18:08 +00:00
Fix installing search plugin from local file.
This commit is contained in:
parent
47d9c12f4b
commit
21f18d015d
@ -358,11 +358,10 @@ void engineSelectDlg::askForLocalPlugin() {
|
||||
QStringList pathsList = QFileDialog::getOpenFileNames(0,
|
||||
tr("Select search plugins"), QDir::homePath(),
|
||||
tr("qBittorrent search plugin")+QString::fromUtf8(" (*.py)"));
|
||||
QString path;
|
||||
foreach (path, pathsList) {
|
||||
foreach (QString path, pathsList) {
|
||||
if (path.endsWith(".py", Qt::CaseInsensitive)) {
|
||||
QString plugin_name = path.split("/").last();
|
||||
plugin_name.replace(".py", "", Qt::CaseInsensitive);
|
||||
QString plugin_name = Utils::Fs::fileName(path);
|
||||
plugin_name.chop(3); // Remove extension
|
||||
installPlugin(path, plugin_name);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user