From b6e52922b05759d850d69f9782a1dd1800586595 Mon Sep 17 00:00:00 2001 From: Montel Laurent Date: Wed, 29 Jul 2015 07:29:50 +0200 Subject: [PATCH] Use QStringLiteral --- kleopatra/commands/clearcrlcachecommand.cpp | 2 +- kleopatra/commands/exportcertificatecommand.cpp | 4 ++-- .../commands/exportopenpgpcertstoservercommand.cpp | 2 +- kleopatra/commands/exportsecretkeycommand.cpp | 2 +- kleopatra/commands/gnupgprocesscommand.cpp | 2 +- kleopatra/commands/importcertificatescommand.cpp | 2 +- kleopatra/commands/refreshx509certscommand.cpp | 2 +- kleopatra/crypto/decryptverifyfilescontroller.cpp | 2 +- kleopatra/crypto/gui/newsignencryptfileswizard.cpp | 28 +++++++++++----------- kleopatra/crypto/gui/resolverecipientspage.cpp | 2 +- kleopatra/crypto/signemailtask.cpp | 4 ++-- kleopatra/dialogs/adduseriddialog.cpp | 2 +- kleopatra/kgpgconf/configreader.cpp | 2 +- kleopatra/kgpgconf/configuration.cpp | 2 +- kleopatra/kwatchgnupg/kwatchgnupgmainwin.cpp | 6 ++--- .../gui/certificaterequester.cpp | 2 +- kleopatra/mainwindow_desktop.cpp | 6 ++--- kleopatra/mainwindow_mobile.cpp | 4 ++-- kleopatra/models/keylistmodel.cpp | 2 +- .../newcertificatewizard/newcertificatewizard.cpp | 20 ++++++++-------- kleopatra/tests/test_keylistmodels.cpp | 4 ++-- kleopatra/uiserver/uiserver.cpp | 2 +- kleopatra/utils/filesystemwatcher.cpp | 2 +- kleopatra/utils/input.cpp | 2 +- kleopatra/utils/kdlogtextwidget.cpp | 2 +- kleopatra/utils/output.cpp | 2 +- kleopatra/utils/validation.cpp | 4 ++-- 27 files changed, 58 insertions(+), 58 deletions(-) diff --git a/kleopatra/commands/clearcrlcachecommand.cpp b/kleopatra/commands/clearcrlcachecommand.cpp index adc7ee1151..4783b23b15 100644 --- a/kleopatra/commands/clearcrlcachecommand.cpp +++ b/kleopatra/commands/clearcrlcachecommand.cpp @@ -73,7 +73,7 @@ QString ClearCrlCacheCommand::crashExitMessage(const QStringList &args) const { return i18n("The DirMngr process that tried to clear the CRL cache " "ended prematurely because of an unexpected error. " - "Please check the output of %1 for details.", args.join(QLatin1String(" "))) ; + "Please check the output of %1 for details.", args.join(QStringLiteral(" "))) ; } QString ClearCrlCacheCommand::errorExitMessage(const QStringList &args) const diff --git a/kleopatra/commands/exportcertificatecommand.cpp b/kleopatra/commands/exportcertificatecommand.cpp index 1554536ed7..cfa5907c14 100644 --- a/kleopatra/commands/exportcertificatecommand.cpp +++ b/kleopatra/commands/exportcertificatecommand.cpp @@ -236,8 +236,8 @@ void ExportCertificateCommand::Private::startExportJob(GpgME::Protocol protocol, assert(backend); const QString fileName = fileNames[protocol]; const bool binary = protocol == GpgME::OpenPGP - ? fileName.endsWith(QLatin1String(".gpg"), Qt::CaseInsensitive) || fileName.endsWith(QLatin1String(".pgp"), Qt::CaseInsensitive) - : fileName.endsWith(QLatin1String(".der"), Qt::CaseInsensitive) ; + ? fileName.endsWith(QStringLiteral(".gpg"), Qt::CaseInsensitive) || fileName.endsWith(QStringLiteral(".pgp"), Qt::CaseInsensitive) + : fileName.endsWith(QStringLiteral(".der"), Qt::CaseInsensitive) ; std::auto_ptr job(backend->publicKeyExportJob(!binary)); assert(job.get()); diff --git a/kleopatra/commands/exportopenpgpcertstoservercommand.cpp b/kleopatra/commands/exportopenpgpcertstoservercommand.cpp index 46120c9a98..7c0c0c96af 100644 --- a/kleopatra/commands/exportopenpgpcertstoservercommand.cpp +++ b/kleopatra/commands/exportopenpgpcertstoservercommand.cpp @@ -140,7 +140,7 @@ QString ExportOpenPGPCertsToServerCommand::crashExitMessage(const QStringList &a return xi18nc("@info", "The GPG process that tried to export OpenPGP certificates " "ended prematurely because of an unexpected error." - "Please check the output of %1 for details.", args.join(QLatin1String(" "))) ; + "Please check the output of %1 for details.", args.join(QStringLiteral(" "))) ; } QString ExportOpenPGPCertsToServerCommand::errorExitMessage(const QStringList &args) const diff --git a/kleopatra/commands/exportsecretkeycommand.cpp b/kleopatra/commands/exportsecretkeycommand.cpp index 8a20d025c3..0f0d6176a8 100644 --- a/kleopatra/commands/exportsecretkeycommand.cpp +++ b/kleopatra/commands/exportsecretkeycommand.cpp @@ -147,7 +147,7 @@ QString ExportSecretKeyCommand::crashExitMessage(const QStringList &args) const return xi18nc("@info", "The GPG or GpgSM process that tried to export the secret key " "ended prematurely because of an unexpected error." - "Please check the output of %1 for details.", args.join(QLatin1String(" "))) ; + "Please check the output of %1 for details.", args.join(QStringLiteral(" "))) ; } QString ExportSecretKeyCommand::errorExitMessage(const QStringList &args) const diff --git a/kleopatra/commands/gnupgprocesscommand.cpp b/kleopatra/commands/gnupgprocesscommand.cpp index 734b245d89..dabf42f1ef 100644 --- a/kleopatra/commands/gnupgprocesscommand.cpp +++ b/kleopatra/commands/gnupgprocesscommand.cpp @@ -278,7 +278,7 @@ void GnuPGProcessCommand::doStart() d->finished(); } else { d->ensureDialogVisible(); - d->message(i18n("Starting %1...", d->arguments.join(QLatin1String(" ")))); + d->message(i18n("Starting %1...", d->arguments.join(QStringLiteral(" ")))); } } diff --git a/kleopatra/commands/importcertificatescommand.cpp b/kleopatra/commands/importcertificatescommand.cpp index b3d1cae9c2..380943b9f1 100644 --- a/kleopatra/commands/importcertificatescommand.cpp +++ b/kleopatra/commands/importcertificatescommand.cpp @@ -198,7 +198,7 @@ ImportCertificatesCommand::~ImportCertificatesCommand() {} static QString format_ids(const QStringList &ids) { - return kdtools::transform_if(ids, Qt::escape, !boost::bind(&QString::isEmpty, _1)).join(QLatin1String("
")); + return kdtools::transform_if(ids, Qt::escape, !boost::bind(&QString::isEmpty, _1)).join(QStringLiteral("
")); } static QString make_tooltip(const QStringList &ids) diff --git a/kleopatra/commands/refreshx509certscommand.cpp b/kleopatra/commands/refreshx509certscommand.cpp index dff2cd4a62..d0d91bd57a 100644 --- a/kleopatra/commands/refreshx509certscommand.cpp +++ b/kleopatra/commands/refreshx509certscommand.cpp @@ -100,7 +100,7 @@ QString RefreshX509CertsCommand::errorExitMessage(const QStringList &args) const return xi18nc("@info", "An error occurred while trying to refresh X.509 certificates." "The output from %1 was: %2", - args[0], errorString().replace(QLatin1String("\n"), QStringLiteral("
"))); + args[0], errorString().replace(QStringLiteral("\n"), QStringLiteral("
"))); } QString RefreshX509CertsCommand::successMessage(const QStringList &) const diff --git a/kleopatra/crypto/decryptverifyfilescontroller.cpp b/kleopatra/crypto/decryptverifyfilescontroller.cpp index 14bdcfd9f0..2661ee1184 100644 --- a/kleopatra/crypto/decryptverifyfilescontroller.cpp +++ b/kleopatra/crypto/decryptverifyfilescontroller.cpp @@ -293,7 +293,7 @@ shared_ptr pick_archive_definition(GpgME::Protocol proto, con return shared_ptr(); } - if (extension.endsWith(QLatin1String(".out"))) { // added by outputFileName() -> remove + if (extension.endsWith(QStringLiteral(".out"))) { // added by outputFileName() -> remove extension.chop(4); } diff --git a/kleopatra/crypto/gui/newsignencryptfileswizard.cpp b/kleopatra/crypto/gui/newsignencryptfileswizard.cpp index 98bddbf2a7..1511a6e01d 100644 --- a/kleopatra/crypto/gui/newsignencryptfileswizard.cpp +++ b/kleopatra/crypto/gui/newsignencryptfileswizard.cpp @@ -816,7 +816,7 @@ public: i18nc("@title:window", "Encrypt-To-Self Warning"), KStandardGuiItem::cont(), KStandardGuiItem::cancel(), - QLatin1String("warn-encrypt-to-non-self"), KMessageBox::Notify | KMessageBox::Dangerous) + QStringLiteral("warn-encrypt-to-non-self"), KMessageBox::Notify | KMessageBox::Dangerous) == KMessageBox::Cancel) { return false; } else if (isRemoveUnencryptedFilesEnabled()) @@ -827,7 +827,7 @@ public: i18nc("@title:window", "Encrypt-To-Self Warning"), KStandardGuiItem::cont(), KStandardGuiItem::cancel(), - QLatin1String("warn-encrypt-to-non-self-destructive"), KMessageBox::Notify | KMessageBox::Dangerous) + QStringLiteral("warn-encrypt-to-non-self-destructive"), KMessageBox::Notify | KMessageBox::Dangerous) == KMessageBox::Cancel) { return false; } @@ -1141,7 +1141,7 @@ void NewSignEncryptFilesWizard::setCreateArchivePreset(bool preset) return; } d->createArchivePreset = preset; - setField(QLatin1String("archive"), preset); + setField(QStringLiteral("archive"), preset); d->updateStartId(); } @@ -1151,7 +1151,7 @@ void NewSignEncryptFilesWizard::setCreateArchiveUserMutable(bool mut) return; } d->createArchiveUserMutable = mut; - setField(QLatin1String("archive-user-mutable"), mut); + setField(QStringLiteral("archive-user-mutable"), mut); d->updateStartId(); } @@ -1166,7 +1166,7 @@ void NewSignEncryptFilesWizard::setSigningPreset(bool preset) return; } d->signingPreset = preset; - setField(QLatin1String("signing-preset"), preset); + setField(QStringLiteral("signing-preset"), preset); d->updateStartId(); } @@ -1176,7 +1176,7 @@ void NewSignEncryptFilesWizard::setSigningUserMutable(bool mut) return; } d->signingUserMutable = mut; - setField(QLatin1String("signing-user-mutable"), mut); + setField(QStringLiteral("signing-user-mutable"), mut); d->updateStartId(); } @@ -1186,7 +1186,7 @@ void NewSignEncryptFilesWizard::setEncryptionPreset(bool preset) return; } d->encryptionPreset = preset; - setField(QLatin1String("encryption-preset"), preset); + setField(QStringLiteral("encryption-preset"), preset); d->updateStartId(); } @@ -1196,38 +1196,38 @@ void NewSignEncryptFilesWizard::setEncryptionUserMutable(bool mut) return; } d->encryptionUserMutable = mut; - setField(QLatin1String("encryption-user-mutable"), mut); + setField(QStringLiteral("encryption-user-mutable"), mut); d->updateStartId(); } void NewSignEncryptFilesWizard::setFiles(const QStringList &files) { - setField(QLatin1String("files"), files); + setField(QStringLiteral("files"), files); } bool NewSignEncryptFilesWizard::isSigningSelected() const { - return field(QLatin1String("sign")).toBool() || field(QLatin1String("signencrypt")).toBool() ; + return field(QStringLiteral("sign")).toBool() || field(QStringLiteral("signencrypt")).toBool() ; } bool NewSignEncryptFilesWizard::isEncryptionSelected() const { - return field(QLatin1String("encrypt")).toBool() || field(QLatin1String("signencrypt")).toBool() ; + return field(QStringLiteral("encrypt")).toBool() || field(QStringLiteral("signencrypt")).toBool() ; } bool NewSignEncryptFilesWizard::isAsciiArmorEnabled() const { - return field(QLatin1String("armor")).toBool(); + return field(QStringLiteral("armor")).toBool(); } bool NewSignEncryptFilesWizard::isRemoveUnencryptedFilesEnabled() const { - return isEncryptionSelected() && field(QLatin1String("remove")).toBool(); + return isEncryptionSelected() && field(QStringLiteral("remove")).toBool(); } bool NewSignEncryptFilesWizard::isCreateArchiveSelected() const { - return field(QLatin1String("archive")).toBool(); + return field(QStringLiteral("archive")).toBool(); } shared_ptr NewSignEncryptFilesWizard::selectedArchiveDefinition() const diff --git a/kleopatra/crypto/gui/resolverecipientspage.cpp b/kleopatra/crypto/gui/resolverecipientspage.cpp index 00e792696f..e06f72449a 100644 --- a/kleopatra/crypto/gui/resolverecipientspage.cpp +++ b/kleopatra/crypto/gui/resolverecipientspage.cpp @@ -623,7 +623,7 @@ static QString listKeysForInfo(const std::vector &keys) { QStringList list; std::transform(keys.begin(), keys.end(), list.begin(), &Formatting::formatKeyLink); - return list.join(QLatin1String("
")); + return list.join(QStringLiteral("
")); } void ResolveRecipientsPage::setAdditionalRecipientsInfo(const std::vector &recipients) diff --git a/kleopatra/crypto/signemailtask.cpp b/kleopatra/crypto/signemailtask.cpp index c6f016e35f..ac009b9209 100644 --- a/kleopatra/crypto/signemailtask.cpp +++ b/kleopatra/crypto/signemailtask.cpp @@ -251,11 +251,11 @@ static QString collect_micalgs(const GpgME::SigningResult &result, GpgME::Protoc #endif if (proto == GpgME::OpenPGP) for (QStringList::iterator it = micalgs.begin(), end = micalgs.end() ; it != end ; ++it) { - it->prepend(QLatin1String("pgp-")); + it->prepend(QStringLiteral("pgp-")); } micalgs.sort(); micalgs.erase(std::unique(micalgs.begin(), micalgs.end()), micalgs.end()); - return micalgs.join(QLatin1String(",")); + return micalgs.join(QStringLiteral(",")); } void SignEMailTask::Private::slotResult(const SigningResult &result) diff --git a/kleopatra/dialogs/adduseriddialog.cpp b/kleopatra/dialogs/adduseriddialog.cpp index c3b85c026f..34f1feb47c 100644 --- a/kleopatra/dialogs/adduseriddialog.cpp +++ b/kleopatra/dialogs/adduseriddialog.cpp @@ -354,7 +354,7 @@ void AddUserIDDialog::Private::slotUserIDChanged() parts.push_back(QLatin1Char('<') + email + QLatin1Char('>')); } - ui.resultLB->setText(parts.join(QLatin1String(" "))); + ui.resultLB->setText(parts.join(QStringLiteral(" "))); } #include "moc_adduseriddialog.cpp" diff --git a/kleopatra/kgpgconf/configreader.cpp b/kleopatra/kgpgconf/configreader.cpp index e531d623d7..83e000ee55 100644 --- a/kleopatra/kgpgconf/configreader.cpp +++ b/kleopatra/kgpgconf/configreader.cpp @@ -200,7 +200,7 @@ void ConfigReader::Private::readEntriesForComponent(ConfigComponent *component) } else { // normal entry if (!currentGroup.get()) { // first toplevel entry -> create toplevel group - currentGroup.reset(new ConfigGroup(QLatin1String(""))); + currentGroup.reset(new ConfigGroup(QStringLiteral(""))); } currentGroup->addEntry(createEntryFromParsedLine(lst)); } diff --git a/kleopatra/kgpgconf/configuration.cpp b/kleopatra/kgpgconf/configuration.cpp index 392cf38fa9..1678f27fd8 100644 --- a/kleopatra/kgpgconf/configuration.cpp +++ b/kleopatra/kgpgconf/configuration.cpp @@ -672,6 +672,6 @@ QString ConfigEntry::toString(ConfigEntry::EscapeMode mode) const for (QList::const_iterator it = lst.constBegin(); it != end; ++it) { ret << (*it).toString(); // QVariant does the conversion } - return ret.join(QLatin1String(",")); + return ret.join(QStringLiteral(",")); } diff --git a/kleopatra/kwatchgnupg/kwatchgnupgmainwin.cpp b/kleopatra/kwatchgnupg/kwatchgnupgmainwin.cpp index 686a20d6fd..b3c8a40dee 100644 --- a/kleopatra/kwatchgnupg/kwatchgnupgmainwin.cpp +++ b/kleopatra/kwatchgnupg/kwatchgnupgmainwin.cpp @@ -172,14 +172,14 @@ void KWatchGnuPGMainWindow::setGnuPGConfig() Kleo::CryptoConfigComponent *comp = cconfig->component(*it); Q_ASSERT(comp); // Look for log-file entry in Debug group - Kleo::CryptoConfigGroup *group = comp->group(QLatin1String("Debug")); + Kleo::CryptoConfigGroup *group = comp->group(QStringLiteral("Debug")); if (group) { - Kleo::CryptoConfigEntry *entry = group->entry(QLatin1String("log-file")); + Kleo::CryptoConfigEntry *entry = group->entry(QStringLiteral("log-file")); if (entry) { entry->setStringValue(QString::fromLatin1("socket://") + config.readEntry("Socket", WATCHGNUPGSOCKET)); logclients << QString::fromLatin1("%1 (%2)").arg(*it).arg(comp->description()); } - entry = group->entry(QLatin1String("debug-level")); + entry = group->entry(QStringLiteral("debug-level")); if (entry) { entry->setStringValue(config.readEntry("LogLevel", "basic")); } diff --git a/kleopatra/libkleopatraclient/gui/certificaterequester.cpp b/kleopatra/libkleopatraclient/gui/certificaterequester.cpp index 11b0ba808f..1a07a4f872 100644 --- a/kleopatra/libkleopatraclient/gui/certificaterequester.cpp +++ b/kleopatra/libkleopatraclient/gui/certificaterequester.cpp @@ -58,7 +58,7 @@ public: private: void updateLineEdit() { - ui.lineEdit.setText(selectedCertificates.join(QLatin1String(" "))); + ui.lineEdit.setText(selectedCertificates.join(QStringLiteral(" "))); } void createCommand() { diff --git a/kleopatra/mainwindow_desktop.cpp b/kleopatra/mainwindow_desktop.cpp index 736ac51c17..0a3418d809 100644 --- a/kleopatra/mainwindow_desktop.cpp +++ b/kleopatra/mainwindow_desktop.cpp @@ -213,7 +213,7 @@ public: void gnupgLogViewer() { - if (!QProcess::startDetached(QLatin1String("kwatchgnupg"))) + if (!QProcess::startDetached(QStringLiteral("kwatchgnupg"))) KMessageBox::error(q, i18n("Could not start the GnuPG Log Viewer (kwatchgnupg). " "Please check your installation."), i18n("Error Starting KWatchGnuPG")); @@ -221,7 +221,7 @@ public: void gnupgAdministrativeConsole() { - if (!QProcess::startDetached(QLatin1String("kgpgconf"))) + if (!QProcess::startDetached(QStringLiteral("kgpgconf"))) KMessageBox::error(q, i18n("Could not start the GnuPG Administrative Console (kgpgconf). " "Please check your installation."), i18n("Error Starting KGpgConf")); @@ -230,7 +230,7 @@ public: void slotConfigCommitted(); void slotContextMenuRequested(QAbstractItemView *, const QPoint &p) { - if (QMenu *const menu = qobject_cast(q->factory()->container(QLatin1String("listview_popup"), q))) { + if (QMenu *const menu = qobject_cast(q->factory()->container(QStringLiteral("listview_popup"), q))) { menu->exec(p); } else { qCDebug(KLEOPATRA_LOG) << "no \"listview_popup\" in kleopatra's ui.rc file"; diff --git a/kleopatra/mainwindow_mobile.cpp b/kleopatra/mainwindow_mobile.cpp index 8b4598c017..ac01436866 100644 --- a/kleopatra/mainwindow_mobile.cpp +++ b/kleopatra/mainwindow_mobile.cpp @@ -202,7 +202,7 @@ public: void gnupgLogViewer() { - if (!QProcess::startDetached(QLatin1String("kwatchgnupg"))) + if (!QProcess::startDetached(QStringLiteral("kwatchgnupg"))) KMessageBox::error(q, i18n("Could not start the GnuPG Log Viewer (kwatchgnupg). " "Please check your installation."), i18n("Error Starting KWatchGnuPG")); @@ -210,7 +210,7 @@ public: void gnupgAdministrativeConsole() { - if (!QProcess::startDetached(QLatin1String("kgpgconf"))) + if (!QProcess::startDetached(QStringLiteral("kgpgconf"))) KMessageBox::error(q, i18n("Could not start the GnuPG Administrative Console (kgpgconf). " "Please check your installation."), i18n("Error Starting KGpgConf")); diff --git a/kleopatra/models/keylistmodel.cpp b/kleopatra/models/keylistmodel.cpp index b678c6e564..2809c30c02 100644 --- a/kleopatra/models/keylistmodel.cpp +++ b/kleopatra/models/keylistmodel.cpp @@ -343,7 +343,7 @@ QVariant AbstractKeyListModel::data(const QModelIndex &index, int role) const else if (role == Qt::ToolTipRole) { return Formatting::toolTip(key, toolTipOptions()); } else if (role == Qt::FontRole) { - return KeyFilterManager::instance()->font(key, (column == ShortKeyID) ? QFont(QLatin1String("courier")) : QFont()); + return KeyFilterManager::instance()->font(key, (column == ShortKeyID) ? QFont(QStringLiteral("courier")) : QFont()); } #endif else if (role == Qt::DecorationRole) { diff --git a/kleopatra/newcertificatewizard/newcertificatewizard.cpp b/kleopatra/newcertificatewizard/newcertificatewizard.cpp index 4855f52572..3deb06e1de 100644 --- a/kleopatra/newcertificatewizard/newcertificatewizard.cpp +++ b/kleopatra/newcertificatewizard/newcertificatewizard.cpp @@ -521,7 +521,7 @@ public: ui() { ui.setupUi(this); - registerField(QLatin1String("pgp"), ui.pgpCLB); + registerField(QStringLiteral("pgp"), ui.pgpCLB); } void setProtocol(Protocol proto) @@ -591,10 +591,10 @@ public: connect(ui.addEmailToDnCB, SIGNAL(toggled(bool)), SLOT(slotUpdateResultLabel())); registerDialogPropertiesAsFields(); - registerField(QLatin1String("dn"), ui.resultLE); - registerField(QLatin1String("name"), ui.nameLE); - registerField(QLatin1String("email"), ui.emailLE); - registerField(QLatin1String("comment"), ui.commentLE); + registerField(QStringLiteral("dn"), ui.resultLE); + registerField(QStringLiteral("name"), ui.nameLE); + registerField(QStringLiteral("email"), ui.emailLE); + registerField(QStringLiteral("comment"), ui.commentLE); updateForm(); } @@ -717,7 +717,7 @@ private Q_SLOTS: { Q_UNUSED(auditLog); if (result.error().code()) { - setField(QLatin1String("error"), result.error().isCanceled() + setField(QStringLiteral("error"), result.error().isCanceled() ? i18n("Operation canceled.") : i18n("Could not create certificate: %1", QString::fromLocal8Bit(result.error().asString()))); @@ -767,13 +767,13 @@ public: { ui.setupUi(this); ui.dragQueen->setPixmap(QIcon::fromTheme(QStringLiteral("kleopatra")).pixmap(64, 64)); - registerField(QLatin1String("error"), ui.errorTB, "plainText"); - registerField(QLatin1String("result"), ui.resultTB, "plainText"); - registerField(QLatin1String("url"), ui.dragQueen, "url"); + registerField(QStringLiteral("error"), ui.errorTB, "plainText"); + registerField(QStringLiteral("result"), ui.resultTB, "plainText"); + registerField(QStringLiteral("url"), ui.dragQueen, "url"); // hidden field, since QWizard can't deal with non-widget-backed fields... QLineEdit *le = new QLineEdit(this); le->hide(); - registerField(QLatin1String("fingerprint"), le); + registerField(QStringLiteral("fingerprint"), le); } /* reimp */ void initializePage() diff --git a/kleopatra/tests/test_keylistmodels.cpp b/kleopatra/tests/test_keylistmodels.cpp index 23ac207e98..02cc470b31 100644 --- a/kleopatra/tests/test_keylistmodels.cpp +++ b/kleopatra/tests/test_keylistmodels.cpp @@ -137,8 +137,8 @@ int main(int argc, char *argv[]) hierarchicalLay.addWidget(&hierarchicalLE); hierarchicalLay.addWidget(&hierarchical); - flatWidget.setWindowTitle(QLatin1String("Flat Key Listing")); - hierarchicalWidget.setWindowTitle(QLatin1String("Hierarchical Key Listing")); + flatWidget.setWindowTitle(QStringLiteral("Flat Key Listing")); + hierarchicalWidget.setWindowTitle(QStringLiteral("Hierarchical Key Listing")); Kleo::KeyListSortFilterProxyModel flatProxy, hierarchicalProxy; diff --git a/kleopatra/uiserver/uiserver.cpp b/kleopatra/uiserver/uiserver.cpp index 4bf1dd7ba8..a885bfc614 100644 --- a/kleopatra/uiserver/uiserver.cpp +++ b/kleopatra/uiserver/uiserver.cpp @@ -257,7 +257,7 @@ QString UiServer::Private::makeFileName(const QString &socket) const ensureDirectoryExists(gnupgHome); const QDir dir(gnupgHome); assert(dir.exists()); - return dir.absoluteFilePath(QLatin1String("S.uiserver")); + return dir.absoluteFilePath(QStringLiteral("S.uiserver")); } void UiServer::Private::ensureDirectoryExists(const QString &path) const diff --git a/kleopatra/utils/filesystemwatcher.cpp b/kleopatra/utils/filesystemwatcher.cpp index d922bb1581..9e22261a08 100644 --- a/kleopatra/utils/filesystemwatcher.cpp +++ b/kleopatra/utils/filesystemwatcher.cpp @@ -308,7 +308,7 @@ void FileSystemWatcher::addPaths(const QStringList &paths) } const QStringList newPaths = paths + resolve(paths, d->m_blacklist, d->m_whitelist); if (!newPaths.empty()) { - qCDebug(KLEOPATRA_LOG) << "adding\n " << newPaths.join(QLatin1String("\n ")) << "\n/end"; + qCDebug(KLEOPATRA_LOG) << "adding\n " << newPaths.join(QStringLiteral("\n ")) << "\n/end"; } d->m_paths += newPaths; d->m_seenPaths.insert(newPaths.begin(), newPaths.end()); diff --git a/kleopatra/utils/input.cpp b/kleopatra/utils/input.cpp index bc861e85b3..f344ff7430 100644 --- a/kleopatra/utils/input.cpp +++ b/kleopatra/utils/input.cpp @@ -369,7 +369,7 @@ QString ProcessStdOutInput::label() const return InputImplBase::label(); } // output max. 3 arguments - const QString cmdline = (QStringList(m_command) + m_arguments.mid(0, 3)).join(QLatin1String(" ")); + const QString cmdline = (QStringList(m_command) + m_arguments.mid(0, 3)).join(QStringLiteral(" ")); if (m_arguments.size() > 3) { return i18nc("e.g. \"Output of tar xf - file1 ...\"", "Output of %1 ...", cmdline); } else { diff --git a/kleopatra/utils/kdlogtextwidget.cpp b/kleopatra/utils/kdlogtextwidget.cpp index cef2d02f0f..421db52dc9 100644 --- a/kleopatra/utils/kdlogtextwidget.cpp +++ b/kleopatra/utils/kdlogtextwidget.cpp @@ -193,7 +193,7 @@ unsigned int KDLogTextWidget::historySize() const */ QString KDLogTextWidget::text() const { - return lines().join(QLatin1String("\n")); + return lines().join(QStringLiteral("\n")); } /*! diff --git a/kleopatra/utils/output.cpp b/kleopatra/utils/output.cpp index 8a45b0e50c..62d364deb7 100644 --- a/kleopatra/utils/output.cpp +++ b/kleopatra/utils/output.cpp @@ -565,7 +565,7 @@ QString ProcessStdInOutput::label() const return OutputImplBase::label(); } // output max. 3 arguments - const QString cmdline = (QStringList(m_command) + m_arguments.mid(0, 3)).join(QLatin1String(" ")); + const QString cmdline = (QStringList(m_command) + m_arguments.mid(0, 3)).join(QStringLiteral(" ")); if (m_arguments.size() > 3) { return i18nc("e.g. \"Input to tar xf - file1 ...\"", "Input to %1 ...", cmdline); } else { diff --git a/kleopatra/utils/validation.cpp b/kleopatra/utils/validation.cpp index dd37b2e2c9..560100c2b6 100644 --- a/kleopatra/utils/validation.cpp +++ b/kleopatra/utils/validation.cpp @@ -88,11 +88,11 @@ public: const QString domainRestored = QUrl::fromAce(domainEncoded); QString encoded = str.left(atIdx) + QLatin1Char('@') + QString::fromLatin1(domainEncoded); if (needsDotOrgAdded) { - assert(encoded.endsWith(QLatin1String("tmp.org"))); + assert(encoded.endsWith(QStringLiteral("tmp.org"))); encoded.chop(7); } if (needsOrgAdded) { - assert(encoded.endsWith(QLatin1String(".org"))); + assert(encoded.endsWith(QStringLiteral(".org"))); encoded.chop(3); // '.' was part of domain before } qCDebug(KLEOPATRA_LOG) << "\n str :" << str -- 2.11.4.GIT