mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-06 13:11:25 -07:00
Avoid temporary QString allocations
This fixes clazy warning: Use multi-arg instead [-Wclazy-qstring-arg]
This commit is contained in:
parent
c60b7b213e
commit
0457fd260e
29 changed files with 137 additions and 123 deletions
|
@ -60,8 +60,8 @@ const QString EXT_LEGACY {QStringLiteral(".rssrules")};
|
|||
|
||||
AutomatedRssDownloader::AutomatedRssDownloader(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, m_formatFilterJSON(QString("%1 (*%2)").arg(tr("Rules")).arg(EXT_JSON))
|
||||
, m_formatFilterLegacy(QString("%1 (*%2)").arg(tr("Rules (legacy)")).arg(EXT_LEGACY))
|
||||
, m_formatFilterJSON(QString("%1 (*%2)").arg(tr("Rules"), EXT_JSON))
|
||||
, m_formatFilterLegacy(QString("%1 (*%2)").arg(tr("Rules (legacy)"), EXT_LEGACY))
|
||||
, m_ui(new Ui::AutomatedRssDownloader)
|
||||
, m_currentRuleItem(nullptr)
|
||||
{
|
||||
|
@ -405,7 +405,7 @@ void AutomatedRssDownloader::on_exportBtn_clicked()
|
|||
QString selectedFilter {m_formatFilterJSON};
|
||||
QString path = QFileDialog::getSaveFileName(
|
||||
this, tr("Export RSS rules"), QDir::homePath()
|
||||
, QString("%1;;%2").arg(m_formatFilterJSON).arg(m_formatFilterLegacy), &selectedFilter);
|
||||
, QString("%1;;%2").arg(m_formatFilterJSON, m_formatFilterLegacy), &selectedFilter);
|
||||
if (path.isEmpty()) return;
|
||||
|
||||
const RSS::AutoDownloader::RulesFileFormat format {
|
||||
|
@ -437,7 +437,7 @@ void AutomatedRssDownloader::on_importBtn_clicked()
|
|||
QString selectedFilter {m_formatFilterJSON};
|
||||
QString path = QFileDialog::getOpenFileName(
|
||||
this, tr("Import RSS rules"), QDir::homePath()
|
||||
, QString("%1;;%2").arg(m_formatFilterJSON).arg(m_formatFilterLegacy), &selectedFilter);
|
||||
, QString("%1;;%2").arg(m_formatFilterJSON, m_formatFilterLegacy), &selectedFilter);
|
||||
if (path.isEmpty() || !QFile::exists(path))
|
||||
return;
|
||||
|
||||
|
@ -657,7 +657,7 @@ void AutomatedRssDownloader::updateFieldsToolTips(bool regex)
|
|||
tip += tr("An expression with an empty %1 clause (e.g. %2)",
|
||||
"We talk about regex/wildcards in the RSS filters section here."
|
||||
" So a valid sentence would be: An expression with an empty | clause (e.g. expr|)"
|
||||
).arg("<tt>|</tt>").arg("<tt>expr|</tt>");
|
||||
).arg("<tt>|</tt>", "<tt>expr|</tt>");
|
||||
m_ui->lineContains->setToolTip(tip + tr(" will match all articles.") + "</p>");
|
||||
m_ui->lineNotContains->setToolTip(tip + tr(" will exclude all articles.") + "</p>");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue