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)
void DistributionListDialog::readConfig()
{
KSharedConfig::Ptr cfg = KSharedConfig::openConfig();
KSharedConfig::Ptr cfg = KSharedConfig::openStateConfig();
KConfigGroup group(cfg, "DistributionListDialog");
const QSize size = group.readEntry("Size", QSize());
if (!size.isEmpty()) {
......@@ -343,7 +343,7 @@ void DistributionListDialog::readConfig()
void DistributionListDialog::writeConfig()
{
KSharedConfig::Ptr cfg = KSharedConfig::openConfig();
KSharedConfig::Ptr cfg = KSharedConfig::openStateConfig();
KConfigGroup group(cfg, "DistributionListDialog");
group.writeEntry("Size", size());
group.writeEntry("Header", mRecipientsList->header()->saveState());
......
......@@ -182,7 +182,7 @@ void RecipientsPicker::keyPressEvent(QKeyEvent *event)
void RecipientsPicker::readConfig()
{
KSharedConfig::Ptr cfg = KSharedConfig::openConfig();
KSharedConfig::Ptr cfg = KSharedConfig::openStateConfig();
KConfigGroup group(cfg, "RecipientsPicker");
QSize size = group.readEntry("Size", QSize());
if (!size.isEmpty()) {
......@@ -192,7 +192,7 @@ void RecipientsPicker::readConfig()
void RecipientsPicker::writeConfig()
{
KSharedConfig::Ptr cfg = KSharedConfig::openConfig();
KSharedConfig::Ptr cfg = KSharedConfig::openStateConfig();
KConfigGroup group(cfg, "RecipientsPicker");
group.writeEntry("Size", size());
}
......
......@@ -48,13 +48,13 @@ MimeTreeModel *MimePartTreeView::mimePartModel() const
void MimePartTreeView::restoreMimePartTreeConfig()
{
KConfigGroup grp(KSharedConfig::openConfig(), myMimePartTreeViewConfigGroupName);
KConfigGroup grp(KSharedConfig::openStateConfig(), myMimePartTreeViewConfigGroupName);
header()->restoreState(grp.readEntry("State", QByteArray()));
}
void MimePartTreeView::saveMimePartTreeConfig()
{
KConfigGroup grp(KSharedConfig::openConfig(), myMimePartTreeViewConfigGroupName);
KConfigGroup grp(KSharedConfig::openStateConfig(), myMimePartTreeViewConfigGroupName);
grp.writeEntry("State", header()->saveState());
}
......
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