Commit 7f774c46 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use directly "static const char" for config group name for avoiding

to make bug
parent 35576188
......@@ -34,6 +34,7 @@ void RemoteContentMenu::initialize()
void RemoteContentMenu::slotConfigure()
{
qDebug() << " void RemoteContentMenu::slotConfigure()";
QPointer<MessageViewer::RemoteContentConfigureDialog> remoteContentDialog = new MessageViewer::RemoteContentConfigureDialog(this);
remoteContentDialog->exec();
delete remoteContentDialog;
......
......@@ -27,7 +27,10 @@
#include <memory>
using namespace MessageViewer;
namespace
{
static const char myScamDetectionDetailsDialogConfigGroupName[] = "ScamDetectionDetailsDialog";
}
ScamDetectionDetailsDialog::ScamDetectionDetailsDialog(QWidget *parent)
: QDialog(parent)
{
......@@ -90,7 +93,7 @@ void ScamDetectionDetailsDialog::setDetails(const QString &details)
void ScamDetectionDetailsDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "ScamDetectionDetailsDialog");
KConfigGroup group(KSharedConfig::openConfig(), myScamDetectionDetailsDialogConfigGroupName);
const QSize size = group.readEntry("Size", QSize(600, 400));
if (size.isValid()) {
resize(size);
......@@ -99,7 +102,7 @@ void ScamDetectionDetailsDialog::readConfig()
void ScamDetectionDetailsDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "ScamDetectionDetailsDialog");
KConfigGroup group(KSharedConfig::openConfig(), myScamDetectionDetailsDialogConfigGroupName);
group.writeEntry("Size", size());
group.sync();
}
......@@ -14,7 +14,10 @@
#include <QHeaderView>
using namespace MessageViewer;
namespace
{
static const char myMimePartTreeViewConfigGroupName[] = "MimePartTree";
}
MimePartTreeView::MimePartTreeView(QWidget *parent)
: QTreeView(parent)
{
......@@ -45,13 +48,13 @@ MimeTreeModel *MimePartTreeView::mimePartModel() const
void MimePartTreeView::restoreMimePartTreeConfig()
{
KConfigGroup grp(KSharedConfig::openConfig(), "MimePartTree");
KConfigGroup grp(KSharedConfig::openConfig(), myMimePartTreeViewConfigGroupName);
header()->restoreState(grp.readEntry("State", QByteArray()));
}
void MimePartTreeView::saveMimePartTreeConfig()
{
KConfigGroup grp(KSharedConfig::openConfig(), "MimePartTree");
KConfigGroup grp(KSharedConfig::openConfig(), myMimePartTreeViewConfigGroupName);
grp.writeEntry("State", header()->saveState());
}
......
......@@ -31,7 +31,10 @@ using namespace MessageViewer;
#include <QWebEnginePage>
using namespace MessageViewer;
namespace
{
static const char myMailSourceWebEngineViewerConfigGroupName[] = "MailSourceWebEngineViewer";
}
MailSourceWebEngineViewer::MailSourceWebEngineViewer(QWidget *parent)
: QDialog(parent)
{
......@@ -82,7 +85,7 @@ MailSourceWebEngineViewer::~MailSourceWebEngineViewer()
void MailSourceWebEngineViewer::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "MailSourceWebEngineViewer");
KConfigGroup group(KSharedConfig::openConfig(), myMailSourceWebEngineViewerConfigGroupName);
const QSize size = group.readEntry("Size", QSize(600, 400));
if (size.isValid()) {
resize(size);
......@@ -91,7 +94,7 @@ void MailSourceWebEngineViewer::readConfig()
void MailSourceWebEngineViewer::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "MailSourceWebEngineViewer");
KConfigGroup group(KSharedConfig::openConfig(), myMailSourceWebEngineViewerConfigGroupName);
group.writeEntry("Size", size());
group.sync();
}
......
......@@ -14,6 +14,10 @@
#include <QVBoxLayout>
using namespace MessageViewer;
namespace
{
static const char myMailTrackingDetailsDialogConfigGroupName[] = "MailTrackingDetailsDialog";
}
MailTrackingDetailsDialog::MailTrackingDetailsDialog(QWidget *parent)
: QDialog(parent)
{
......@@ -44,7 +48,7 @@ MailTrackingDetailsDialog::~MailTrackingDetailsDialog()
void MailTrackingDetailsDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "MailTrackingDetailsDialog");
KConfigGroup group(KSharedConfig::openConfig(), myMailTrackingDetailsDialogConfigGroupName);
const QSize size = group.readEntry("Size", QSize(600, 400));
if (size.isValid()) {
resize(size);
......@@ -53,7 +57,7 @@ void MailTrackingDetailsDialog::readConfig()
void MailTrackingDetailsDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "MailTrackingDetailsDialog");
KConfigGroup group(KSharedConfig::openConfig(), myMailTrackingDetailsDialogConfigGroupName);
group.writeEntry("Size", size());
group.sync();
}
......
......@@ -24,7 +24,10 @@ using KContacts::VCardConverter;
#include <QVBoxLayout>
using namespace MessageViewer;
namespace
{
static const char myVCardViewerConfigGroupName[] = "VCardViewer";
}
VCardViewer::VCardViewer(QWidget *parent, const QByteArray &vCard)
: QDialog(parent)
{
......@@ -82,7 +85,7 @@ VCardViewer::~VCardViewer()
void VCardViewer::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "VCardViewer");
KConfigGroup group(KSharedConfig::openConfig(), myVCardViewerConfigGroupName);
const QSize size = group.readEntry("Size", QSize(300, 400));
if (size.isValid()) {
resize(size);
......@@ -91,7 +94,7 @@ void VCardViewer::readConfig()
void VCardViewer::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "VCardViewer");
KConfigGroup group(KSharedConfig::openConfig(), myVCardViewerConfigGroupName);
group.writeEntry("Size", size());
group.sync();
}
......
Markdown is supported
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