mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-21 07:57:22 -06:00
Merge pull request #8471 from luis-pereira/use-qstring-ref
Don't create temporary substrings
This commit is contained in:
@@ -401,7 +401,7 @@ void Application::processParams(const QStringList ¶ms)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (param.startsWith(QLatin1String("@addPaused="))) {
|
if (param.startsWith(QLatin1String("@addPaused="))) {
|
||||||
torrentParams.addPaused = param.mid(11).toInt() ? TriStateBool::True : TriStateBool::False;
|
torrentParams.addPaused = param.midRef(11).toInt() ? TriStateBool::True : TriStateBool::False;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -426,7 +426,7 @@ void Application::processParams(const QStringList ¶ms)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (param.startsWith(QLatin1String("@skipDialog="))) {
|
if (param.startsWith(QLatin1String("@skipDialog="))) {
|
||||||
skipTorrentDialog = param.mid(12).toInt() ? TriStateBool::True : TriStateBool::False;
|
skipTorrentDialog = param.midRef(12).toInt() ? TriStateBool::True : TriStateBool::False;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -302,7 +302,7 @@ bool AutoDownloadRule::matches(const QString &articleTitle) const
|
|||||||
QRegularExpression reg(cachedRegex(partialPattern1));
|
QRegularExpression reg(cachedRegex(partialPattern1));
|
||||||
|
|
||||||
if (ep.endsWith('-')) { // Infinite range
|
if (ep.endsWith('-')) { // Infinite range
|
||||||
int epOurs = ep.left(ep.size() - 1).toInt();
|
int epOurs = ep.leftRef(ep.size() - 1).toInt();
|
||||||
|
|
||||||
// Extract partial match from article and compare as digits
|
// Extract partial match from article and compare as digits
|
||||||
matcher = reg.match(articleTitle);
|
matcher = reg.match(articleTitle);
|
||||||
|
|||||||
Reference in New Issue
Block a user