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

Use openStateConfig for storing window size

parent 4db1d4e6
Pipeline #56710 passed with stage
in 15 minutes and 34 seconds
......@@ -80,7 +80,7 @@ void ConfigurePluginDialog::slotAccepted()
void ConfigurePluginDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "ConfigurePluginDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "ConfigurePluginDialog");
const QSize size = group.readEntry("Size", QSize(600, 400));
if (size.isValid()) {
resize(size);
......@@ -89,7 +89,7 @@ void ConfigurePluginDialog::readConfig()
void ConfigurePluginDialog::saveConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "ConfigurePluginDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "ConfigurePluginDialog");
group.writeEntry("Size", size());
group.sync();
}
......@@ -100,14 +100,14 @@ void ConfigurePluginsWidget::doResetToDefaultsOther()
void ConfigurePluginsWidget::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "ConfigurePluginsWidget");
KConfigGroup group(KSharedConfig::openStateConfig(), "ConfigurePluginsWidget");
const QList<int> size = {400, 100};
mSplitter->setSizes(group.readEntry("splitter", size));
}
void ConfigurePluginsWidget::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "ConfigurePluginsWidget");
KConfigGroup group(KSharedConfig::openStateConfig(), "ConfigurePluginsWidget");
group.writeEntry("splitter", mSplitter->sizes());
}
......
......@@ -112,7 +112,7 @@ void LogActivitiesDialog::slotClear()
void LogActivitiesDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "LogActivitiesDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "LogActivitiesDialog");
const QSize sizeDialog = group.readEntry("Size", QSize(800, 600));
if (sizeDialog.isValid()) {
resize(sizeDialog);
......@@ -121,6 +121,6 @@ void LogActivitiesDialog::readConfig()
void LogActivitiesDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "LogActivitiesDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "LogActivitiesDialog");
group.writeEntry("Size", size());
}
......@@ -82,13 +82,13 @@ TemplateEditDialog::~TemplateEditDialog()
void TemplateEditDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "TemplateEditDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "TemplateEditDialog");
group.writeEntry("Size", size());
}
void TemplateEditDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "TemplateEditDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "TemplateEditDialog");
const QSize sizeDialog = group.readEntry("Size", QSize(600, 400));
if (sizeDialog.isValid()) {
resize(sizeDialog);
......
......@@ -51,7 +51,7 @@ void TranslatorDebugDialog::setDebug(const QString &debugStr)
void TranslatorDebugDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "TranslatorDebugDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "TranslatorDebugDialog");
const QSize sizeDialog = group.readEntry("Size", QSize(800, 600));
if (sizeDialog.isValid()) {
resize(sizeDialog);
......@@ -60,7 +60,7 @@ void TranslatorDebugDialog::readConfig()
void TranslatorDebugDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "TranslatorDebugDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "TranslatorDebugDialog");
group.writeEntry("Size", size());
}
......
......@@ -29,7 +29,7 @@ KPimPrintPreviewDialog::~KPimPrintPreviewDialog()
void KPimPrintPreviewDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "KPimPrintPreviewDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "KPimPrintPreviewDialog");
const QSize size = group.readEntry("Size", QSize(800, 600));
if (size.isValid()) {
resize(size);
......@@ -38,7 +38,7 @@ void KPimPrintPreviewDialog::readConfig()
void KPimPrintPreviewDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "KPimPrintPreviewDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "KPimPrintPreviewDialog");
group.writeEntry("Size", size());
group.sync();
}
......@@ -79,7 +79,7 @@ CompletionConfigureDialog::~CompletionConfigureDialog()
void CompletionConfigureDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "CompletionConfigureDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "CompletionConfigureDialog");
const QSize size = group.readEntry("Size", QSize(600, 400));
if (size.isValid()) {
resize(size);
......@@ -88,7 +88,7 @@ void CompletionConfigureDialog::readConfig()
void CompletionConfigureDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "CompletionConfigureDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "CompletionConfigureDialog");
group.writeEntry("Size", size());
group.sync();
}
......
......@@ -70,7 +70,7 @@ CompletionOrderEditor::~CompletionOrderEditor()
void CompletionOrderEditor::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "CompletionOrderEditor");
KConfigGroup group(KSharedConfig::openStateConfig(), "CompletionOrderEditor");
const QSize size = group.readEntry("Size", QSize(600, 400));
if (size.isValid()) {
resize(size);
......@@ -79,7 +79,7 @@ void CompletionOrderEditor::readConfig()
void CompletionOrderEditor::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "CompletionOrderEditor");
KConfigGroup group(KSharedConfig::openStateConfig(), "CompletionOrderEditor");
group.writeEntry("Size", size());
group.sync();
}
......
......@@ -65,7 +65,7 @@ void SelectMultiCollectionDialog::initialize(const QString &mimetype, const QLis
void SelectMultiCollectionDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "SelectMultiCollectionDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "SelectMultiCollectionDialog");
const QSize sizeDialog = group.readEntry("Size", QSize(800, 600));
if (sizeDialog.isValid()) {
resize(sizeDialog);
......@@ -74,7 +74,7 @@ void SelectMultiCollectionDialog::readConfig()
void SelectMultiCollectionDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "SelectMultiCollectionDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "SelectMultiCollectionDialog");
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