Commit a6099532 authored by Laurent Montel's avatar Laurent Montel 😁

Minor optimization

parent d8820bcf
......@@ -300,10 +300,10 @@ static QMap <int, QString> buildOutputNames(const QStringList &files, const bool
firstFile.baseName());
const auto ad = getDefaultAd();
baseNamePgp = baseName + QStringLiteral(".") + ad->extensions(GpgME::OpenPGP).first() + QStringLiteral(".");
baseNameCms = baseName + QStringLiteral(".") + ad->extensions(GpgME::CMS).first() + QStringLiteral(".");
baseNamePgp = baseName + QLatin1Char('.') + ad->extensions(GpgME::OpenPGP).first() + QLatin1Char('.');
baseNameCms = baseName + QLatin1Char('.') + ad->extensions(GpgME::CMS).first() + QLatin1Char('.');
} else {
baseNameCms = baseNamePgp = files.first() + QStringLiteral(".");
baseNameCms = baseNamePgp = files.first() + QLatin1Char('.');
}
const FileOperationsPreferences prefs;
const bool ascii = prefs.addASCIIArmor();
......@@ -328,7 +328,7 @@ static QMap <int, QString> buildOutputNamesForDir(const QString &file, const QMa
// Build the default names for the wizard.
const QFileInfo fi(file);
const QString baseName = dir + QStringLiteral("/") + fi.fileName() + QStringLiteral(".");
const QString baseName = dir + QLatin1Char('/') + fi.fileName() + QStringLiteral(".");
const FileOperationsPreferences prefs;
const bool ascii = prefs.addASCIIArmor();
......
......@@ -386,7 +386,7 @@ QString KleopatraApplication::newInstance(const QCommandLineParser &parser,
cmd->setParentWId(parentId);
cmd->start();
}
return errors.join("\n");
return errors.join('\n');
}
}
......
......@@ -228,5 +228,5 @@ std::string OpenPGPCard::cardHolder() const
{
auto list = QString::fromStdString(mMetaInfo.value("DISP-NAME")).split("<<");
std::reverse(list.begin(), list.end());
return list.join(QStringLiteral(" ")).toStdString();
return list.join(QLatin1Char(' ')).toStdString();
}
......@@ -383,7 +383,7 @@ void PGPCardWidget::changeNameRequested()
}
auto parts = text.split(" ");
const auto lastName = parts.takeLast();
const auto formatted = lastName + QStringLiteral("<<") + parts.join("<");
const auto formatted = lastName + QStringLiteral("<<") + parts.join('<');
ReaderStatus::mutableInstance()
->startSimpleTransaction(QStringLiteral("SCD SETATTR DISP-NAME %1").arg(formatted).toUtf8().constData(),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment