Git commit 4ac30cdea93e2b4898bcaca401a3b13bfc0038da by Montel Laurent. Committed on 31/05/2017 at 20:48. Pushed by mlaurent into branch 'master'. Fix some clazy warning M +3 -3 akonadi-import-wizard/opera/operaimportdata.cpp M +1 -1 akonadi-import-wizard/opera/operasettings.cpp M +4 -4 examples/apps/coisceim/createfoldercontentswidget.cpp M +3 -3 examples/apps/coisceim/createtripwidget.cpp M +1 -1 examples/apps/coisceim/main.cpp M +1 -1 examples/apps/coisceim/mixedtreemodel.cpp M +1 -1 examples/apps/coisceim/note.cpp M +1 -1 examples/apps/coisceim/tripmodel.cpp M +3 -3 examples/apps/coisceim/tripwidget.cpp M +1 -1 examples/apps/etm_usage/checkable2.cpp M +2 -2 examples/apps/etm_usage/entityfindingwidget.cpp M +1 -1 examples/apps/etm_usage/entitytreewidget.cpp M +2 -2 examples/apps/etm_usage/mailmodel.cpp M +5 -5 examples/apps/etm_usage/main.cpp M +15 -15 examples/apps/etm_usage/mainwindow.cpp M +1 -1 examples/apps/etm_usage/mixedtreemodel.cpp M +1 -1 examples/apps/etm_usage/tab6widget.cpp M +1 -1 examples/apps/etm_usage/tab7widget.cpp M +1 -1 examples/apps/etm_usage/unreadmailsincollectionswidget.cpp M +1 -1 examples/apps/kabc/kabceditor.cpp M +4 -4 examples/apps/kabc/kabcviewer.cpp M +7 -7 examples/apps/mailreader/mailreader.cpp M +1 -1 examples/apps/mailreader/mailreaderview.cpp M +1 -1 examples/apps/mailreader/main.cpp M +2 -2 kaddressbook/importexportplugins/csv/import/csvimportdialog.= cpp M +2 -2 kaddressbook/importexportplugins/gmx/gmximportexportpluginin= terface.cpp M +1 -1 kaddressbook/importexportplugins/ldif/ldifimportexportplugin= interface.cpp M +2 -2 kaddressbook/importexportplugins/vcards/vcardimportexportplu= gininterface.cpp M +3 -3 kaddressbook/plugins/sendmail/autotests/mailsenderjobtest.cpp M +5 -5 kaddressbook/plugins/sendvcards/sendvcardsjob.cpp M +2 -2 kmail/plugins/common/antispamwizard.cpp M +1 -1 korganizer/plugins/hebrew/hebrew.cpp M +2 -2 korganizer/plugins/picoftheday/picoftheday.cpp M +1 -1 plugins/customtoolsplugins/shorturlplugin/shorturl/shorturle= ngineplugin/shorturlengineinterface.cpp M +3 -3 plugins/messageviewer/bodypartformatter/autotests/diffhighli= ghtertest.cpp M +5 -5 plugins/messageviewer/bodypartformatter/autotests/rendertest= .cpp M +2 -2 plugins/messageviewer/bodypartformatter/calendar/text_calend= ar.cpp M +14 -14 plugins/messageviewer/bodypartformatter/vcard/text_vcard.cpp M +1 -1 plugins/messageviewer/bodypartformatter/xdiff/diffhighlighte= r.cpp M +6 -6 plugins/messageviewerheaderplugins/briefheaderstyleplugin/br= iefheaderstyle.cpp M +45 -45 plugins/messageviewerheaderplugins/enterpriseheaderstyleplug= in/enterpriseheaderstyle.cpp M +6 -6 plugins/messageviewerheaderplugins/fancyheaderstyleplugin/fa= ncyheaderstyle.cpp M +4 -4 plugins/messageviewerplugins/createeventplugin/createeventjo= b.cpp M +3 -3 plugins/messageviewerplugins/createnoteplugin/createnotejob.= cpp M +1 -1 plugins/messageviewerplugins/externalscriptplugin/autotests/= viewerpluginexternalscriptsloadjobtest.cpp M +1 -1 plugins/messageviewerplugins/externalscriptplugin/viewerplug= inexternalscriptinterface.cpp M +7 -7 plugins/messageviewerplugins/externalscriptplugin/viewerplug= inexternalscriptparseargument.cpp M +2 -2 plugins/webengineurlinterceptor/adblock/lib/adblockblockable= itemsjob.cpp M +4 -4 plugins/webengineurlinterceptor/adblock/lib/widgets/adblockc= reatefilterdialog.cpp M +1 -1 sieveeditor/imapfoldercompletion/selectimapfoldertreeview.cpp M +1 -1 sieveeditor/imapfoldercompletion/selectimapfoldertreeview.h https://commits.kde.org/kdepim-addons/4ac30cdea93e2b4898bcaca401a3b13bfc003= 8da diff --git a/akonadi-import-wizard/opera/operaimportdata.cpp b/akonadi-impo= rt-wizard/opera/operaimportdata.cpp index 12b80de6..be5aa109 100644 --- a/akonadi-import-wizard/opera/operaimportdata.cpp +++ b/akonadi-import-wizard/opera/operaimportdata.cpp @@ -59,7 +59,7 @@ bool OperaImportData::importMails() MailImporter::FilterOpera opera; initializeFilter(opera); opera.filterInfo()->setStatusMessage(i18n("Import in progress")); - const QString mailPath(mPath + QLatin1String("mail/store/")); + const QString mailPath(mPath + QStringLiteral("mail/store/")); QDir directory(mailPath); if (directory.exists()) { opera.importMails(mailPath); @@ -72,7 +72,7 @@ bool OperaImportData::importMails() = bool OperaImportData::importAddressBook() { - const QString addressbookFile(mPath + QLatin1String("bookmarks.adr")); + const QString addressbookFile(mPath + QStringLiteral("bookmarks.adr")); OperaAddressBook addressbook(addressbookFile); addressbook.setAbstractDisplayInfo(mAbstractDisplayInfo); addressbook.importAddressBook(); @@ -81,7 +81,7 @@ bool OperaImportData::importAddressBook() = bool OperaImportData::importSettings() { - const QString settingFile(mPath + QLatin1String("mail/accounts.ini")); + const QString settingFile(mPath + QStringLiteral("mail/accounts.ini")); OperaSettings settings(settingFile); settings.setAbstractDisplayInfo(mAbstractDisplayInfo); settings.importSettings(); diff --git a/akonadi-import-wizard/opera/operasettings.cpp b/akonadi-import= -wizard/opera/operasettings.cpp index bc524234..9958c87d 100644 --- a/akonadi-import-wizard/opera/operasettings.cpp +++ b/akonadi-import-wizard/opera/operasettings.cpp @@ -256,7 +256,7 @@ void OperaSettings::readIdentity(const KConfigGroup &gr= p) KIdentityManagement::Signature signature; const int signatureHtml =3D grp.readEntry(QStringLiteral("Signatur= e is HTML"), -1); if (signatureFile.contains(QStringLiteral("{Preferences}"))) { - signatureFile.replace(QStringLiteral("{Preferences}"), MailImp= orter::FilterOpera::defaultSettingsPath() + QLatin1String("/")); + signatureFile.replace(QStringLiteral("{Preferences}"), MailImp= orter::FilterOpera::defaultSettingsPath() + QStringLiteral("/")); } = QFile file(signatureFile); diff --git a/examples/apps/coisceim/createfoldercontentswidget.cpp b/exampl= es/apps/coisceim/createfoldercontentswidget.cpp index 7fac716f..e8ee40a9 100644 --- a/examples/apps/coisceim/createfoldercontentswidget.cpp +++ b/examples/apps/coisceim/createfoldercontentswidget.cpp @@ -31,19 +31,19 @@ CreateFolderContentsWidget::CreateFolderContentsWidget(= Trip *trip, int role, con , m_trip(trip) , m_role(role) { - QPushButton *button =3D new QPushButton(QLatin1String("Select ") + typ= e); + QPushButton *button =3D new QPushButton(QStringLiteral("Select ") + ty= pe); = QString iconName; = switch (role) { case Trip::MailCollectionRole: - iconName =3D QLatin1String("kmail"); + iconName =3D QStringLiteral("kmail"); break; case Trip::NotesCollectionRole: - iconName =3D QLatin1String("knotes"); + iconName =3D QStringLiteral("knotes"); break; case Trip::TodoCollectionRole: - iconName =3D QLatin1String("korg-todo"); + iconName =3D QStringLiteral("korg-todo"); break; } QIcon icon =3D QIcon::fromTheme(iconName); diff --git a/examples/apps/coisceim/createtripwidget.cpp b/examples/apps/co= isceim/createtripwidget.cpp index f3ac4acd..ae5ea915 100644 --- a/examples/apps/coisceim/createtripwidget.cpp +++ b/examples/apps/coisceim/createtripwidget.cpp @@ -56,9 +56,9 @@ CreateTripWidget::CreateTripWidget(Trip *trip, Akonadi::M= onitor *monitor, QWidge = layout->addLayout(configureLayout); = - m_mailWidget =3D createView(QLatin1String("Mail"), Trip::MailCollectio= nRole); - m_todoWidget =3D createView(QLatin1String("Todos"), Trip::TodoCollecti= onRole); - m_notesWidget =3D createView(QLatin1String("Notes"), Trip::NotesCollec= tionRole); + m_mailWidget =3D createView(QStringLiteral("Mail"), Trip::MailCollecti= onRole); + m_todoWidget =3D createView(QStringLiteral("Todos"), Trip::TodoCollect= ionRole); + m_notesWidget =3D createView(QStringLiteral("Notes"), Trip::NotesColle= ctionRole); = configureLayout->addWidget(m_mailWidget); configureLayout->addWidget(m_todoWidget); diff --git a/examples/apps/coisceim/main.cpp b/examples/apps/coisceim/main.= cpp index 2b3f5e3c..6e78f6e4 100644 --- a/examples/apps/coisceim/main.cpp +++ b/examples/apps/coisceim/main.cpp @@ -29,7 +29,7 @@ = int main(int argc, char **argv) { - const QString ba(QLatin1String("coisceim")); + const QString ba(QStringLiteral("coisceim")); const QString name =3D i18n("Coisceim application"); KAboutData aboutData(ba, name, name); QApplication app(argc, argv); diff --git a/examples/apps/coisceim/mixedtreemodel.cpp b/examples/apps/cois= ceim/mixedtreemodel.cpp index 2859dc0f..8e1e1290 100644 --- a/examples/apps/coisceim/mixedtreemodel.cpp +++ b/examples/apps/coisceim/mixedtreemodel.cpp @@ -74,7 +74,7 @@ QVariant MixedTreeModel::entityData(const Akonadi::Item &= item, int column, int r if (item.mimeType() =3D=3D KMime::Message::mimeType()) { return message->from()->asUnicodeString(); } else { - return QString(message->mainBodyPart()->decodedText().= mid(0, 30) + QLatin1String("...")); + return QString(message->mainBodyPart()->decodedText().= mid(0, 30) + QStringLiteral("...")); } default: return QVariant(); diff --git a/examples/apps/coisceim/note.cpp b/examples/apps/coisceim/note.= cpp index 7e98cd15..e4da8187 100644 --- a/examples/apps/coisceim/note.cpp +++ b/examples/apps/coisceim/note.cpp @@ -23,5 +23,5 @@ using namespace Akonotes; = QString Note::mimeType() { - return QString::fromLatin1("text/x-vnd.akonadi.note"); + return QStringLiteral("text/x-vnd.akonadi.note"); } diff --git a/examples/apps/coisceim/tripmodel.cpp b/examples/apps/coisceim/= tripmodel.cpp index e7c5f672..1915ffa9 100644 --- a/examples/apps/coisceim/tripmodel.cpp +++ b/examples/apps/coisceim/tripmodel.cpp @@ -95,7 +95,7 @@ QVariant TripModel::data(const QModelIndex &index, int ro= le) const return QVariant::fromValue(m_createWidget); } if (role =3D=3D Qt::DecorationRole) { - return QIcon::fromTheme(QLatin1String("list-add-new")); + return QIcon::fromTheme(QStringLiteral("list-add-new")); } return QVariant(); } diff --git a/examples/apps/coisceim/tripwidget.cpp b/examples/apps/coisceim= /tripwidget.cpp index 647484eb..4c8eecef 100644 --- a/examples/apps/coisceim/tripwidget.cpp +++ b/examples/apps/coisceim/tripwidget.cpp @@ -67,9 +67,9 @@ TripWidget::TripWidget(Trip *trip, QWidget *parent) = vSplitter->addWidget(splitter); = - FolderContentsWidget *mailWidget =3D createView(QLatin1String("Mail"),= Trip::MailCollectionRole); - FolderContentsWidget *todoWidget =3D createView(QLatin1String("Todos")= , Trip::TodoCollectionRole); - FolderContentsWidget *notesWidget =3D createView(QLatin1String("Notes"= ), Trip::NotesCollectionRole); + FolderContentsWidget *mailWidget =3D createView(QStringLiteral("Mail")= , Trip::MailCollectionRole); + FolderContentsWidget *todoWidget =3D createView(QStringLiteral("Todos"= ), Trip::TodoCollectionRole); + FolderContentsWidget *notesWidget =3D createView(QStringLiteral("Notes= "), Trip::NotesCollectionRole); = ItemSelection *itemSelection =3D new ItemSelection(mailWidget->selecti= onModel(), todoWidget->selection= Model(), diff --git a/examples/apps/etm_usage/checkable2.cpp b/examples/apps/etm_usa= ge/checkable2.cpp index 6c6205ae..85e059d8 100644 --- a/examples/apps/etm_usage/checkable2.cpp +++ b/examples/apps/etm_usage/checkable2.cpp @@ -80,7 +80,7 @@ Checkable2::Checkable2(QWidget *parent, Qt::WindowFlags f) allChildrenView->setModel(selectionProxy); = Akonadi::EntityMimeTypeFilterModel *itemFilter =3D new Akonadi::Entity= MimeTypeFilterModel(this); - itemFilter->setObjectName(QLatin1String("itemFilter")); + itemFilter->setObjectName(QStringLiteral("itemFilter")); itemFilter->addMimeTypeExclusionFilter(Akonadi::Collection::mimeType()= ); itemFilter->setHeaderGroup(Akonadi::EntityTreeModel::ItemListHeaders); itemFilter->setSourceModel(selectionProxy); diff --git a/examples/apps/etm_usage/entityfindingwidget.cpp b/examples/app= s/etm_usage/entityfindingwidget.cpp index e088ad84..88f53208 100644 --- a/examples/apps/etm_usage/entityfindingwidget.cpp +++ b/examples/apps/etm_usage/entityfindingwidget.cpp @@ -56,8 +56,8 @@ EntityFindingWidget::EntityFindingWidget(QWidget *parent,= Qt::WindowFlags f) { QGridLayout *gridLayout =3D new QGridLayout(this); = - QLabel *collectionIdLabel =3D new QLabel(QLatin1String("Collection Id = :")); - QLabel *itemIdLabel =3D new QLabel(QLatin1String("Item Id :")); + QLabel *collectionIdLabel =3D new QLabel(QStringLiteral("Collection Id= :")); + QLabel *itemIdLabel =3D new QLabel(QStringLiteral("Item Id :")); = m_collectionIdInput =3D new QLineEdit; m_itemIdInput =3D new QLineEdit; diff --git a/examples/apps/etm_usage/entitytreewidget.cpp b/examples/apps/e= tm_usage/entitytreewidget.cpp index 882fd256..5986bb52 100644 --- a/examples/apps/etm_usage/entitytreewidget.cpp +++ b/examples/apps/etm_usage/entitytreewidget.cpp @@ -89,7 +89,7 @@ void EntityTreeWidget::mimeTypesChoiceChanged(int index) = void EntityTreeWidget::mimeTypesChanged(const QString &mimetypeList) { - const QStringList list =3D mimetypeList.isEmpty() ? QStringList() : mi= metypeList.split(QLatin1String(",")); + const QStringList list =3D mimetypeList.isEmpty() ? QStringList() : mi= metypeList.split(QStringLiteral(",")); = foreach (const QString mimetype, m_monitor->mimeTypesMonitored()) { if (!list.contains(mimetype)) { diff --git a/examples/apps/etm_usage/mailmodel.cpp b/examples/apps/etm_usag= e/mailmodel.cpp index be8faf94..0803d52c 100644 --- a/examples/apps/etm_usage/mailmodel.cpp +++ b/examples/apps/etm_usage/mailmodel.cpp @@ -35,8 +35,8 @@ public: MailModelPrivate(MailModel *model) : q_ptr(model) { - m_collectionHeaders << QLatin1String("Folder") << QLatin1String("C= ount"); - m_itemHeaders << QLatin1String("Subject") << QLatin1String("From")= << QLatin1String("Date"); + m_collectionHeaders << QStringLiteral("Folder") << QStringLiteral(= "Count"); + m_itemHeaders << QStringLiteral("Subject") << QStringLiteral("From= ") << QStringLiteral("Date"); } = Q_DECLARE_PUBLIC(MailModel) diff --git a/examples/apps/etm_usage/main.cpp b/examples/apps/etm_usage/mai= n.cpp index 75895a0d..790a41fd 100644 --- a/examples/apps/etm_usage/main.cpp +++ b/examples/apps/etm_usage/main.cpp @@ -29,14 +29,14 @@ = int main(int argc, char *argv[]) { - KAboutData aboutData(QLatin1String("etm_usage"), + KAboutData aboutData(QStringLiteral("etm_usage"), i18n("ETM Test application"), - QLatin1String("0.99"), + QStringLiteral("0.99"), i18n("Test app for EntityTreeModel"), KAboutLicense::GPL, - QLatin1String("http://pim.kde.org/akonadi/")); - QApplication::setWindowIcon(QIcon::fromTheme(QLatin1String("akonadi"))= ); - aboutData.addAuthor(i18n("Stephen Kelly"), i18n("Author"), QLatin1Stri= ng("steveire@gmail.com")); + QStringLiteral("http://pim.kde.org/akonadi/")); + QApplication::setWindowIcon(QIcon::fromTheme(QStringLiteral("akonadi")= )); + aboutData.addAuthor(i18n("Stephen Kelly"), i18n("Author"), QStringLite= ral("steveire@gmail.com")); = QApplication app(argc, argv); QCommandLineParser parser; diff --git a/examples/apps/etm_usage/mainwindow.cpp b/examples/apps/etm_usa= ge/mainwindow.cpp index 633b9216..191b5015 100644 --- a/examples/apps/etm_usage/mainwindow.cpp +++ b/examples/apps/etm_usage/mainwindow.cpp @@ -48,21 +48,21 @@ MainWindow::MainWindow(QWidget *parent, Qt::WindowFlags= flags) = Akonadi::Control::start(); = - tabWidget->addTab(new Checkable2(tabWidget), QLatin1String("Checkable2= ")); - tabWidget->addTab(new DescTabWidget(tabWidget), QLatin1String("Desc")); - tabWidget->addTab(new Tab1Widget(tabWidget), QLatin1String("EntityTree= Model")); - tabWidget->addTab(new Tab2Widget(tabWidget), QLatin1String("setRootInd= ex")); - tabWidget->addTab(new Tab2_5Widget(tabWidget), QLatin1String("Type spe= cific data")); - tabWidget->addTab(new Tab3Widget(tabWidget), QLatin1String("KSelection= ProxyModel")); - tabWidget->addTab(new Tab4Widget(tabWidget), QLatin1String("KSelection= ProxyModel Filtered")); - tabWidget->addTab(new Tab6Widget(tabWidget), QLatin1String("Checkable = Collections")); - tabWidget->addTab(new Tab5Widget(tabWidget), QLatin1String("Categorize= d Items")); - tabWidget->addTab(new Tab7Widget(tabWidget), QLatin1String("Tagged Ite= ms")); - tabWidget->addTab(new UnreadMailsWidget(tabWidget), QLatin1String("Unr= ead Mails")); - tabWidget->addTab(new RecursiveItemListWidget(tabWidget), QLatin1Strin= g("Items only")); - tabWidget->addTab(new EntityFindingWidget(tabWidget), QLatin1String("F= ind entities")); - tabWidget->addTab(new CollectionMonitoredWidget(tabWidget), QLatin1Str= ing("SetCollectionMonitored")); - tabWidget->addTab(new UnreadMailsInCollectionsWidget(tabWidget), QLati= n1String("UnreadMails")); + tabWidget->addTab(new Checkable2(tabWidget), QStringLiteral("Checkable= 2")); + tabWidget->addTab(new DescTabWidget(tabWidget), QStringLiteral("Desc")= ); + tabWidget->addTab(new Tab1Widget(tabWidget), QStringLiteral("EntityTre= eModel")); + tabWidget->addTab(new Tab2Widget(tabWidget), QStringLiteral("setRootIn= dex")); + tabWidget->addTab(new Tab2_5Widget(tabWidget), QStringLiteral("Type sp= ecific data")); + tabWidget->addTab(new Tab3Widget(tabWidget), QStringLiteral("KSelectio= nProxyModel")); + tabWidget->addTab(new Tab4Widget(tabWidget), QStringLiteral("KSelectio= nProxyModel Filtered")); + tabWidget->addTab(new Tab6Widget(tabWidget), QStringLiteral("Checkable= Collections")); + tabWidget->addTab(new Tab5Widget(tabWidget), QStringLiteral("Categoriz= ed Items")); + tabWidget->addTab(new Tab7Widget(tabWidget), QStringLiteral("Tagged It= ems")); + tabWidget->addTab(new UnreadMailsWidget(tabWidget), QStringLiteral("Un= read Mails")); + tabWidget->addTab(new RecursiveItemListWidget(tabWidget), QStringLiter= al("Items only")); + tabWidget->addTab(new EntityFindingWidget(tabWidget), QStringLiteral("= Find entities")); + tabWidget->addTab(new CollectionMonitoredWidget(tabWidget), QStringLit= eral("SetCollectionMonitored")); + tabWidget->addTab(new UnreadMailsInCollectionsWidget(tabWidget), QStri= ngLiteral("UnreadMails")); = setCentralWidget(tabWidget); } diff --git a/examples/apps/etm_usage/mixedtreemodel.cpp b/examples/apps/etm= _usage/mixedtreemodel.cpp index ea7b9ed0..f93a366d 100644 --- a/examples/apps/etm_usage/mixedtreemodel.cpp +++ b/examples/apps/etm_usage/mixedtreemodel.cpp @@ -71,7 +71,7 @@ QVariant MixedTreeModel::entityData(const Akonadi::Item &= item, int column, int r if (item.mimeType() =3D=3D KMime::Message::mimeType()) { return message->from()->asUnicodeString(); } else { - return QString(message->mainBodyPart()->decodedText().= mid(0, 30) + QLatin1String("...")); + return QString(message->mainBodyPart()->decodedText().= mid(0, 30) + QStringLiteral("...")); } default: return QVariant(); diff --git a/examples/apps/etm_usage/tab6widget.cpp b/examples/apps/etm_usa= ge/tab6widget.cpp index 62c63a9f..8944a30d 100644 --- a/examples/apps/etm_usage/tab6widget.cpp +++ b/examples/apps/etm_usage/tab6widget.cpp @@ -106,7 +106,7 @@ Tab6Widget::Tab6Widget(QWidget *parent, Qt::WindowFlags= f) selectionProxy->setSourceModel(m_etw->model()); = Akonadi::EntityMimeTypeFilterModel *itemFilter =3D new Akonadi::Entity= MimeTypeFilterModel(this); - itemFilter->setObjectName(QLatin1String("itemFilter")); + itemFilter->setObjectName(QStringLiteral("itemFilter")); itemFilter->addMimeTypeExclusionFilter(Akonadi::Collection::mimeType()= ); itemFilter->setHeaderGroup(Akonadi::EntityTreeModel::ItemListHeaders); itemFilter->setSourceModel(selectionProxy); diff --git a/examples/apps/etm_usage/tab7widget.cpp b/examples/apps/etm_usa= ge/tab7widget.cpp index e45c5b2a..247de532 100644 --- a/examples/apps/etm_usage/tab7widget.cpp +++ b/examples/apps/etm_usage/tab7widget.cpp @@ -97,7 +97,7 @@ Tab7Widget::Tab7Widget(QWidget *parent, Qt::WindowFlags f) : QWidget(parent, f) { EntityTreeModelFactory *modelFactory =3D new CategorisedEntityModelFac= tory(this); - modelFactory->createFromRemoteId(QLatin1String("nepomuktags")); + modelFactory->createFromRemoteId(QStringLiteral("nepomuktags")); connect(modelFactory, &CategorisedEntityModelFactory::modelCreated, th= is, &Tab7Widget::initModel); } = diff --git a/examples/apps/etm_usage/unreadmailsincollectionswidget.cpp b/e= xamples/apps/etm_usage/unreadmailsincollectionswidget.cpp index f8fd303a..80249f87 100644 --- a/examples/apps/etm_usage/unreadmailsincollectionswidget.cpp +++ b/examples/apps/etm_usage/unreadmailsincollectionswidget.cpp @@ -82,7 +82,7 @@ UnreadMailsInCollectionsWidget::UnreadMailsInCollectionsW= idget(QWidget *parent, : QWidget(parent, f) { QVBoxLayout *layout =3D new QVBoxLayout(this); - QPushButton *configureButton =3D new QPushButton(QLatin1String("Config= ure")); + QPushButton *configureButton =3D new QPushButton(QStringLiteral("Confi= gure")); connect(configureButton, SIGNAL(clicked(bool)), SLOT(configure())); layout->addWidget(configureButton); = diff --git a/examples/apps/kabc/kabceditor.cpp b/examples/apps/kabc/kabcedi= tor.cpp index 7beec0d5..9e627c47 100644 --- a/examples/apps/kabc/kabceditor.cpp +++ b/examples/apps/kabc/kabceditor.cpp @@ -89,7 +89,7 @@ void Dialog::save() = int main(int argc, char **argv) { - KAboutData aboutData(QLatin1String("kabceditor"), i18n("KABC Editor"),= QLatin1String("1.0")); + KAboutData aboutData(QStringLiteral("kabceditor"), i18n("KABC Editor")= , QStringLiteral("1.0")); aboutData.setShortDescription(i18n("A contact editor for Akonadi")); QApplication app(argc, argv); QCommandLineParser parser; diff --git a/examples/apps/kabc/kabcviewer.cpp b/examples/apps/kabc/kabcvie= wer.cpp index e760af4d..7768ea2d 100644 --- a/examples/apps/kabc/kabcviewer.cpp +++ b/examples/apps/kabc/kabcviewer.cpp @@ -61,7 +61,7 @@ void Dialog::loadUid(Akonadi::Item::Id uid) = int main(int argc, char **argv) { - KAboutData aboutData(QLatin1String("kabcviewer"), i18n("KABC Viewer"),= QLatin1String("1.0")); + KAboutData aboutData(QStringLiteral("kabcviewer"), i18n("KABC Viewer")= , QStringLiteral("1.0")); aboutData.setShortDescription(i18n("A contact viewer for Akonadi")); QApplication app(argc, argv); QCommandLineParser parser; @@ -72,15 +72,15 @@ int main(int argc, char **argv) parser.process(app); aboutData.processCommandLine(&parser); = - parser.addOption(QCommandLineOption(QStringList() << QLatin1String("ui= d"), i18n("Uid of the Akonadi contact"), QLatin1String("uid"))); + parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("u= id"), i18n("Uid of the Akonadi contact"), QStringLiteral("uid"))); = Dialog dlg; - if (!parser.isSet(QLatin1String("uid"))) { + if (!parser.isSet(QStringLiteral("uid"))) { parser.showHelp(); return 1; } = - dlg.loadUid(parser.value(QLatin1String("uid")).toLongLong()); + dlg.loadUid(parser.value(QStringLiteral("uid")).toLongLong()); dlg.exec(); = return 0; diff --git a/examples/apps/mailreader/mailreader.cpp b/examples/apps/mailre= ader/mailreader.cpp index d7a0392d..6d84fbca 100644 --- a/examples/apps/mailreader/mailreader.cpp +++ b/examples/apps/mailreader/mailreader.cpp @@ -70,7 +70,7 @@ void mailreader::setupDocks() monitor->setSession(session); monitor->setCollectionMonitored(Akonadi::Collection::root()); monitor->fetchCollection(true); - monitor->setMimeTypeMonitored(QLatin1String("message/rfc822"), true); + monitor->setMimeTypeMonitored(QStringLiteral("message/rfc822"), true); monitor->itemFetchScope().fetchPayloadPart(Akonadi::MessagePart::Heade= r); = Akonadi::EntityTreeModel *entityModel =3D new Akonadi::EntityTreeModel= (monitor, this); @@ -107,14 +107,14 @@ void mailreader::setupDocks() = // Dock the message list view QDockWidget *messageListDock =3D new QDockWidget(i18n("Messages"), thi= s); - messageListDock->setObjectName(QLatin1String("Messages")); + messageListDock->setObjectName(QStringLiteral("Messages")); messageListDock->setWidget(m_messagePane); messageListDock->setFeatures(QDockWidget::DockWidgetMovable | QDockWid= get::DockWidgetFloatable); addDockWidget(Qt::TopDockWidgetArea, messageListDock); = // Dock the folder tree view QDockWidget *folderDock =3D new QDockWidget(i18n("Folders"), this); - folderDock->setObjectName(QLatin1String("Folders")); + folderDock->setObjectName(QStringLiteral("Folders")); folderDock->setWidget(collectionView); folderDock->setFeatures(QDockWidget::DockWidgetMovable | QDockWidget::= DockWidgetFloatable); addDockWidget(Qt::LeftDockWidgetArea, folderDock); @@ -132,17 +132,17 @@ void mailreader::setupActions() KStandardAction::quit(qApp, SLOT(closeAllWindows()), actionCollection(= )); KStandardAction::preferences(m_view, SLOT(slotConfigure()), actionColl= ection()); = - QAction *createTab =3D new QAction(QIcon::fromTheme(QLatin1String("tab= -new")), + QAction *createTab =3D new QAction(QIcon::fromTheme(QStringLiteral("ta= b-new")), i18n("Open a new tab"), this); - actionCollection()->addAction(QLatin1String("new_tab"), createTab); + actionCollection()->addAction(QStringLiteral("new_tab"), createTab); connect(createTab, &QAction::triggered, m_messagePane, &MessageList::P= ane::createNewTab); = m_previousMessage =3D new QAction(i18n("Previous Message"), this); - actionCollection()->addAction(QLatin1String("previous_message"), m_pre= viousMessage); + actionCollection()->addAction(QStringLiteral("previous_message"), m_pr= eviousMessage); connect(m_previousMessage, &QAction::triggered, this, &mailreader::slo= tPreviousMessage); m_nextMessage =3D new QAction(i18n("Next Message"), this); - actionCollection()->addAction(QLatin1String("next_message"), m_nextMes= sage); + actionCollection()->addAction(QStringLiteral("next_message"), m_nextMe= ssage); connect(m_nextMessage, &QAction::triggered, this, &mailreader::slotNex= tMessage); } = diff --git a/examples/apps/mailreader/mailreaderview.cpp b/examples/apps/ma= ilreader/mailreaderview.cpp index 0149190f..821da2aa 100644 --- a/examples/apps/mailreader/mailreaderview.cpp +++ b/examples/apps/mailreader/mailreaderview.cpp @@ -74,7 +74,7 @@ void mailreaderView::displayAboutPage() "

Welcome to Mailreader %1<= /h2>" "

Mailread is a proof of concept reader for the Akonadi= /KMime framework.

\n" "

    The Akonadi Team

") - .subs(QLatin1String("0.1")); // Akonadi Mail Reader version + .subs(QStringLiteral("0.1")); // Akonadi Mail Reader version = //TODO PORT MEm_readerWin->displaySplashPage(info.toString()); } diff --git a/examples/apps/mailreader/main.cpp b/examples/apps/mailreader/m= ain.cpp index dab092ac..e8460b66 100644 --- a/examples/apps/mailreader/main.cpp +++ b/examples/apps/mailreader/main.cpp @@ -23,7 +23,7 @@ int main(int argc, char **argv) about.setupCommandLine(&parser); parser.process(app); about.processCommandLine(&parser); - parser.addOption(QCommandLineOption(QStringList() << QLatin1String("+[= URL]"), i18n("Document to open"))); + parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("+= [URL]"), i18n("Document to open"))); = mailreader *widget =3D new mailreader; = diff --git a/kaddressbook/importexportplugins/csv/import/csvimportdialog.cp= p b/kaddressbook/importexportplugins/csv/import/csvimportdialog.cpp index 13f55706..4e5ed0bd 100644 --- a/kaddressbook/importexportplugins/csv/import/csvimportdialog.cpp +++ b/kaddressbook/importexportplugins/csv/import/csvimportdialog.cpp @@ -694,9 +694,9 @@ void CSVImportDialog::saveTemplate() } = const QString fileName - =3D QStandardPaths::writableLocation(QStandardPaths::GenericDataLo= cation) + QLatin1String("/kaddressbook/csv-templates/") + =3D QStandardPaths::writableLocation(QStandardPaths::GenericDataLo= cation) + QStringLiteral("/kaddressbook/csv-templates/") +QUuid::createUuid().toString() - +QLatin1String(".desktop"); + +QStringLiteral(".desktop"); = QFileInfo fileInfo(fileName); QDir().mkpath(fileInfo.absolutePath()); diff --git a/kaddressbook/importexportplugins/gmx/gmximportexportplugininte= rface.cpp b/kaddressbook/importexportplugins/gmx/gmximportexportplugininter= face.cpp index 24cc3521..afaaaf34 100644 --- a/kaddressbook/importexportplugins/gmx/gmximportexportplugininterface.c= pp +++ b/kaddressbook/importexportplugins/gmx/gmximportexportplugininterface.c= pp @@ -108,7 +108,7 @@ void GMXImportExportPluginInterface::exportGMX() KAddressBookImportExport::KAddressBookImportExportContactList contactL= ists; contactLists.setAddressList(contacts); QFileDialog::Options options =3D QFileDialog::DontConfirmOverwrite; - QUrl url =3D QFileDialog::getSaveFileUrl(parentWidget(), QString(), QU= rl::fromLocalFile(QDir::homePath() + QLatin1String("/addressbook.gmx")), GM= X_FILESELECTION_STRING, nullptr, options); + QUrl url =3D QFileDialog::getSaveFileUrl(parentWidget(), QString(), QU= rl::fromLocalFile(QDir::homePath() + QStringLiteral("/addressbook.gmx")), G= MX_FILESELECTION_STRING, nullptr, options); if (url.isEmpty()) { return; } @@ -500,7 +500,7 @@ void GMXImportExportPluginInterface::importGMX() addressee->setNickName(itemList.at(1)); addressee->setGivenName(itemList.at(2)); addressee->setFamilyName(itemList.at(3)); - addressee->setFormattedName(itemList.at(3) + QLatin1String(", ") += itemList.at(2)); + addressee->setFormattedName(itemList.at(3) + QStringLiteral(", ") = + itemList.at(2)); addressee->setPrefix(itemList.at(4)); if (checkDateTime(itemList.at(5), dt)) { addressee->setBirthday(dt); diff --git a/kaddressbook/importexportplugins/ldif/ldifimportexportpluginin= terface.cpp b/kaddressbook/importexportplugins/ldif/ldifimportexportplugini= nterface.cpp index 466b73b0..7ec14a2f 100644 --- a/kaddressbook/importexportplugins/ldif/ldifimportexportplugininterface= .cpp +++ b/kaddressbook/importexportplugins/ldif/ldifimportexportplugininterface= .cpp @@ -154,7 +154,7 @@ void LDifImportExportPluginInterface::exportLdif() = QFileDialog::Options options =3D QFileDialog::DontConfirmOverwrite; const QUrl url - =3D QFileDialog::getSaveFileUrl(parentWidget(), QString(), QUrl::f= romLocalFile(QDir::homePath() + QLatin1String("/addressbook.ldif")), + =3D QFileDialog::getSaveFileUrl(parentWidget(), QString(), QUrl::f= romLocalFile(QDir::homePath() + QStringLiteral("/addressbook.ldif")), i18n("LDif Files (*.ldif)"), nullptr= , options); if (url.isEmpty()) { return; diff --git a/kaddressbook/importexportplugins/vcards/vcardimportexportplugi= ninterface.cpp b/kaddressbook/importexportplugins/vcards/vcardimportexportp= lugininterface.cpp index 8cbe80fe..5478aafb 100644 --- a/kaddressbook/importexportplugins/vcards/vcardimportexportplugininterf= ace.cpp +++ b/kaddressbook/importexportplugins/vcards/vcardimportexportplugininterf= ace.cpp @@ -481,7 +481,7 @@ void VCardImportExportPluginInterface::exportVCard() QString(list[ 0 ].givenName() +QLatin1Char(QLatin1= Char('_')) +list[ 0 ].familyNam= e() - +QLatin1String(".vcf= "))), + +QStringLiteral(".vc= f"))), QString(), nullptr, options); if (url.isEmpty()) { // user canceled export return; @@ -520,7 +520,7 @@ void VCardImportExportPluginInterface::exportVCard() for (int i =3D 0; i < list.count(); ++i) { const KContacts::Addressee contact =3D list.at(i); = - url =3D QUrl::fromLocalFile(baseUrl.path() + QLatin1Char('= /') + contactFileName(contact) + QLatin1String(".vcf")); + url =3D QUrl::fromLocalFile(baseUrl.path() + QLatin1Char('= /') + contactFileName(contact) + QStringLiteral(".vcf")); = bool tmpOk =3D false; = diff --git a/kaddressbook/plugins/sendmail/autotests/mailsenderjobtest.cpp = b/kaddressbook/plugins/sendmail/autotests/mailsenderjobtest.cpp index d27192d7..480b0f79 100644 --- a/kaddressbook/plugins/sendmail/autotests/mailsenderjobtest.cpp +++ b/kaddressbook/plugins/sendmail/autotests/mailsenderjobtest.cpp @@ -76,7 +76,7 @@ void MailSenderJobTest::shouldSendSignalWhenOneEmail() QSignalSpy spy(&mailsender, SIGNAL(sendMails(QStringList))); mailsender.start(); QCOMPARE(spy.count(), 1); - const QStringList resultLst =3D spy.at(0).at(0).value(); + const QStringList resultLst =3D spy.at(0).at(0).toStringList(); QCOMPARE(resultLst.count(), 1); } = @@ -92,7 +92,7 @@ void MailSenderJobTest::shouldNotSendTwiceEmails() KABMailSender::MailSenderJob mailsender(lst); QSignalSpy spy(&mailsender, SIGNAL(sendMails(QStringList))); mailsender.start(); - const QStringList resultLst =3D spy.at(0).at(0).value(); + const QStringList resultLst =3D spy.at(0).at(0).toStringList(); QCOMPARE(resultLst.count(), 1); } = @@ -148,7 +148,7 @@ void MailSenderJobTest::shouldEmitSignalIfThereIsAValid= Email() QSignalSpy spy(&mailsender, SIGNAL(sendMails(QStringList))); mailsender.start(); QCOMPARE(spy.count(), 1); - const QStringList resultLst =3D spy.at(0).at(0).value(); + const QStringList resultLst =3D spy.at(0).at(0).toStringList(); QCOMPARE(resultLst.count(), 2); } = diff --git a/kaddressbook/plugins/sendvcards/sendvcardsjob.cpp b/kaddressbo= ok/plugins/sendvcards/sendvcardsjob.cpp index a8a4a11c..6d207bf3 100644 --- a/kaddressbook/plugins/sendvcards/sendvcardsjob.cpp +++ b/kaddressbook/plugins/sendvcards/sendvcardsjob.cpp @@ -72,13 +72,13 @@ bool SendVcardsJob::start() KContacts::adaptIMAttributes(data); createTemporaryDir(); const QString contactRealName(contact.realName()); - const QString attachmentName =3D (contactRealName.isEmpty() ? = QStringLiteral("vcard") : contactRealName) + QLatin1String(".vcf"); + const QString attachmentName =3D (contactRealName.isEmpty() ? = QStringLiteral("vcard") : contactRealName) + QStringLiteral(".vcf"); createTemporaryFile(data, attachmentName); } else if (item.hasPayload()) { ++mExpandGroupJobCount; const KContacts::ContactGroup group =3D item.payload(); const QString groupName(group.name()); - const QString attachmentName =3D (groupName.isEmpty() ? QStrin= gLiteral("vcard") : groupName) + QLatin1String(".vcf"); + const QString attachmentName =3D (groupName.isEmpty() ? QStrin= gLiteral("vcard") : groupName) + QStringLiteral(".vcf"); Akonadi::ContactGroupExpandJob *expandJob =3D new Akonadi::Con= tactGroupExpandJob(group, this); expandJob->setProperty("groupName", attachmentName); connect(expandJob, &KJob::result, this, &SendVcardsJob::slotEx= pandGroupResult); @@ -95,7 +95,7 @@ bool SendVcardsJob::start() void SendVcardsJob::createTemporaryDir() { if (!mTempDir) { - mTempDir =3D new QTemporaryDir(QDir::tempPath() + QLatin1Char('/')= + QLatin1String("sendvcards")); + mTempDir =3D new QTemporaryDir(QDir::tempPath() + QLatin1Char('/')= + QStringLiteral("sendvcards")); mTempDir->setAutoRemove(false); mAttachmentTemporary->addTempDir(mTempDir->path()); } @@ -107,7 +107,7 @@ void SendVcardsJob::jobFinished() if (!lstAttachment.isEmpty()) { KToolInvocation::invokeMailer(QString(), QString(), QString(), QSt= ring(), QString(), QString(), lstAttachment); } else { - sendVCardsError(i18n("No vCard created.")); + Q_EMIT sendVCardsError(i18n("No vCard created.")); } mAttachmentTemporary->removeTempFiles(); deleteLater(); @@ -145,7 +145,7 @@ void SendVcardsJob::createTemporaryFile(const QByteArra= y &data, const QString &f QFile file(mTempDir->path() + QLatin1Char('/') + filename); if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) { qCDebug(KADDRESSBOOK_SENDVCARDS_LOG) << "Cannot write vcard filena= me :" << filename; - sendVCardsError(i18n("Temporary file \'%1\' cannot be created", fi= lename)); + Q_EMIT sendVCardsError(i18n("Temporary file \'%1\' cannot be creat= ed", filename)); return; } = diff --git a/kmail/plugins/common/antispamwizard.cpp b/kmail/plugins/common= /antispamwizard.cpp index 4acc88df..dba77609 100644 --- a/kmail/plugins/common/antispamwizard.cpp +++ b/kmail/plugins/common/antispamwizard.cpp @@ -684,9 +684,9 @@ void AntiSpamWizard::sortFilterOnExistance( const QString &intendedFilterName, QString &newFilters, QString &repla= ceFilters) { if (uniqueNameFor(intendedFilterName) =3D=3D intendedFilterName) { - newFilters +=3D QLatin1String("
  • ") + intendedFilterName + QLati= n1String("
  • "); + newFilters +=3D QStringLiteral("
  • ") + intendedFilterName + QStr= ingLiteral("
  • "); } else { - replaceFilters +=3D QLatin1String("
  • ") + intendedFilterName + Q= Latin1String("
  • "); + replaceFilters +=3D QStringLiteral("
  • ") + intendedFilterName + = QStringLiteral("
  • "); } } = diff --git a/korganizer/plugins/hebrew/hebrew.cpp b/korganizer/plugins/hebr= ew/hebrew.cpp index 2520c66b..d6620e99 100644 --- a/korganizer/plugins/hebrew/hebrew.cpp +++ b/korganizer/plugins/hebrew/hebrew.cpp @@ -67,7 +67,7 @@ Element::List Hebrew::createDayElements(const QDate &date) text =3D cal->formatDate(date, KLocale::Day, KLocale::LongNumber) + QL= atin1Char(' ') + cal->monthName(date); = for (const QString &holiday : holidays) { - text +=3D QLatin1String("
    \n") + holiday; + text +=3D QStringLiteral("
    \n") + holiday; } = text =3D i18nc("Change the next two strings if emphasis is done differ= ently in your language.", diff --git a/korganizer/plugins/picoftheday/picoftheday.cpp b/korganizer/pl= ugins/picoftheday/picoftheday.cpp index 50752e3d..662ed6e0 100644 --- a/korganizer/plugins/picoftheday/picoftheday.cpp +++ b/korganizer/plugins/picoftheday/picoftheday.cpp @@ -88,7 +88,7 @@ void POTDElement::step1StartDownload() { // Start downloading the picture if (!mFirstStepCompleted && !mFirstStepJob) { - QUrl url =3D QUrl(QLatin1String("http://en.wikipedia.org/w/index.p= hp?title=3DTemplate:POTD/") + QUrl url =3D QUrl(QStringLiteral("http://en.wikipedia.org/w/index.= php?title=3DTemplate:POTD/") +mDate.toString(Qt::ISODate) + QStringLiteral("&ac= tion=3Draw")); // The file at that URL contains the file name for the POTD = @@ -155,7 +155,7 @@ void POTDElement::step1Result(KJob *job) void POTDElement::step2GetImagePage() { if (!mSecondStepCompleted && !mSecondStepJob) { - mUrl =3D QUrl(QLatin1String("http://en.wikipedia.org/wiki/File:") = + mFileName); + mUrl =3D QUrl(QStringLiteral("http://en.wikipedia.org/wiki/File:")= + mFileName); // We'll find the info to get the thumbnail we want on the POTD's = image page = Q_EMIT gotNewUrl(mUrl); diff --git a/plugins/customtoolsplugins/shorturlplugin/shorturl/shorturleng= ineplugin/shorturlengineinterface.cpp b/plugins/customtoolsplugins/shorturl= plugin/shorturl/shorturlengineplugin/shorturlengineinterface.cpp index c54c8b5e..f099ebc9 100644 --- a/plugins/customtoolsplugins/shorturlplugin/shorturl/shorturlengineplug= in/shorturlengineinterface.cpp +++ b/plugins/customtoolsplugins/shorturlplugin/shorturl/shorturlengineplug= in/shorturlengineinterface.cpp @@ -50,7 +50,7 @@ void ShortUrlEngineInterface::setShortUrl(const QString &= url) && !url.trimmed().startsWith(QStringLiteral("https://")) && !url.trimmed().startsWith(QStringLiteral("ftp://")) && !url.trimmed().startsWith(QStringLiteral("ftps://"))) { - mOriginalUrl =3D QLatin1String("http://") + url; + mOriginalUrl =3D QStringLiteral("http://") + url; } else { mOriginalUrl =3D url; } diff --git a/plugins/messageviewer/bodypartformatter/autotests/diffhighligh= tertest.cpp b/plugins/messageviewer/bodypartformatter/autotests/diffhighlig= htertest.cpp index 387ff406..36291aaa 100644 --- a/plugins/messageviewer/bodypartformatter/autotests/diffhighlightertest= .cpp +++ b/plugins/messageviewer/bodypartformatter/autotests/diffhighlightertest= .cpp @@ -50,9 +50,9 @@ void DiffHighlighterTest::shouldGenerateDiff() { QFETCH(QString, input); = - const QString originalFile =3D QLatin1String(DIFF_DATA_DIR) + QLatin1C= har('/') + input + QStringLiteral(".diff"); - const QString refFile =3D QLatin1String(DIFF_DATA_DIR) + QLatin1Char('= /') + input + QStringLiteral("-ref.diff"); - const QString generatedFile =3D QLatin1String(DIFF_DATA_DIR) + QLatin1= Char('/') + input + QStringLiteral("-generated.diff"); + const QString originalFile =3D QStringLiteral(DIFF_DATA_DIR) + QLatin1= Char('/') + input + QStringLiteral(".diff"); + const QString refFile =3D QStringLiteral(DIFF_DATA_DIR) + QLatin1Char(= '/') + input + QStringLiteral("-ref.diff"); + const QString generatedFile =3D QStringLiteral(DIFF_DATA_DIR) + QLatin= 1Char('/') + input + QStringLiteral("-generated.diff"); QString diff =3D readDiffFile(originalFile); = DiffHighlighter highLighter; diff --git a/plugins/messageviewer/bodypartformatter/autotests/rendertest.c= pp b/plugins/messageviewer/bodypartformatter/autotests/rendertest.cpp index eaa8aa91..a283721c 100644 --- a/plugins/messageviewer/bodypartformatter/autotests/rendertest.cpp +++ b/plugins/messageviewer/bodypartformatter/autotests/rendertest.cpp @@ -48,13 +48,13 @@ void RenderTest::testRender_data() QTest::addColumn("outFileName"); = QDir dir(QStringLiteral(MAIL_DATA_DIR)); - const QStringList lst =3D dir.entryList(QStringList(QLatin1String("*.m= box")), QDir::Files | QDir::Readable | QDir::NoSymLinks); + const QStringList lst =3D dir.entryList(QStringList(QStringLiteral("*.= mbox")), QDir::Files | QDir::Readable | QDir::NoSymLinks); for (const QString &file : lst) { - if (!QFile::exists(dir.path() + QLatin1Char('/') + file + QLatin1S= tring(".html"))) { + if (!QFile::exists(dir.path() + QLatin1Char('/') + file + QStringL= iteral(".html"))) { continue; } - QTest::newRow(file.toLatin1()) << QString(dir.path() + QLatin1Char= ('/') + file) << QString(dir.path() + QLatin1Char('/') + file + QLatin1Str= ing(".html")) - << QString(file + QLatin1String(".o= ut")); + QTest::newRow(file.toLatin1()) << QString(dir.path() + QLatin1Char= ('/') + file) << QString(dir.path() + QLatin1Char('/') + file + QStringLit= eral(".html")) + << QString(file + QStringLiteral(".= out")); } } = @@ -64,7 +64,7 @@ void RenderTest::testRender() QFETCH(QString, referenceFileName); QFETCH(QString, outFileName); = - const QString htmlFileName =3D outFileName + QLatin1String(".html"); + const QString htmlFileName =3D outFileName + QStringLiteral(".html"); = QIcon::setThemeName(QStringLiteral("oxygen")); = diff --git a/plugins/messageviewer/bodypartformatter/calendar/text_calendar= .cpp b/plugins/messageviewer/bodypartformatter/calendar/text_calendar.cpp index 31edf743..72e03495 100644 --- a/plugins/messageviewer/bodypartformatter/calendar/text_calendar.cpp +++ b/plugins/messageviewer/bodypartformatter/calendar/text_calendar.cpp @@ -1026,7 +1026,7 @@ public: QStringList patterns =3D db.mimeTypeForName(attachment->mimeTy= pe()).globPatterns(); if (!patterns.empty()) { QString pattern =3D patterns.at(0); - file =3D new QTemporaryFile(QDir::tempPath() + QLatin1Stri= ng("/messageviewer_XXXXXX") + pattern.remove(QLatin1Char('*'))); + file =3D new QTemporaryFile(QDir::tempPath() + QStringLite= ral("/messageviewer_XXXXXX") + pattern.remove(QLatin1Char('*'))); } else { file =3D new QTemporaryFile(); } @@ -1077,7 +1077,7 @@ public: QStringList patterns =3D db.mimeTypeForName(a->mimeType()).glo= bPatterns(); if (!patterns.empty()) { QString pattern =3D patterns.at(0); - file =3D new QTemporaryFile(QDir::tempPath() + QLatin1Stri= ng("/messageviewer_XXXXXX") + pattern.remove(QLatin1Char('*'))); + file =3D new QTemporaryFile(QDir::tempPath() + QStringLite= ral("/messageviewer_XXXXXX") + pattern.remove(QLatin1Char('*'))); } else { file =3D new QTemporaryFile(); } diff --git a/plugins/messageviewer/bodypartformatter/vcard/text_vcard.cpp b= /plugins/messageviewer/bodypartformatter/vcard/text_vcard.cpp index 8d237ba9..8f8f1782 100644 --- a/plugins/messageviewer/bodypartformatter/vcard/text_vcard.cpp +++ b/plugins/messageviewer/bodypartformatter/vcard/text_vcard.cpp @@ -104,9 +104,9 @@ public: return AsIcon; } = - writer->queue(QLatin1String("

    ") + writer->queue(QStringLiteral("

    ") +i18np("Attached business card", "Attached business = cards", count) - +QLatin1String("

    ")); + +QStringLiteral("

    ")); = count =3D 0; static QString defaultPixmapPath =3D QUrl::fromLocalFile(KIconLoad= er::global()->iconPath(QStringLiteral("user-identity"), KIconLoader::Deskto= p)).url(); @@ -137,11 +137,11 @@ public: htmlStr.replace(QStringLiteral("img src=3D\"contact_photo\= ""), QStringLiteral("img src=3D\"%1\"").arg(defaultPixmapPath)); } else { QImage img =3D a.photo().data(); - const QString dir =3D bodyPart->nodeHelper()->createTempDi= r(QLatin1String("vcard-") + a.uid()); + const QString dir =3D bodyPart->nodeHelper()->createTempDi= r(QStringLiteral("vcard-") + a.uid()); const QString filename =3D dir + QDir::separator() + a.uid= (); img.save(filename, "PNG"); bodyPart->nodeHelper()->addTempFile(filename); - const QString href =3D QLatin1String("file:") + QLatin1Str= ing(QUrl::toPercentEncoding(filename)); + const QString href =3D QStringLiteral("file:") + QLatin1St= ring(QUrl::toPercentEncoding(filename)); htmlStr.replace(QLatin1String("img src=3D\"contact_photo\"= "), QStringLiteral("img src=3D\"%1\"").arg(href)); } writer->queue(htmlStr); @@ -151,25 +151,25 @@ public: || (memento && memento->finished() && !memento->vcardExist= (count))) { const QString addToLinkText =3D i18n("[Add this contact to= the address book]"); QString op =3D QStringLiteral("addToAddressBook:%1").arg(c= ount); - writer->queue(QLatin1String("

    ")); } else { if (memento->address(count) !=3D a) { const QString addToLinkText =3D i18n("[Update this con= tact to the address book]"); const QString op =3D QStringLiteral("updateToAddressBo= ok:%1").arg(count); - writer->queue(QLatin1String("
    <= a href=3D\"") + writer->queue(QStringLiteral("

    ")); + +QStringLiteral("


    ")); } else { const QString addToLinkText =3D i18n("[This contact is= already in addressbook]"); - writer->queue(QLatin1String("
    ") + writer->queue(QStringLiteral("
    = ") +addToLinkText - +QLatin1String("


    ")); + +QStringLiteral("


    ")); } } count++; @@ -278,9 +278,9 @@ public: QString fileName; const QString givenName(a.givenName()); if (givenName.isEmpty()) { - fileName =3D a.familyName() + QLatin1String(".vcf"); + fileName =3D a.familyName() + QStringLiteral(".vcf"); } else { - fileName =3D givenName + QLatin1Char('_') + a.familyName() + Q= Latin1String(".vcf"); + fileName =3D givenName + QLatin1Char('_') + a.familyName() + Q= StringLiteral(".vcf"); } // get the saveas file name QUrl saveAsUrl diff --git a/plugins/messageviewer/bodypartformatter/xdiff/diffhighlighter.= cpp b/plugins/messageviewer/bodypartformatter/xdiff/diffhighlighter.cpp index f540ce6a..3ef4cccc 100644 --- a/plugins/messageviewer/bodypartformatter/xdiff/diffhighlighter.cpp +++ b/plugins/messageviewer/bodypartformatter/xdiff/diffhighlighter.cpp @@ -50,7 +50,7 @@ void DiffHighlighter::highlightDiff(const QString &str) "margin: 0em;\""); = mOutputDiff =3D QStringLiteral("
    "); - mOutputDiff +=3D QLatin1String("
    '=
    );
    +    mOutputDiff +=3D QStringLiteral("
    =
    ');
     =
    
         KSyntaxHighlighting::State state;
     =
    
    diff --git a/plugins/messageviewerheaderplugins/briefheaderstyleplugin/brie=
    fheaderstyle.cpp b/plugins/messageviewerheaderplugins/briefheaderstyleplugi=
    n/briefheaderstyle.cpp
    index 41e18867..38b28c0b 100644
    --- a/plugins/messageviewerheaderplugins/briefheaderstyleplugin/briefheader=
    style.cpp
    +++ b/plugins/messageviewerheaderplugins/briefheaderstyleplugin/briefheader=
    style.cpp
    @@ -75,15 +75,15 @@ QString BriefHeaderStyle::format(KMime::Message *messag=
    e) const
     =
    
         const QString subjectDir =3D mHeaderStyleUtil.subjectDirectionString(m=
    essage);
     =
    
    -    QString headerStr =3D QLatin1String("
    \n"); + QString headerStr =3D QStringLiteral("
    \n"); = if (strategy->showHeader(QStringLiteral("subject"))) { const KTextToHTML::Options flags =3D KTextToHTML::PreserveSpaces |= KTextToHTML::ReplaceSmileys; = - headerStr +=3D QLatin1String("
    \n") - +QLatin1String(""); + headerStr +=3D QStringLiteral("
    \n") + +QStringLiteral(""); = - headerStr +=3D mHeaderStyleUtil.subjectString(message, flags) + QL= atin1String("
    \n"); + headerStr +=3D mHeaderStyleUtil.subjectString(message, flags) + QS= tringLiteral("
    \n"); } QStringList headerParts; = @@ -94,7 +94,7 @@ QString BriefHeaderStyle::format(KMime::Message *message)= const */ QString fromPart =3D StringUtil::emailAddrAsAnchor(message->from()= , StringUtil::DisplayNameOnly); if (!vCardName().isEmpty()) { - fromPart +=3D QLatin1String("  ") + i18n("[vCard]") + QLatin1String(""); + fromPart +=3D QStringLiteral("  ") + i18n("[vCard]") + QStringLiteral(""); } headerParts << fromPart; } @@ -118,7 +118,7 @@ QString BriefHeaderStyle::format(KMime::Message *messag= e) const } = // remove all empty (modulo whitespace) entries and joins them via ", = \n" - headerStr +=3D QLatin1String(" (") + headerParts.filter(QRegExp(QLatin= 1String("\\S"))).join(QStringLiteral(",\n")) + QLatin1Char(')'); + headerStr +=3D QStringLiteral(" (") + headerParts.filter(QRegExp(QLati= n1String("\\S"))).join(QStringLiteral(",\n")) + QLatin1Char(')'); = headerStr +=3D QLatin1String("
    \n"); = diff --git a/plugins/messageviewerheaderplugins/enterpriseheaderstyleplugin= /enterpriseheaderstyle.cpp b/plugins/messageviewerheaderplugins/enterpriseh= eaderstyleplugin/enterpriseheaderstyle.cpp index a7b9a153..feaa24c4 100644 --- a/plugins/messageviewerheaderplugins/enterpriseheaderstyleplugin/enterp= riseheaderstyle.cpp +++ b/plugins/messageviewerheaderplugins/enterpriseheaderstyleplugin/enterp= riseheaderstyle.cpp @@ -79,39 +79,39 @@ QString EnterpriseHeaderStyle::format(KMime::Message *m= essage) const } = headerStr - +=3D QLatin1String("
    = ") - + mHeaderStyleUtil.dateString(message, isPrinting(), /* shortDa= te */ MessageViewer::HeaderStyleUtil::CustomDate) + QLatin1String("<= /div>" + +=3D QStringLiteral("
    ") + + mHeaderStyleUtil.dateString(message, isPrinting(), /* shortDa= te */ MessageViewer::HeaderStyleUtil::CustomDate) + QStringLiteral("=
    " = // #0057ae = " \n" + + QStringLiteral("; border-collapse:collapse; top: 14px; min-wi= dth: 200px; \" cellpadding=3D0> \n" " \n" " \n" + + imgpath + QStringLiteral("top_left.png); \"> \n" " \n" + + imgpath + QStringLiteral("top.png); \"> \n" " \n" + + imgpath + QStringLiteral("top_right.png); \"> \n" " \n" " \n" + + imgpath + QStringLiteral("left.png); \"> \n" "
    \n"); headerStr - +=3D QLatin1String("
    \n" - "\n" + +=3D QStringLiteral("
    \n" + "\n" "
    \= n"); headerStr - +=3D QLatin1String(" \n"); + +=3D QStringLiteral("
    \n"); = // subject if (strategy->showHeader(QStringLiteral("subject"))) { const KTextToHTML::Options flags =3D KTextToHTML::PreserveSpaces |= KTextToHTML::ReplaceSmileys; = headerStr - +=3D QLatin1String(" \n" - " \n" + +=3D QStringLiteral(" \n" + " \n" = = " \n" + + borderSettings + QStringLiteral("\">"); + headerStr +=3D mHeaderStyleUtil.subjectString(message, flags) + QS= tringLiteral(" \n" = " \n"); } = @@ -121,55 +121,55 @@ QString EnterpriseHeaderStyle::format(KMime::Message = *message) const QString fromPart =3D StringUtil::emailAddrAsAnchor(message->from(), StringUtil::Displ= ayNameOnly, linkColor); if (!vCardName().isEmpty()) { - fromPart +=3D QLatin1String("  ') + i18n("[vCar= d]") + QLatin1String(""); + fromPart +=3D QStringLiteral("  ') + i18n("[vC= ard]") + QStringLiteral(""); } //TDDO strategy date //if ( strategy->showHeader( "date" ) ) headerStr - +=3D QLatin1String(" \n" - " \n" + +=3D QStringLiteral(" \n" + " \n" " " + + borderSettings + QStringLiteral("\">") + fromPart + QStri= ngLiteral(" " = " "); } = // to line if (strategy->showHeader(QStringLiteral("to"))) { headerStr - +=3D QLatin1String(" " - " " + +=3D QStringLiteral(" " + " " " " + +QStringLiteral(" " " \n"); } = // cc line, if any if (strategy->showHeader(QStringLiteral("cc")) && message->cc(false)) { headerStr - +=3D QLatin1String(" " - " " + +=3D QStringLiteral(" " + " " " " + +QStringLiteral(" " " \n"); } = // bcc line, if any if (strategy->showHeader(QStringLiteral("bcc")) && message->bcc(false)= ) { headerStr - +=3D QLatin1String(" " - " " + +=3D QStringLiteral(" " + " " " " + +QStringLiteral(" " " \n"); } = @@ -177,33 +177,33 @@ QString EnterpriseHeaderStyle::format(KMime::Message = *message) const QString attachment; if (isTopLevel()) { attachment - =3D QLatin1String("" - "" + "" = "" ""); } = // header-bottom headerStr - +=3D QLatin1String("
    "); - headerStr +=3D mHeaderStyleUtil.subjectString(message, flags) + QL= atin1String("
    ") + i18n( - "From: ") + QLatin1String("
    ") + i18n( + "From: ") + QStringLiteral("") + fromPart + QLatin= 1String("
    ") + i18n( - "To: ") + QLatin1String("
    ") + i18n( + "To: ") + QStringLiteral("") + + borderSettings + QStringLiteral("\">") +StringUtil::emailAddrAsAnchor(message->to(), StringUtil::D= isplayFullAddress, linkColor) - +QLatin1String("
    ") + i18n( - "CC: ") + QLatin1String("
    ") + i18n( + "CC: ") + QStringLiteral("") + + borderSettings + QStringLiteral("\">") +StringUtil::emailAddrAsAnchor(message->cc(), StringUtil::D= isplayFullAddress, linkColor) - +QLatin1String("
    ") + i18n( - "BCC: ") + QLatin1String("
    ") + i18n( + "BCC: ") + QStringLiteral("") + + borderSettings + QStringLiteral("\">") +StringUtil::emailAddrAsAnchor(message->bcc(), StringUtil::= DisplayFullAddress, linkColor) - +QLatin1String("
    " + =3D QStringLiteral("
    " = "" = "
    " = "
    " = "
    " = "
    " + + QStringLiteral("right.png);'
    \n" + +=3D QStringLiteral("
    \n" " \n" - " \n" + " \n" = " \n") + attachment - +QLatin1String(" \n" - " \n" - = " \n" + +QStringLiteral(" \n" + " \n" + = " \n" = = " \n" + + imgpath + QStringLiteral("sw.png\" style=3D\"margin: 0px; hei= ght: 30px; overflow:hidden; \"> \n" " \n" + + imgpath + QStringLiteral("sp_right.png\" style=3D\"float: rig= ht; \"> \n" " \n" + + imgpath + QStringLiteral("s_right.png); \"> \n" " \n" " \n"); = diff --git a/plugins/messageviewerheaderplugins/fancyheaderstyleplugin/fanc= yheaderstyle.cpp b/plugins/messageviewerheaderplugins/fancyheaderstyleplugi= n/fancyheaderstyle.cpp index 8aeda098..befc8698 100644 --- a/plugins/messageviewerheaderplugins/fancyheaderstyleplugin/fancyheader= style.cpp +++ b/plugins/messageviewerheaderplugins/fancyheaderstyleplugin/fancyheader= style.cpp @@ -95,7 +95,7 @@ QString FancyHeaderStyle::format(KMime::Message *message)= const //qCDebug(MESSAGEVIEWER_LOG) << "Got a photo:" << xface.photoURL; userHTML =3D QStringLiteral("") .arg(xface.photoURL).arg(xface.photoWidth).arg(xface.ph= otoHeight); - userHTML =3D QLatin1String("
    ") + userHT= ML + QLatin1String("
    "); + userHTML =3D QStringLiteral("
    ") + userH= TML + QStringLiteral("
    "); } = // the subject line and box below for details @@ -117,20 +117,20 @@ QString FancyHeaderStyle::format(KMime::Message *mess= age) const "") .arg(i18n("From: ")) + StringUtil::emailAddrAsAnchor(message->from(), Stri= ngUtil::DisplayFullAddress) - + (message->headerByType("Resent-From") ? QLatin1Stri= ng(" ") + + (message->headerByType("Resent-From") ? QStringLite= ral(" ") + i18n("(resent from %1)", StringUtil::emailAddrAsAnchor( resentFrom, StringUtil::DisplayFullAddr= ess)) : QString()) - + (!vCardName().isEmpty() ? QLatin1String(" &nbs= p;") - + i18n("[vCard]") + QLatin1String("") + + (!vCardName().isEmpty() ? QStringLiteral(" &nb= sp;") + + i18n("[vCard]") + QStringLiteral("") : QString()) + (!message->organization(false) ? QString() - : QLatin1String("  (") + : QStringLiteral("  (") + mHeaderStyleUtil.strToHtml(message->organization= ()->asUnicodeString()) + QLatin1Char(')')) - + QLatin1String("\n"); + + QStringLiteral("\n"); } // to line if (strategy->showHeader(QStringLiteral("to"))) { diff --git a/plugins/messageviewerplugins/createeventplugin/createeventjob.= cpp b/plugins/messageviewerplugins/createeventplugin/createeventjob.cpp index 6ec9cea9..d9bfa054 100644 --- a/plugins/messageviewerplugins/createeventplugin/createeventjob.cpp +++ b/plugins/messageviewerplugins/createeventplugin/createeventjob.cpp @@ -59,7 +59,7 @@ void CreateEventJob::slotFetchDone(KJob *job) if (fetchJob->items().count() =3D=3D 1) { mItem =3D fetchJob->items().at(0); } else { - Q_EMIT emitResult(); + emitResult(); return; } createEvent(); @@ -69,7 +69,7 @@ void CreateEventJob::createEvent() { if (!mItem.hasPayload()) { qCDebug(CREATEEVENTPLUGIN_LOG) << " item has not payload"; - Q_EMIT emitResult(); + emitResult(); return; } = @@ -87,7 +87,7 @@ void CreateEventJob::slotEventCreated(KJob *job) qCDebug(CREATEEVENTPLUGIN_LOG) << "Error during create new Event "= << job->errorString(); setError(job->error()); setErrorText(job->errorText()); - Q_EMIT emitResult(); + emitResult(); } else { Akonadi::ItemCreateJob *createJob =3D static_cast(job); Akonadi::Relation relation(Akonadi::Relation::GENERIC, mItem, crea= teJob->item()); @@ -101,5 +101,5 @@ void CreateEventJob::slotRelationCreated(KJob *job) if (job->error()) { qCDebug(CREATEEVENTPLUGIN_LOG) << "Error during create new Event "= << job->errorString(); } - Q_EMIT emitResult(); + emitResult(); } diff --git a/plugins/messageviewerplugins/createnoteplugin/createnotejob.cp= p b/plugins/messageviewerplugins/createnoteplugin/createnotejob.cpp index af632142..799b58c5 100644 --- a/plugins/messageviewerplugins/createnoteplugin/createnotejob.cpp +++ b/plugins/messageviewerplugins/createnoteplugin/createnotejob.cpp @@ -77,7 +77,7 @@ void CreateNoteJob::noteCreated(KJob *job) qCWarning(CREATENOTEPLUGIN_LOG) << "Error during create new Note "= << job->errorString(); setError(job->error()); setErrorText(job->errorText()); - Q_EMIT emitResult(); + emitResult(); } else { Akonadi::ItemCreateJob *createJob =3D static_cast(job); Akonadi::Relation relation(Akonadi::Relation::GENERIC, mItem, crea= teJob->item()); @@ -93,7 +93,7 @@ void CreateNoteJob::noteUpdated(KJob *job) setErrorText(job->errorText()); } = - Q_EMIT emitResult(); + emitResult(); } = void CreateNoteJob::relationCreated(KJob *job) @@ -101,5 +101,5 @@ void CreateNoteJob::relationCreated(KJob *job) if (job->error()) { qCDebug(CREATENOTEPLUGIN_LOG) << "Error during create new Note " <= < job->errorString(); } - Q_EMIT emitResult(); + emitResult(); } diff --git a/plugins/messageviewerplugins/externalscriptplugin/autotests/vi= ewerpluginexternalscriptsloadjobtest.cpp b/plugins/messageviewerplugins/ext= ernalscriptplugin/autotests/viewerpluginexternalscriptsloadjobtest.cpp index 067ef87f..1a786cf5 100644 --- a/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerplu= ginexternalscriptsloadjobtest.cpp +++ b/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerplu= ginexternalscriptsloadjobtest.cpp @@ -61,7 +61,7 @@ void ViewerPluginExternalScriptsLoadJobTest::shouldLoadDa= taInfo() QCOMPARE(info.executable(), QStringLiteral("bla")); QCOMPARE(info.icon(), QStringLiteral("blo")); QVERIFY(!info.isReadOnly()); - const QString filenamepath =3D QLatin1String(TEST_DATA_DIR) + QStringL= iteral("/correctdesktop/first.desktop"); + const QString filenamepath =3D QStringLiteral(TEST_DATA_DIR) + QString= Literal("/correctdesktop/first.desktop"); QCOMPARE(info.fileName(), filenamepath); } = diff --git a/plugins/messageviewerplugins/externalscriptplugin/viewerplugin= externalscriptinterface.cpp b/plugins/messageviewerplugins/externalscriptpl= ugin/viewerpluginexternalscriptinterface.cpp index 10be225f..6890751c 100644 --- a/plugins/messageviewerplugins/externalscriptplugin/viewerpluginexterna= lscriptinterface.cpp +++ b/plugins/messageviewerplugins/externalscriptplugin/viewerpluginexterna= lscriptinterface.cpp @@ -109,7 +109,7 @@ void ViewerPluginExternalscriptInterface::createAction(= KActionCollection *ac) const QVector infos =3D ViewerPlug= inExternalScriptManager::self()->scriptInfos(); if (!infos.isEmpty()) { connect(mActionGroup, &QActionGroup::triggered, this, &ViewerP= luginExternalscriptInterface::slotScriptActivated); - for (ViewerPluginExternalScriptInfo info : infos) { + for (const ViewerPluginExternalScriptInfo &info : infos) { QAction *act =3D new QAction(info.name(), this); act->setIconText(info.name()); const QString &description =3D info.description(); diff --git a/plugins/messageviewerplugins/externalscriptplugin/viewerplugin= externalscriptparseargument.cpp b/plugins/messageviewerplugins/externalscri= ptplugin/viewerpluginexternalscriptparseargument.cpp index 62f46933..26e37f6b 100644 --- a/plugins/messageviewerplugins/externalscriptplugin/viewerpluginexterna= lscriptparseargument.cpp +++ b/plugins/messageviewerplugins/externalscriptplugin/viewerpluginexterna= lscriptparseargument.cpp @@ -36,25 +36,25 @@ QStringList ViewerPluginExternalScriptParseArgument::pa= rse(const QStringList &sc = QStringList newArguments; for (const QString &arg : scriptArguments) { - if (arg =3D=3D QString::fromLatin1("%s")) { + if (arg =3D=3D QLatin1String("%s")) { const KMime::Headers::Subject *const subject =3D mMessage ? mM= essage->subject(false) : nullptr; newArguments << QStringLiteral("\"%1\"").arg(subject ? subject= ->asUnicodeString() : QString()); - } else if (arg =3D=3D QString::fromLatin1("%from")) { + } else if (arg =3D=3D QLatin1String("%from")) { const KMime::Headers::From *const from =3D mMessage ? mMessage= ->from(false) : nullptr; newArguments << QStringLiteral("\"%1\"").arg(from ? from->asUn= icodeString() : QString()); - } else if (arg =3D=3D QString::fromLatin1("%to")) { + } else if (arg =3D=3D QLatin1String("%to")) { const KMime::Headers::To *const to =3D mMessage ? mMessage->to= (false) : nullptr; newArguments << QStringLiteral("\"%1\"").arg(to ? to->asUnicod= eString() : QString()); - } else if (arg =3D=3D QString::fromLatin1("%cc")) { + } else if (arg =3D=3D QLatin1String("%cc")) { const KMime::Headers::Cc *const cc =3D mMessage ? mMessage->cc= (false) : nullptr; newArguments << QStringLiteral("\"%1\"").arg(cc ? cc->asUnicod= eString() : QString()); - } else if (arg =3D=3D QString::fromLatin1("%bcc")) { + } else if (arg =3D=3D QLatin1String("%bcc")) { const KMime::Headers::Bcc *const bcc =3D mMessage ? mMessage->= bcc(false) : nullptr; newArguments << QStringLiteral("\"%1\"").arg(bcc ? bcc->asUnic= odeString() : QString()); - } else if (arg =3D=3D QString::fromLatin1("%body")) { + } else if (arg =3D=3D QLatin1String("%body")) { const QByteArray body =3D mMessage ? mMessage->body() : nullpt= r; newArguments << QStringLiteral("\"%1\"").arg(QLatin1String(bod= y)); - } else if (arg =3D=3D QString::fromLatin1("%inreplyto")) { + } else if (arg =3D=3D QLatin1String("%inreplyto")) { KMime::Headers::InReplyTo *inReplyTo =3D mMessage ? mMessage->= inReplyTo(false) : nullptr; newArguments << QStringLiteral("\"%1\"").arg(inReplyTo ? inRep= lyTo->asUnicodeString() : QString()); } else { diff --git a/plugins/webengineurlinterceptor/adblock/lib/adblockblockableit= emsjob.cpp b/plugins/webengineurlinterceptor/adblock/lib/adblockblockableit= emsjob.cpp index d75b1944..082be84f 100644 --- a/plugins/webengineurlinterceptor/adblock/lib/adblockblockableitemsjob.= cpp +++ b/plugins/webengineurlinterceptor/adblock/lib/adblockblockableitemsjob.= cpp @@ -113,9 +113,9 @@ void AdBlockBlockableItemsJob::adaptSource(QString &src= , const QString &hostName if (src.startsWith(QStringLiteral("http://")) || src.startsWith(QStrin= gLiteral("https://"))) { //Nothing } else if (src.startsWith(QStringLiteral("//"))) { - src =3D QLatin1String("https:") + src; + src =3D QStringLiteral("https:") + src; } else if (src.startsWith(QLatin1Char('/'))) { - src =3D QLatin1String("https://") + hostName + src; + src =3D QStringLiteral("https://") + hostName + src; } else { src =3D QString(); } diff --git a/plugins/webengineurlinterceptor/adblock/lib/widgets/adblockcre= atefilterdialog.cpp b/plugins/webengineurlinterceptor/adblock/lib/widgets/a= dblockcreatefilterdialog.cpp index 751311e1..f6ed9ed4 100644 --- a/plugins/webengineurlinterceptor/adblock/lib/widgets/adblockcreatefilt= erdialog.cpp +++ b/plugins/webengineurlinterceptor/adblock/lib/widgets/adblockcreatefilt= erdialog.cpp @@ -119,7 +119,7 @@ void AdBlockCreateFilterDialog::slotUpdateFilter() { QString pattern =3D mUi->filtercustom->text(); if (mUi->atTheBeginning->isChecked()) { - pattern =3D QLatin1String("|") + pattern; + pattern =3D QStringLiteral("|") + pattern; } if (mUi->atTheEnd->isChecked()) { pattern +=3D QLatin1String("|"); @@ -130,10 +130,10 @@ void AdBlockCreateFilterDialog::slotUpdateFilter() pattern +=3D QLatin1Char('$') + collapseValue; } = - pattern +=3D (collapseValue.isEmpty() ? QLatin1String("$") : QLatin1St= ring(",")) + AdBlockBlockableItemsWidget::elementType(mCurrentType); + pattern +=3D (collapseValue.isEmpty() ? QStringLiteral("$") : QStringL= iteral(",")) + AdBlockBlockableItemsWidget::elementType(mCurrentType); = if (mUi->exceptionFilter->isChecked()) { - pattern =3D QLatin1String("@@") + pattern; + pattern =3D QStringLiteral("@@") + pattern; } const int numberOfElement(mUi->applyListElement->count()); for (int i =3D 0; i < numberOfElement; ++i) { @@ -145,7 +145,7 @@ void AdBlockCreateFilterDialog::slotUpdateFilter() = if (mUi->restrictToDomain->isChecked()) { if (!mUi->restrictToDomainStr->text().isEmpty()) { - pattern +=3D QLatin1String(",domain=3D") + mUi->restrictToDoma= inStr->text(); + pattern +=3D QStringLiteral(",domain=3D") + mUi->restrictToDom= ainStr->text(); } } if (mUi->matchCase->isChecked()) { diff --git a/sieveeditor/imapfoldercompletion/selectimapfoldertreeview.cpp = b/sieveeditor/imapfoldercompletion/selectimapfoldertreeview.cpp index 7668c0d4..31e7f0b2 100644 --- a/sieveeditor/imapfoldercompletion/selectimapfoldertreeview.cpp +++ b/sieveeditor/imapfoldercompletion/selectimapfoldertreeview.cpp @@ -40,7 +40,7 @@ void SelectImapFolderTreeView::generalPaletteChanged() mTextColor =3D color; } = -void SelectImapFolderTreeView::setStatus(const LoadingStatus &status) +void SelectImapFolderTreeView::setStatus(LoadingStatus status) { mStatus =3D status; } diff --git a/sieveeditor/imapfoldercompletion/selectimapfoldertreeview.h b/= sieveeditor/imapfoldercompletion/selectimapfoldertreeview.h index d80e2042..c8a8f1c4 100644 --- a/sieveeditor/imapfoldercompletion/selectimapfoldertreeview.h +++ b/sieveeditor/imapfoldercompletion/selectimapfoldertreeview.h @@ -35,7 +35,7 @@ public: Failed }; = - void setStatus(const LoadingStatus &status); + void setStatus(LoadingStatus status); = protected: void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;