mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-07 05:31:25 -07:00
Construct QString more efficiently
This commit is contained in:
parent
2c23840947
commit
7de8a4d6e0
25 changed files with 60 additions and 61 deletions
|
@ -59,8 +59,8 @@ const QString EXT_LEGACY {QStringLiteral(".rssrules")};
|
|||
|
||||
AutomatedRssDownloader::AutomatedRssDownloader(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, m_formatFilterJSON(QString("%1 (*%2)").arg(tr("Rules"), EXT_JSON))
|
||||
, m_formatFilterLegacy(QString("%1 (*%2)").arg(tr("Rules (legacy)"), EXT_LEGACY))
|
||||
, m_formatFilterJSON(QString::fromLatin1("%1 (*%2)").arg(tr("Rules"), EXT_JSON))
|
||||
, m_formatFilterLegacy(QString::fromLatin1("%1 (*%2)").arg(tr("Rules (legacy)"), EXT_LEGACY))
|
||||
, m_ui(new Ui::AutomatedRssDownloader)
|
||||
, m_currentRuleItem(nullptr)
|
||||
{
|
||||
|
@ -413,7 +413,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, m_formatFilterLegacy), &selectedFilter);
|
||||
, QString::fromLatin1("%1;;%2").arg(m_formatFilterJSON, m_formatFilterLegacy), &selectedFilter);
|
||||
if (path.isEmpty()) return;
|
||||
|
||||
const RSS::AutoDownloader::RulesFileFormat format {
|
||||
|
@ -445,7 +445,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, m_formatFilterLegacy), &selectedFilter);
|
||||
, QString::fromLatin1("%1;;%2").arg(m_formatFilterJSON, m_formatFilterLegacy), &selectedFilter);
|
||||
if (path.isEmpty() || !QFile::exists(path))
|
||||
return;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue