mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-31 20:58:07 -06:00
Replace QString::split() by faster alternatives
This commit is contained in:
@@ -376,8 +376,10 @@ void SearchPluginManager::pluginDownloadFinished(const Net::DownloadResult &resu
|
||||
Utils::Fs::forceRemove(filePath);
|
||||
}
|
||||
else {
|
||||
QString pluginName = result.url.split('/').last();
|
||||
const QString url = result.url;
|
||||
QString pluginName = url.mid(url.lastIndexOf('/') + 1);
|
||||
pluginName.replace(".py", "", Qt::CaseInsensitive);
|
||||
|
||||
if (pluginInfo(pluginName))
|
||||
emit pluginUpdateFailed(pluginName, tr("Failed to download the plugin file. %1").arg(result.errorString));
|
||||
else
|
||||
@@ -462,7 +464,7 @@ void SearchPluginManager::update()
|
||||
plugin->fullName = engineElem.elementsByTagName("name").at(0).toElement().text();
|
||||
plugin->url = engineElem.elementsByTagName("url").at(0).toElement().text();
|
||||
|
||||
const auto categories = engineElem.elementsByTagName("categories").at(0).toElement().text().split(' ');
|
||||
const QStringList categories = engineElem.elementsByTagName("categories").at(0).toElement().text().split(' ');
|
||||
for (QString cat : categories) {
|
||||
cat = cat.trimmed();
|
||||
if (!cat.isEmpty())
|
||||
|
||||
Reference in New Issue
Block a user