mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Fix installing search plugin from local file.
This commit is contained in:
parent
47d9c12f4b
commit
21f18d015d
1 changed files with 3 additions and 4 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue