Commit e5330ea1 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use KSharedConfig::openStateConfig for size only

parent 25ee01bd
Pipeline #74259 passed with stage
in 41 minutes and 32 seconds
...@@ -332,7 +332,7 @@ void DistributionListDialog::slotTitleChanged(const QString &text) ...@@ -332,7 +332,7 @@ void DistributionListDialog::slotTitleChanged(const QString &text)
void DistributionListDialog::readConfig() void DistributionListDialog::readConfig()
{ {
KSharedConfig::Ptr cfg = KSharedConfig::openConfig(); KSharedConfig::Ptr cfg = KSharedConfig::openStateConfig();
KConfigGroup group(cfg, "DistributionListDialog"); KConfigGroup group(cfg, "DistributionListDialog");
const QSize size = group.readEntry("Size", QSize()); const QSize size = group.readEntry("Size", QSize());
if (!size.isEmpty()) { if (!size.isEmpty()) {
...@@ -343,7 +343,7 @@ void DistributionListDialog::readConfig() ...@@ -343,7 +343,7 @@ void DistributionListDialog::readConfig()
void DistributionListDialog::writeConfig() void DistributionListDialog::writeConfig()
{ {
KSharedConfig::Ptr cfg = KSharedConfig::openConfig(); KSharedConfig::Ptr cfg = KSharedConfig::openStateConfig();
KConfigGroup group(cfg, "DistributionListDialog"); KConfigGroup group(cfg, "DistributionListDialog");
group.writeEntry("Size", size()); group.writeEntry("Size", size());
group.writeEntry("Header", mRecipientsList->header()->saveState()); group.writeEntry("Header", mRecipientsList->header()->saveState());
......
...@@ -182,7 +182,7 @@ void RecipientsPicker::keyPressEvent(QKeyEvent *event) ...@@ -182,7 +182,7 @@ void RecipientsPicker::keyPressEvent(QKeyEvent *event)
void RecipientsPicker::readConfig() void RecipientsPicker::readConfig()
{ {
KSharedConfig::Ptr cfg = KSharedConfig::openConfig(); KSharedConfig::Ptr cfg = KSharedConfig::openStateConfig();
KConfigGroup group(cfg, "RecipientsPicker"); KConfigGroup group(cfg, "RecipientsPicker");
QSize size = group.readEntry("Size", QSize()); QSize size = group.readEntry("Size", QSize());
if (!size.isEmpty()) { if (!size.isEmpty()) {
...@@ -192,7 +192,7 @@ void RecipientsPicker::readConfig() ...@@ -192,7 +192,7 @@ void RecipientsPicker::readConfig()
void RecipientsPicker::writeConfig() void RecipientsPicker::writeConfig()
{ {
KSharedConfig::Ptr cfg = KSharedConfig::openConfig(); KSharedConfig::Ptr cfg = KSharedConfig::openStateConfig();
KConfigGroup group(cfg, "RecipientsPicker"); KConfigGroup group(cfg, "RecipientsPicker");
group.writeEntry("Size", size()); group.writeEntry("Size", size());
} }
......
...@@ -48,13 +48,13 @@ MimeTreeModel *MimePartTreeView::mimePartModel() const ...@@ -48,13 +48,13 @@ MimeTreeModel *MimePartTreeView::mimePartModel() const
void MimePartTreeView::restoreMimePartTreeConfig() void MimePartTreeView::restoreMimePartTreeConfig()
{ {
KConfigGroup grp(KSharedConfig::openConfig(), myMimePartTreeViewConfigGroupName); KConfigGroup grp(KSharedConfig::openStateConfig(), myMimePartTreeViewConfigGroupName);
header()->restoreState(grp.readEntry("State", QByteArray())); header()->restoreState(grp.readEntry("State", QByteArray()));
} }
void MimePartTreeView::saveMimePartTreeConfig() void MimePartTreeView::saveMimePartTreeConfig()
{ {
KConfigGroup grp(KSharedConfig::openConfig(), myMimePartTreeViewConfigGroupName); KConfigGroup grp(KSharedConfig::openStateConfig(), myMimePartTreeViewConfigGroupName);
grp.writeEntry("State", header()->saveState()); grp.writeEntry("State", header()->saveState());
} }
......
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