Commit 71fccc8b authored by Laurent Montel's avatar Laurent Montel
Browse files

USe namespace for groupname

parent 668bd01a
......@@ -18,6 +18,10 @@
#include <QVBoxLayout>
using namespace MailCommon;
namespace
{
static const char myFilterActionMissingAccountDialogConfigGroupName[] = "FilterActionMissingAccountDialog";
}
FilterActionMissingAccountDialog::FilterActionMissingAccountDialog(const QStringList &lstAccount, const QString &filtername, QWidget *parent)
: QDialog(parent)
......@@ -57,7 +61,7 @@ FilterActionMissingAccountDialog::~FilterActionMissingAccountDialog()
void FilterActionMissingAccountDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openStateConfig(), "FilterActionMissingAccountDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), myFilterActionMissingAccountDialogConfigGroupName);
const QSize size = group.readEntry("Size", QSize(500, 300));
if (size.isValid()) {
......@@ -67,7 +71,7 @@ void FilterActionMissingAccountDialog::readConfig()
void FilterActionMissingAccountDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openStateConfig(), "FilterActionMissingAccountDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), myFilterActionMissingAccountDialogConfigGroupName);
group.writeEntry("Size", size());
}
......
......@@ -22,6 +22,10 @@
#include <QListWidget>
#include <QPushButton>
#include <QVBoxLayout>
namespace
{
static const char myFilterActionMissingCollectionDialogConfigGroupName[] = "FilterActionMissingCollectionDialog";
}
FilterActionMissingFolderDialog::FilterActionMissingFolderDialog(const Akonadi::Collection::List &list,
const QString &filtername,
......@@ -92,7 +96,7 @@ FilterActionMissingFolderDialog::~FilterActionMissingFolderDialog()
void FilterActionMissingFolderDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openStateConfig(), "FilterActionMissingCollectionDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), myFilterActionMissingCollectionDialogConfigGroupName);
const QSize size = group.readEntry("Size", QSize(500, 300));
if (size.isValid()) {
......@@ -102,7 +106,7 @@ void FilterActionMissingFolderDialog::readConfig()
void FilterActionMissingFolderDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openStateConfig(), "FilterActionMissingCollectionDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), myFilterActionMissingCollectionDialogConfigGroupName);
group.writeEntry("Size", size());
}
......
......@@ -19,7 +19,10 @@
#include <KIdentityManagement/IdentityCombo>
using namespace MailCommon;
namespace
{
static const char myFilterActionMissingIdentityDialogConfigGroupName[] = "FilterActionMissingIdentityDialog";
}
FilterActionMissingIdentityDialog::FilterActionMissingIdentityDialog(const QString &filtername, QWidget *parent)
: QDialog(parent)
{
......@@ -59,7 +62,7 @@ FilterActionMissingIdentityDialog::~FilterActionMissingIdentityDialog()
void FilterActionMissingIdentityDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openStateConfig(), "FilterActionMissingMissingIdentity");
KConfigGroup group(KSharedConfig::openStateConfig(), myFilterActionMissingIdentityDialogConfigGroupName);
const QSize size = group.readEntry("Size", QSize(500, 300));
if (size.isValid()) {
......@@ -69,7 +72,7 @@ void FilterActionMissingIdentityDialog::readConfig()
void FilterActionMissingIdentityDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openStateConfig(), "FilterActionMissingMissingIdentity");
KConfigGroup group(KSharedConfig::openStateConfig(), myFilterActionMissingIdentityDialogConfigGroupName);
group.writeEntry("Size", size());
}
......
......@@ -16,6 +16,10 @@
#include <QVBoxLayout>
using namespace MailCommon;
namespace
{
static const char myFilterActionMissingSoundUrlDialogGroupName[] = "FilterActionMissingSoundUrlDialog";
}
FilterActionMissingSoundUrlDialog::FilterActionMissingSoundUrlDialog(const QString &filtername, const QString &argStr, QWidget *parent)
: QDialog(parent)
......@@ -65,7 +69,7 @@ QString FilterActionMissingSoundUrlDialog::soundUrl() const
void FilterActionMissingSoundUrlDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openStateConfig(), "FilterActionMissingSoundUrlDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), myFilterActionMissingSoundUrlDialogGroupName);
const QSize size = group.readEntry("Size", QSize(500, 300));
if (size.isValid()) {
......@@ -75,6 +79,6 @@ void FilterActionMissingSoundUrlDialog::readConfig()
void FilterActionMissingSoundUrlDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openStateConfig(), "FilterActionMissingSoundUrlDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), myFilterActionMissingSoundUrlDialogGroupName);
group.writeEntry("Size", size());
}
......@@ -19,6 +19,10 @@
#include <QVBoxLayout>
using namespace MailCommon;
namespace
{
static const char myFilterActionMissingTagDialogGroupName[] = "FilterActionMissingTagDialog";
}
FilterActionMissingTagDialog::FilterActionMissingTagDialog(const QMap<QUrl, QString> &tagList,
const QString &filtername,
......@@ -80,7 +84,7 @@ FilterActionMissingTagDialog::~FilterActionMissingTagDialog()
void FilterActionMissingTagDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openStateConfig(), "FilterActionMissingTagDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), myFilterActionMissingTagDialogGroupName);
const QSize size = group.readEntry("Size", QSize(500, 300));
if (size.isValid()) {
......@@ -90,7 +94,7 @@ void FilterActionMissingTagDialog::readConfig()
void FilterActionMissingTagDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openStateConfig(), "FilterActionMissingTagDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), myFilterActionMissingTagDialogGroupName);
group.writeEntry("Size", size());
}
......
......@@ -18,7 +18,10 @@
#include <QVBoxLayout>
using namespace MailCommon;
namespace
{
static const char myFilterActionMissingTemplateDialogGroupName[] = "FilterActionMissingTemplateDialog";
}
FilterActionMissingTemplateDialog::FilterActionMissingTemplateDialog(const QStringList &templateList, const QString &filtername, QWidget *parent)
: QDialog(parent)
, mComboBoxTemplate(new QComboBox(this))
......@@ -57,7 +60,7 @@ FilterActionMissingTemplateDialog::~FilterActionMissingTemplateDialog()
void FilterActionMissingTemplateDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openStateConfig(), "FilterActionMissingTemplateDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), myFilterActionMissingTemplateDialogGroupName);
const QSize size = group.readEntry("Size", QSize(500, 300));
if (size.isValid()) {
......@@ -67,7 +70,7 @@ void FilterActionMissingTemplateDialog::readConfig()
void FilterActionMissingTemplateDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openStateConfig(), "FilterActionMissingTemplateDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), myFilterActionMissingTemplateDialogGroupName);
group.writeEntry("Size", size());
}
......
......@@ -17,7 +17,10 @@
#include <MailTransport/TransportComboBox>
using namespace MailCommon;
namespace
{
static const char myFilterActionMissingTransportDialogGroupName[] = "FilterActionMissingTransportDialog";
}
FilterActionMissingTransportDialog::FilterActionMissingTransportDialog(const QString &filtername, QWidget *parent)
: QDialog(parent)
, mComboBoxTransport(new MailTransport::TransportComboBox(this))
......@@ -54,7 +57,7 @@ FilterActionMissingTransportDialog::~FilterActionMissingTransportDialog()
void FilterActionMissingTransportDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openStateConfig(), "FilterActionMissingTransportDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), myFilterActionMissingTransportDialogGroupName);
const QSize size = group.readEntry("Size", QSize(500, 300));
if (size.isValid()) {
......@@ -64,7 +67,7 @@ void FilterActionMissingTransportDialog::readConfig()
void FilterActionMissingTransportDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openStateConfig(), "FilterActionMissingTransportDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), myFilterActionMissingTransportDialogGroupName);
group.writeEntry("Size", size());
}
......
......@@ -15,7 +15,10 @@
#include <QVBoxLayout>
using namespace MailCommon;
namespace
{
static const char mySelectThunderbirdFilterFilesDialogGroupName[] = "SelectThunderbirdFilterFilesDialog";
}
SelectThunderbirdFilterFilesDialog::SelectThunderbirdFilterFilesDialog(const QString &defaultSettingPath, QWidget *parent)
: QDialog(parent)
, mSelectFilterFilesWidget(new MailCommon::SelectThunderbirdFilterFilesWidget(defaultSettingPath, this))
......@@ -55,7 +58,7 @@ void SelectThunderbirdFilterFilesDialog::setStartDir(const QUrl &url)
void SelectThunderbirdFilterFilesDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openStateConfig(), "SelectThunderbirdFilterFilesDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), mySelectThunderbirdFilterFilesDialogGroupName);
const QSize size = group.readEntry("Size", QSize(500, 300));
if (size.isValid()) {
......@@ -65,6 +68,6 @@ void SelectThunderbirdFilterFilesDialog::readConfig()
void SelectThunderbirdFilterFilesDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openStateConfig(), "SelectThunderbirdFilterFilesDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), mySelectThunderbirdFilterFilesDialogGroupName);
group.writeEntry("Size", size());
}
......@@ -22,7 +22,10 @@
#include <QVBoxLayout>
using namespace MailCommon;
namespace
{
static const char myFilterConvertToSieveResultDialogName[] = "FilterConvertToSieveResultDialog";
}
FilterConvertToSieveResultDialog::FilterConvertToSieveResultDialog(QWidget *parent)
: QDialog(parent)
, mEditor(new KPIMTextEdit::PlainTextEditorWidget(this))
......@@ -75,8 +78,6 @@ void FilterConvertToSieveResultDialog::setCode(const QString &code)
mEditor->editor()->setPlainText(code);
}
static const char myFilterConvertToSieveResultDialogName[] = "FilterConvertToSieveResultDialog";
void FilterConvertToSieveResultDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openStateConfig(), myFilterConvertToSieveResultDialogName);
......
......@@ -17,7 +17,10 @@
#include <QVBoxLayout>
using namespace MailCommon;
namespace
{
static const char myFilterSelectionDialogName[] = "FilterSelectionDialog";
}
FilterSelectionDialog::FilterSelectionDialog(QWidget *parent)
: QDialog(parent)
, filtersListWidget(new QListWidget(this))
......@@ -70,13 +73,13 @@ void FilterSelectionDialog::reject()
void FilterSelectionDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openStateConfig(), "FilterSelectionDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), myFilterSelectionDialogName);
group.writeEntry("Size", size());
}
void FilterSelectionDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openStateConfig(), "FilterSelectionDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), myFilterSelectionDialogName);
const QSize sizeDialog = group.readEntry("Size", QSize(300, 350));
if (sizeDialog.isValid()) {
resize(sizeDialog);
......
......@@ -15,7 +15,10 @@
#include <QVBoxLayout>
using namespace MailCommon;
namespace
{
static const char myInvalidFilterDialogName[] = "InvalidFilterDialog";
}
InvalidFilterDialog::InvalidFilterDialog(QWidget *parent)
: QDialog(parent)
, mInvalidFilterWidget(new InvalidFilterWidget(this))
......@@ -62,13 +65,13 @@ void InvalidFilterDialog::setInvalidFilters(const QVector<InvalidFilterInfo> &ls
void InvalidFilterDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openStateConfig(), "InvalidFilterDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), myInvalidFilterDialogName);
group.writeEntry("Size", size());
}
void InvalidFilterDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openStateConfig(), "InvalidFilterDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), myInvalidFilterDialogName);
const QSize sizeDialog = group.readEntry("Size", QSize(400, 500));
if (sizeDialog.isValid()) {
resize(sizeDialog);
......
......@@ -24,7 +24,10 @@
#include <QListWidget>
using namespace MailCommon;
namespace
{
static const char myAccountConfigOrderDialogName[] = "AccountConfigOrderDialog";
}
struct InstanceStruct {
QString name;
QIcon icon;
......@@ -234,7 +237,7 @@ void AccountConfigOrderDialog::slotOk()
void AccountConfigOrderDialog::readConfig()
{
KConfigGroup accountConfigDialog(d->mSettings->config(), "AccountConfigOrderDialog");
KConfigGroup accountConfigDialog(d->mSettings->config(), myAccountConfigOrderDialogName);
const QSize size = accountConfigDialog.readEntry("Size", QSize(600, 400));
if (size.isValid()) {
resize(size);
......@@ -243,7 +246,7 @@ void AccountConfigOrderDialog::readConfig()
void AccountConfigOrderDialog::writeConfig()
{
KConfigGroup accountConfigDialog(d->mSettings->config(), "AccountConfigOrderDialog");
KConfigGroup accountConfigDialog(d->mSettings->config(), myAccountConfigOrderDialogName);
accountConfigDialog.writeEntry("Size", size());
accountConfigDialog.sync();
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment