summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Montel <[email protected]>2018-02-02 14:00:38 +0100
committerLaurent Montel <[email protected]>2018-02-02 14:00:46 +0100
commit7d6d053aa175038e3986ba3af6915f98e4e1c6b2 (patch)
tree3773be10bc403c32c95fe9dc4be7bf4577a68221
parenta61ed4c2d3774906ad76c18cd765b9e6ca7ecb2a (diff)
Use QLatin1String
-rw-r--r--src/commands/exportcertificatecommand.cpp4
-rw-r--r--src/commands/lookupcertificatescommand.cpp2
-rw-r--r--src/crypto/decryptverifyfilescontroller.cpp2
-rw-r--r--src/crypto/gui/resultitemwidget.cpp2
-rw-r--r--src/newcertificatewizard/newcertificatewizard.cpp16
-rw-r--r--src/utils/gnupg-helper.cpp2
-rw-r--r--src/view/tabwidget.cpp2
7 files changed, 15 insertions, 15 deletions
diff --git a/src/commands/exportcertificatecommand.cpp b/src/commands/exportcertificatecommand.cpp
index 798f8ed..76d6308 100644
--- a/src/commands/exportcertificatecommand.cpp
+++ b/src/commands/exportcertificatecommand.cpp
@@ -239,8 +239,8 @@ void ExportCertificateCommand::Private::startExportJob(GpgME::Protocol protocol,
Q_ASSERT(backend);
const QString fileName = fileNames[protocol];
const bool binary = protocol == GpgME::OpenPGP
- ? fileName.endsWith(QStringLiteral(".gpg"), Qt::CaseInsensitive) || fileName.endsWith(QStringLiteral(".pgp"), Qt::CaseInsensitive)
- : fileName.endsWith(QStringLiteral(".der"), Qt::CaseInsensitive);
+ ? fileName.endsWith(QLatin1String(".gpg"), Qt::CaseInsensitive) || fileName.endsWith(QLatin1String(".pgp"), Qt::CaseInsensitive)
+ : fileName.endsWith(QLatin1String(".der"), Qt::CaseInsensitive);
std::unique_ptr<ExportJob> job(backend->publicKeyExportJob(!binary));
Q_ASSERT(job.get());
diff --git a/src/commands/lookupcertificatescommand.cpp b/src/commands/lookupcertificatescommand.cpp
index 561f6fb..21b42f6 100644
--- a/src/commands/lookupcertificatescommand.cpp
+++ b/src/commands/lookupcertificatescommand.cpp
@@ -423,7 +423,7 @@ void LookupCertificatesCommand::Private::showHexPrefixInfo() const
{
const QRegExp rx(QLatin1String("(?:0x|0X)?[0-9a-fA-F]{6,}"));
if (rx.exactMatch(query)) {
- information(query.startsWith(QStringLiteral("0x"), Qt::CaseInsensitive)
+ information(query.startsWith(QLatin1String("0x"), Qt::CaseInsensitive)
? i18n("<p>You seem to be searching for a fingerPrint or a key-id.</p>"
"<p>Different keyservers expect different ways to search for these. "
"Some require a \"0x\" prefix, while others require there be no such prefix.</p>"
diff --git a/src/crypto/decryptverifyfilescontroller.cpp b/src/crypto/decryptverifyfilescontroller.cpp
index 52b0d62..798f20a 100644
--- a/src/crypto/decryptverifyfilescontroller.cpp
+++ b/src/crypto/decryptverifyfilescontroller.cpp
@@ -280,7 +280,7 @@ std::shared_ptr<ArchiveDefinition> DecryptVerifyFilesController::pick_archive_de
return std::shared_ptr<ArchiveDefinition>();
}
- if (extension.endsWith(QStringLiteral(".out"))) { // added by outputFileName() -> remove
+ if (extension.endsWith(QLatin1String(".out"))) { // added by outputFileName() -> remove
extension.chop(4);
}
diff --git a/src/crypto/gui/resultitemwidget.cpp b/src/crypto/gui/resultitemwidget.cpp
index e1d9979..e105d99 100644
--- a/src/crypto/gui/resultitemwidget.cpp
+++ b/src/crypto/gui/resultitemwidget.cpp
@@ -303,7 +303,7 @@ void ResultItemWidget::Private::slotLinkActivated(const QString &link)
{
Q_ASSERT(m_result);
qCDebug(KLEOPATRA_LOG) << "Link activated: " << link;
- if (link.startsWith(QStringLiteral("key:"))) {
+ if (link.startsWith(QLatin1String("key:"))) {
auto split = link.split(QLatin1Char(':'));
auto fpr = split.value(1);
if (split.size() == 2 && isFingerprint(fpr)) {
diff --git a/src/newcertificatewizard/newcertificatewizard.cpp b/src/newcertificatewizard/newcertificatewizard.cpp
index cfc33cd..9b22604 100644
--- a/src/newcertificatewizard/newcertificatewizard.cpp
+++ b/src/newcertificatewizard/newcertificatewizard.cpp
@@ -246,11 +246,11 @@ static void parseAlgoString(const QString &algoString, int *size, Subkey::Pubkey
return;
}
*algo = Subkey::AlgoUnknown;
- if (lowered.startsWith(QStringLiteral("rsa"))) {
+ if (lowered.startsWith(QLatin1String("rsa"))) {
*algo = Subkey::AlgoRSA;
- } else if (lowered.startsWith(QStringLiteral("dsa"))) {
+ } else if (lowered.startsWith(QLatin1String("dsa"))) {
*algo = Subkey::AlgoDSA;
- } else if (lowered.startsWith(QStringLiteral("elg"))) {
+ } else if (lowered.startsWith(QLatin1String("elg"))) {
*algo = Subkey::AlgoELG;
}
@@ -265,7 +265,7 @@ static void parseAlgoString(const QString &algoString, int *size, Subkey::Pubkey
}
// Now the ECC Algorithms
- if (lowered.startsWith(QStringLiteral("ed25519"))) {
+ if (lowered.startsWith(QLatin1String("ed25519"))) {
// Special handling for this as technically
// this is a cv25519 curve used for EDDSA
curve = split[0];
@@ -273,10 +273,10 @@ static void parseAlgoString(const QString &algoString, int *size, Subkey::Pubkey
return;
}
- if (lowered.startsWith(QStringLiteral("cv25519")) ||
- lowered.startsWith(QStringLiteral("nist")) ||
- lowered.startsWith(QStringLiteral("brainpool")) ||
- lowered.startsWith(QStringLiteral("secp"))) {
+ if (lowered.startsWith(QLatin1String("cv25519")) ||
+ lowered.startsWith(QLatin1String("nist")) ||
+ lowered.startsWith(QLatin1String("brainpool")) ||
+ lowered.startsWith(QLatin1String("secp"))) {
curve = split[0];
*algo = isEncrypt ? Subkey::AlgoECDH : Subkey::AlgoECDSA;
return;
diff --git a/src/utils/gnupg-helper.cpp b/src/utils/gnupg-helper.cpp
index 3a66dad..f4ad4c1 100644
--- a/src/utils/gnupg-helper.cpp
+++ b/src/utils/gnupg-helper.cpp
@@ -141,7 +141,7 @@ QString Kleo::gpg4winVersion()
return QStringLiteral("Unknown (no VERSION file found)");
}
const QString g4wTag = QString::fromUtf8(versionFile.readLine());
- if (!g4wTag.startsWith(QStringLiteral("gpg4win"))) {
+ if (!g4wTag.startsWith(QLatin1String("gpg4win"))) {
// Hu? Something unknown
return QStringLiteral("Unknown (invalid VERSION file found)");
}
diff --git a/src/view/tabwidget.cpp b/src/view/tabwidget.cpp
index d0ad571..671ac96 100644
--- a/src/view/tabwidget.cpp
+++ b/src/view/tabwidget.cpp
@@ -825,7 +825,7 @@ void TabWidget::createActions(KActionCollection *coll)
for (int i = 0; i < d->NumPageActions; ++i) {
action_data ad = actionData[i];
- Q_ASSERT(QString::fromLatin1(ad.name).startsWith(QStringLiteral("window_")));
+ Q_ASSERT(QString::fromLatin1(ad.name).startsWith(QLatin1String("window_")));
ad.name = ad.name + strlen("window_");
ad.tooltip.clear();
ad.receiver = nullptr;