summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2016-07-19 13:19:49 +0200
committerMontel Laurent <[email protected]>2016-07-19 13:19:49 +0200
commitd27e52b2c66b65a64c699aea0ad62171a1f802bd (patch)
tree862b1439d576852cb1cfccb6efa5820ed6630765
parentf258bfb77b0f4676feb31af12e28ff09b1d5fec0 (diff)
Minor
-rw-r--r--kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsjob.cpp4
-rw-r--r--kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactstabwidget.cpp7
2 files changed, 7 insertions, 4 deletions
diff --git a/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsjob.cpp b/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsjob.cpp
index ec8993e..855153a 100644
--- a/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsjob.cpp
+++ b/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsjob.cpp
@@ -112,11 +112,11 @@ void AutomaticAddContactsJob::slotFetchAllCollections(KJob *job)
const int nbItemCollection(canCreateItemCollections.size());
if (nbItemCollection == 0) {
if (KMessageBox::questionYesNo(
- 0,
+ Q_NULLPTR,
i18nc("@info",
"You must create an address book before adding a contact. Do you want to create an address book?"),
i18nc("@title:window", "No Address Book Available")) == KMessageBox::Yes) {
- Akonadi::AgentTypeDialog dlg(0);
+ Akonadi::AgentTypeDialog dlg(Q_NULLPTR);
dlg.setWindowTitle(i18n("Add Address Book"));
dlg.agentFilterProxyModel()->addMimeTypeFilter(KContacts::Addressee::mimeType());
dlg.agentFilterProxyModel()->addMimeTypeFilter(KContacts::ContactGroup::mimeType());
diff --git a/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactstabwidget.cpp b/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactstabwidget.cpp
index b3f2b3b..e530a2e 100644
--- a/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactstabwidget.cpp
+++ b/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactstabwidget.cpp
@@ -28,6 +28,9 @@
#include <KConfigGroup>
#include <KSharedConfig>
+namespace {
+QString configGroupName() { return QStringLiteral("Automatic Add Contacts %1"); }
+}
AutomaticAddContactsTabWidget::AutomaticAddContactsTabWidget(QWidget *parent, QAbstractItemModel *model)
: QWidget(parent),
mIdentity(0)
@@ -76,7 +79,7 @@ void AutomaticAddContactsTabWidget::resetSettings()
void AutomaticAddContactsTabWidget::loadSettings()
{
KSharedConfig::Ptr config = KSharedConfig::openConfig();
- KConfigGroup grp = config->group(QStringLiteral("Automatic Add Contacts %1").arg(mIdentity));
+ KConfigGroup grp = config->group(configGroupName().arg(mIdentity));
mEnabled->setChecked(grp.readEntry("Enabled", false));
mCollectionCombobox->setDefaultCollection(Akonadi::Collection(grp.readEntry("Collection", -1)));
}
@@ -89,7 +92,7 @@ void AutomaticAddContactsTabWidget::setIdentity(uint identity)
void AutomaticAddContactsTabWidget::saveSettings()
{
KSharedConfig::Ptr config = KSharedConfig::openConfig();
- KConfigGroup grp = config->group(QStringLiteral("Automatic Add Contacts %1").arg(mIdentity));
+ KConfigGroup grp = config->group(configGroupName().arg(mIdentity));
grp.writeEntry("Enabled", mEnabled->isChecked());
grp.writeEntry("Collection", mCollectionCombobox->currentCollection().id());
}