Commit 0015087c authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use openStateConfig for storing window size

parent db809b56
Pipeline #56722 passed with stage
in 21 minutes and 56 seconds
......@@ -70,7 +70,7 @@ QString AutoCreateScriptDialog::script(QStringList &required) const
void AutoCreateScriptDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "AutoCreateScriptDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "AutoCreateScriptDialog");
const QSize sizeDialog = group.readEntry("Size", QSize(800, 600));
if (sizeDialog.isValid()) {
resize(sizeDialog);
......@@ -79,7 +79,7 @@ void AutoCreateScriptDialog::readConfig()
void AutoCreateScriptDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "AutoCreateScriptDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "AutoCreateScriptDialog");
group.writeEntry("Size", size());
}
......
......@@ -47,7 +47,7 @@ SelectFlagsListDialog::~SelectFlagsListDialog()
void SelectFlagsListDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "SelectFlagsListDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "SelectFlagsListDialog");
const QSize sizeDialog = group.readEntry("Size", QSize(300, 200));
if (sizeDialog.isValid()) {
resize(sizeDialog);
......@@ -56,7 +56,7 @@ void SelectFlagsListDialog::readConfig()
void SelectFlagsListDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "SelectFlagsListDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "SelectFlagsListDialog");
group.writeEntry("Size", size());
}
......
......@@ -84,7 +84,7 @@ SelectHeadersDialog::~SelectHeadersDialog()
void SelectHeadersDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "SelectHeadersDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "SelectHeadersDialog");
const QSize size = group.readEntry("Size", QSize(400, 300));
if (size.isValid()) {
resize(size);
......@@ -93,7 +93,7 @@ void SelectHeadersDialog::readConfig()
void SelectHeadersDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "SelectHeadersDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "SelectHeadersDialog");
group.writeEntry("Size", size());
group.sync();
}
......
......@@ -66,14 +66,14 @@ void SieveEditorGraphicalModeWidget::loadScript(const QString &doc, QString &err
void SieveEditorGraphicalModeWidget::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "AutoCreateScriptDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "AutoCreateScriptDialog");
const QList<int> size{100, 400};
mSplitter->setSizes(group.readEntry("mainSplitter", size));
}
void SieveEditorGraphicalModeWidget::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "AutoCreateScriptDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "AutoCreateScriptDialog");
group.writeEntry("mainSplitter", mSplitter->sizes());
}
......
......@@ -54,7 +54,7 @@ QString SieveScriptDescriptionDialog::description() const
void SieveScriptDescriptionDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "SieveScriptDescriptionDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "SieveScriptDescriptionDialog");
const QSize sizeDialog = group.readEntry("Size", QSize(800, 600));
if (sizeDialog.isValid()) {
resize(sizeDialog);
......@@ -63,6 +63,6 @@ void SieveScriptDescriptionDialog::readConfig()
void SieveScriptDescriptionDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "SieveScriptDescriptionDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "SieveScriptDescriptionDialog");
group.writeEntry("Size", size());
}
......@@ -54,7 +54,7 @@ void SieveScriptParsingErrorDialog::setError(QString script, QString error)
void SieveScriptParsingErrorDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "SieveScriptParsingErrorDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "SieveScriptParsingErrorDialog");
const QSize sizeDialog = group.readEntry("Size", QSize(800, 600));
if (sizeDialog.isValid()) {
resize(sizeDialog);
......@@ -63,7 +63,7 @@ void SieveScriptParsingErrorDialog::readConfig()
void SieveScriptParsingErrorDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "SieveScriptParsingErrorDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "SieveScriptParsingErrorDialog");
group.writeEntry("Size", size());
}
......
......@@ -77,7 +77,7 @@ SieveDebugDialog::~SieveDebugDialog()
void SieveDebugDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "SieveDebugDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "SieveDebugDialog");
const QSize sizeDialog = group.readEntry("Size", QSize(640, 480));
if (sizeDialog.isValid()) {
resize(sizeDialog);
......@@ -86,7 +86,7 @@ void SieveDebugDialog::readConfig()
void SieveDebugDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "SieveDebugDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "SieveDebugDialog");
group.writeEntry("Size", size());
}
......
......@@ -98,13 +98,13 @@ void SieveEditor::slotEnableButtonOk(bool b)
void SieveEditor::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "SieveEditor");
KConfigGroup group(KSharedConfig::openStateConfig(), "SieveEditor");
group.writeEntry("Size", size());
}
void SieveEditor::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "SieveEditor");
KConfigGroup group(KSharedConfig::openStateConfig(), "SieveEditor");
const QSize sizeDialog = group.readEntry("Size", QSize(800, 600));
if (sizeDialog.isValid()) {
resize(sizeDialog);
......
......@@ -151,7 +151,7 @@ SieveEditorTextModeWidget::~SieveEditorTextModeWidget()
void SieveEditorTextModeWidget::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "SieveEditor");
KConfigGroup group(KSharedConfig::openStateConfig(), "SieveEditor");
group.writeEntry("mainSplitter", mMainSplitter->sizes());
group.writeEntry("templateSplitter", mTemplateSplitter->sizes());
}
......@@ -168,7 +168,7 @@ SieveEditorTabWidget *SieveEditorTextModeWidget::tabWidget() const
void SieveEditorTextModeWidget::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "SieveEditor");
KConfigGroup group(KSharedConfig::openStateConfig(), "SieveEditor");
const QList<int> size = {400, 100};
mMainSplitter->setSizes(group.readEntry("mainSplitter", size));
......
......@@ -49,7 +49,7 @@ void SieveInfoDialog::setServerInfo(const QStringList &serverInfos)
void SieveInfoDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), myConfigGroupName);
KConfigGroup group(KSharedConfig::openStateConfig(), myConfigGroupName);
const QSize sizeDialog = group.readEntry("Size", QSize(400, 300));
if (sizeDialog.isValid()) {
resize(sizeDialog);
......@@ -58,6 +58,6 @@ void SieveInfoDialog::readConfig()
void SieveInfoDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), myConfigGroupName);
KConfigGroup group(KSharedConfig::openStateConfig(), myConfigGroupName);
group.writeEntry("Size", size());
}
......@@ -101,7 +101,7 @@ ManageSieveScriptsDialog::ManageSieveScriptsDialog(SieveImapPasswordProvider *pa
connect(close, &QPushButton::clicked, this, &ManageSieveScriptsDialog::accept);
buttonLayout->addWidget(close);
KConfigGroup group(KSharedConfig::openConfig(), "ManageSieveScriptsDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "ManageSieveScriptsDialog");
const QSize size = group.readEntry("Size", QSize());
if (size.isValid()) {
resize(size);
......@@ -113,7 +113,7 @@ ManageSieveScriptsDialog::ManageSieveScriptsDialog(SieveImapPasswordProvider *pa
ManageSieveScriptsDialog::~ManageSieveScriptsDialog()
{
disconnect(d->mTreeView, &CustomManageSieveWidget::updateButtons, this, &ManageSieveScriptsDialog::slotUpdateButtons);
KConfigGroup group(KSharedConfig::openConfig(), "ManageSieveScriptsDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "ManageSieveScriptsDialog");
group.writeEntry("Size", size());
// prevent QTreeWidget signals triggered by it's destructor from calling our slots
d->mTreeView->disconnect(this);
......
......@@ -59,7 +59,7 @@ void ParsingResultDialog::setResultParsing(const QString &result)
void ParsingResultDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "ParsingResultDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "ParsingResultDialog");
const QSize sizeDialog = group.readEntry("Size", QSize(800, 600));
if (sizeDialog.isValid()) {
resize(sizeDialog);
......@@ -68,7 +68,7 @@ void ParsingResultDialog::readConfig()
void ParsingResultDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "ParsingResultDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "ParsingResultDialog");
group.writeEntry("Size", size());
}
......
......@@ -94,14 +94,14 @@ QString SieveScriptDebuggerDialog::script() const
void SieveScriptDebuggerDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "SieveScriptDebuggerDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "SieveScriptDebuggerDialog");
group.writeEntry("Size", size());
group.writeEntry("Splitter", mSieveScriptDebuggerWidget->splitterSizes());
}
void SieveScriptDebuggerDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "SieveScriptDebuggerDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "SieveScriptDebuggerDialog");
const QSize sizeDialog = group.readEntry("Size", QSize(800, 600));
if (sizeDialog.isValid()) {
resize(sizeDialog);
......
......@@ -104,13 +104,13 @@ SieveTemplateEditDialog::~SieveTemplateEditDialog()
void SieveTemplateEditDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "SieveTemplateEditDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "SieveTemplateEditDialog");
group.writeEntry("Size", size());
}
void SieveTemplateEditDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "SieveTemplateEditDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "SieveTemplateEditDialog");
const QSize sizeDialog = group.readEntry("Size", QSize(600, 400));
if (sizeDialog.isValid()) {
resize(sizeDialog);
......
......@@ -180,7 +180,7 @@ void MultiImapVacationDialog::createPage(const QString &serverName, const KSieve
void MultiImapVacationDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "MultiImapVacationDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "MultiImapVacationDialog");
const QSize size = group.readEntry("Size", QSize());
if (size.isValid()) {
resize(size);
......@@ -191,7 +191,7 @@ void MultiImapVacationDialog::readConfig()
void MultiImapVacationDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "MultiImapVacationDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "MultiImapVacationDialog");
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