Commit e0a857bf authored by Laurent Montel's avatar Laurent Montel 😁

Use directly KSharedConfig::openConfig()

parent 5573ec01
......@@ -103,7 +103,7 @@ void ScamDetectionDetailsDialog::setDetails(const QString &details)
void ScamDetectionDetailsDialog::readConfig()
{
KConfigGroup group(
MessageViewer::MessageViewerSettings::self()->config(), "ScamDetectionDetailsDialog");
KSharedConfig::openConfig(), "ScamDetectionDetailsDialog");
const QSize size = group.readEntry("Size", QSize(600, 400));
if (size.isValid()) {
resize(size);
......@@ -113,7 +113,7 @@ void ScamDetectionDetailsDialog::readConfig()
void ScamDetectionDetailsDialog::writeConfig()
{
KConfigGroup group(
MessageViewer::MessageViewerSettings::self()->config(), "ScamDetectionDetailsDialog");
KSharedConfig::openConfig(), "ScamDetectionDetailsDialog");
group.writeEntry("Size", size());
group.sync();
}
......@@ -58,13 +58,13 @@ MimeTreeModel *MimePartTreeView::mimePartModel() const
void MimePartTreeView::restoreMimePartTreeConfig()
{
KConfigGroup grp(MessageViewer::MessageViewerSettings::self()->config(), "MimePartTree");
KConfigGroup grp(KSharedConfig::openConfig(), "MimePartTree");
header()->restoreState(grp.readEntry("State", QByteArray()));
}
void MimePartTreeView::saveMimePartTreeConfig()
{
KConfigGroup grp(MessageViewer::MessageViewerSettings::self()->config(), "MimePartTree");
KConfigGroup grp(KSharedConfig::openConfig(), "MimePartTree");
grp.writeEntry("State", header()->saveState());
}
......
......@@ -182,7 +182,7 @@ QString HtmlStatusBar::toolTip() const
QColor HtmlStatusBar::fgColor() const
{
KConfigGroup conf(MessageViewer::MessageViewerSettings::self()->config(), "Reader");
KConfigGroup conf(KSharedConfig::openConfig(), "Reader");
QColor defaultColor, color;
switch (mode()) {
case MimeTreeParser::Util::Html:
......@@ -209,7 +209,7 @@ QColor HtmlStatusBar::fgColor() const
QColor HtmlStatusBar::bgColor() const
{
KConfigGroup conf(MessageViewer::MessageViewerSettings::self()->config(), "Reader");
KConfigGroup conf(KSharedConfig::openConfig(), "Reader");
QColor defaultColor, color;
switch (mode()) {
......
......@@ -98,7 +98,7 @@ VCardViewer::~VCardViewer()
void VCardViewer::readConfig()
{
KConfigGroup group(MessageViewer::MessageViewerSettings::self()->config(), "VCardViewer");
KConfigGroup group(KSharedConfig::openConfig(), "VCardViewer");
const QSize size = group.readEntry("Size", QSize(300, 400));
if (size.isValid()) {
resize(size);
......@@ -107,7 +107,7 @@ void VCardViewer::readConfig()
void VCardViewer::writeConfig()
{
KConfigGroup group(MessageViewer::MessageViewerSettings::self()->config(), "VCardViewer");
KConfigGroup group(KSharedConfig::openConfig(), "VCardViewer");
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