Commit 214b10bf authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use openStateConfig for storing window size

parent b7fe8bbb
Pipeline #56707 passed with stage
in 28 minutes and 24 seconds
......@@ -108,7 +108,7 @@ void FollowUpReminderNoAnswerDialog::setInfo(const QList<FollowUpReminder::Follo
void FollowUpReminderNoAnswerDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), DialogGroup);
KConfigGroup group(KSharedConfig::openStateConfig(), DialogGroup);
const QSize sizeDialog = group.readEntry("Size", QSize(800, 600));
if (sizeDialog.isValid()) {
resize(sizeDialog);
......@@ -118,7 +118,7 @@ void FollowUpReminderNoAnswerDialog::readConfig()
void FollowUpReminderNoAnswerDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), DialogGroup);
KConfigGroup group(KSharedConfig::openStateConfig(), DialogGroup);
group.writeEntry("Size", size());
mWidget->saveTreeWidgetHeader(group);
}
......
......@@ -81,7 +81,7 @@ void SendLaterConfigureDialog::slotNeedToReloadConfig()
void SendLaterConfigureDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "SendLaterConfigureDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "SendLaterConfigureDialog");
const QSize sizeDialog = group.readEntry("Size", QSize(800, 600));
if (sizeDialog.isValid()) {
resize(sizeDialog);
......@@ -91,7 +91,7 @@ void SendLaterConfigureDialog::readConfig()
void SendLaterConfigureDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "SendLaterConfigureDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "SendLaterConfigureDialog");
group.writeEntry("Size", size());
mWidget->saveTreeWidgetHeader(group);
}
......@@ -66,7 +66,7 @@ AttachPropertyDialog::~AttachPropertyDialog()
void AttachPropertyDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "AttachPropertyDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "AttachPropertyDialog");
const QSize size = group.readEntry("Size", QSize(500, 400));
if (size.isValid()) {
resize(size);
......@@ -75,7 +75,7 @@ void AttachPropertyDialog::readConfig()
void AttachPropertyDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "AttachPropertyDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "AttachPropertyDialog");
group.writeEntry("Size", size());
group.sync();
}
......
......@@ -71,7 +71,7 @@ void MessagePropertyDialog::slotSaveProperty()
void MessagePropertyDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "MessagePropertyDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "MessagePropertyDialog");
const QSize size = group.readEntry("Size", QSize(600, 400));
if (size.isValid()) {
resize(size);
......@@ -84,7 +84,7 @@ void MessagePropertyDialog::readConfig()
void MessagePropertyDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "MessagePropertyDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "MessagePropertyDialog");
group.writeEntry("Size", size());
group.writeEntry("HeaderState", mListView->header()->saveState());
group.sync();
......
......@@ -721,7 +721,7 @@ GpgSettingsDialog::~GpgSettingsDialog()
void GpgSettingsDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "GpgSettingsDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "GpgSettingsDialog");
const QSize size = group.readEntry("Size", QSize(600, 400));
if (size.isValid()) {
resize(size);
......@@ -730,7 +730,7 @@ void GpgSettingsDialog::readConfig()
void GpgSettingsDialog::saveConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "GpgSettingsDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "GpgSettingsDialog");
group.writeEntry("Size", size());
group.sync();
}
......@@ -49,7 +49,7 @@ void PotentialPhishingDetailDialog::fillList(const QStringList &lst)
void PotentialPhishingDetailDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "PotentialPhishingDetailDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "PotentialPhishingDetailDialog");
const QSize sizeDialog = group.readEntry("Size", QSize(800, 600));
if (sizeDialog.isValid()) {
resize(sizeDialog);
......@@ -58,7 +58,7 @@ void PotentialPhishingDetailDialog::readConfig()
void PotentialPhishingDetailDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "PotentialPhishingDetailDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "PotentialPhishingDetailDialog");
group.writeEntry("Size", size());
}
......
......@@ -22,6 +22,6 @@ public:
void fillList(const QStringList &lst);
private:
QListWidget *const mListWidget = nullptr;
QListWidget *const mListWidget;
};
......@@ -137,7 +137,7 @@ IncompleteIndexDialog::~IncompleteIndexDialog()
void IncompleteIndexDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "IncompleteIndexDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "IncompleteIndexDialog");
const QSize size = group.readEntry("Size", QSize(500, 400));
if (size.isValid()) {
resize(size);
......@@ -146,7 +146,7 @@ void IncompleteIndexDialog::readConfig()
void IncompleteIndexDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "IncompleteIndexDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "IncompleteIndexDialog");
group.writeEntry("Size", size());
group.sync();
}
......
......@@ -78,7 +78,7 @@ TagSelectDialog::~TagSelectDialog()
void TagSelectDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "TagSelectDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "TagSelectDialog");
const QSize size = group.readEntry("Size", QSize(500, 300));
if (size.isValid()) {
resize(size);
......@@ -87,7 +87,7 @@ void TagSelectDialog::readConfig()
void TagSelectDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "TagSelectDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "TagSelectDialog");
group.writeEntry("Size", size());
}
......
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