Commit 90a7b698 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use openStateConfig for storing window size

parent 24492779
Pipeline #56709 passed with stage
in 55 minutes and 29 seconds
......@@ -72,7 +72,7 @@ VCardViewerDialog::~VCardViewerDialog()
void VCardViewerDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "VCardViewerDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "VCardViewerDialog");
const QSize size = group.readEntry("Size", QSize(600, 400));
if (size.isValid()) {
resize(size);
......@@ -81,7 +81,7 @@ void VCardViewerDialog::readConfig()
void VCardViewerDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "VCardViewerDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "VCardViewerDialog");
group.writeEntry("Size", size());
group.sync();
}
......
......@@ -51,13 +51,13 @@ QuickTextConfigureDialog::~QuickTextConfigureDialog()
void QuickTextConfigureDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), myConfigGroupName);
KConfigGroup group(KSharedConfig::openStateConfig(), myConfigGroupName);
group.writeEntry("Size", size());
}
void QuickTextConfigureDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), myConfigGroupName);
KConfigGroup group(KSharedConfig::openStateConfig(), myConfigGroupName);
const QSize sizeDialog = group.readEntry("Size", QSize(300, 350));
if (sizeDialog.isValid()) {
resize(sizeDialog);
......
......@@ -51,13 +51,13 @@ void CheckDuplicateEmailsDialog::setDuplicatedEmails(const QMap<QString, int> &e
void CheckDuplicateEmailsDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "CheckDuplicateEmailsDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "CheckDuplicateEmailsDialog");
group.writeEntry("Size", size());
}
void CheckDuplicateEmailsDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "CheckDuplicateEmailsDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "CheckDuplicateEmailsDialog");
const QSize sizeDialog = group.readEntry("Size", QSize(500, 300));
if (sizeDialog.isValid()) {
resize(sizeDialog);
......
......@@ -47,13 +47,13 @@ void CheckAttachmentDialog::setEmails(const QStringList &emails)
void CheckAttachmentDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "CheckAttachmentDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "CheckAttachmentDialog");
group.writeEntry("Size", size());
}
void CheckAttachmentDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "CheckAttachmentDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "CheckAttachmentDialog");
const QSize sizeDialog = group.readEntry("Size", QSize(500, 300));
if (sizeDialog.isValid()) {
resize(sizeDialog);
......
......@@ -48,13 +48,13 @@ ConfirmAddressDialog::~ConfirmAddressDialog()
void ConfirmAddressDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "ConfirmAddressDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "ConfirmAddressDialog");
group.writeEntry("Size", size());
}
void ConfirmAddressDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "ConfirmAddressDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "ConfirmAddressDialog");
const QSize sizeDialog = group.readEntry("Size", QSize(500, 300));
if (sizeDialog.isValid()) {
resize(sizeDialog);
......
......@@ -38,13 +38,13 @@ GrammalecteConfigDialog::~GrammalecteConfigDialog()
void GrammalecteConfigDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "GrammalecteConfigDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "GrammalecteConfigDialog");
group.writeEntry("Size", size());
}
void GrammalecteConfigDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "GrammalecteConfigDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "GrammalecteConfigDialog");
const QSize sizeDialog = group.readEntry("Size", QSize(500, 300));
if (sizeDialog.isValid()) {
resize(sizeDialog);
......
......@@ -42,13 +42,13 @@ LanguageToolConfigDialog::~LanguageToolConfigDialog()
void LanguageToolConfigDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), myConfigGroupName);
KConfigGroup group(KSharedConfig::openStateConfig(), myConfigGroupName);
group.writeEntry("Size", size());
}
void LanguageToolConfigDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), myConfigGroupName);
KConfigGroup group(KSharedConfig::openStateConfig(), myConfigGroupName);
const QSize sizeDialog = group.readEntry("Size", QSize(500, 300));
if (sizeDialog.isValid()) {
resize(sizeDialog);
......
......@@ -51,7 +51,7 @@ EmailAddressSelectionLdapDialog::EmailAddressSelectionLdapDialog(QWidget *parent
void EmailAddressSelectionLdapDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), QStringLiteral("EmailAddressSelectionLdapDialog"));
KConfigGroup group(KSharedConfig::openStateConfig(), QStringLiteral("EmailAddressSelectionLdapDialog"));
const QSize size = group.readEntry("Size", QSize());
if (size.isValid()) {
resize(size);
......@@ -62,7 +62,7 @@ void EmailAddressSelectionLdapDialog::readConfig()
void EmailAddressSelectionLdapDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), QStringLiteral("EmailAddressSelectionLdapDialog"));
KConfigGroup group(KSharedConfig::openStateConfig(), QStringLiteral("EmailAddressSelectionLdapDialog"));
group.writeEntry("Size", size());
}
......
......@@ -57,7 +57,7 @@ QString ReactionToInvitationDialog::comment() const
void ReactionToInvitationDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "ReactionToInvitationDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "ReactionToInvitationDialog");
const QSize size = group.readEntry("Size", QSize(600, 400));
if (size.isValid()) {
resize(size);
......@@ -66,7 +66,7 @@ void ReactionToInvitationDialog::readConfig()
void ReactionToInvitationDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "ReactionToInvitationDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "ReactionToInvitationDialog");
group.writeEntry("Size", size());
group.sync();
}
......@@ -51,7 +51,7 @@ void DKIMAuthenticationVerifiedServerDialog::slotAccepted()
void DKIMAuthenticationVerifiedServerDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), myConfigGroupName);
KConfigGroup group(KSharedConfig::openStateConfig(), myConfigGroupName);
const QSize size = group.readEntry("Size", QSize(600, 400));
if (size.isValid()) {
resize(size);
......@@ -60,7 +60,7 @@ void DKIMAuthenticationVerifiedServerDialog::readConfig()
void DKIMAuthenticationVerifiedServerDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), myConfigGroupName);
KConfigGroup group(KSharedConfig::openStateConfig(), myConfigGroupName);
group.writeEntry("Size", size());
group.sync();
}
......@@ -58,7 +58,7 @@ void DKIMConfigureDialog::slotReset()
void DKIMConfigureDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), myConfigGroupName);
KConfigGroup group(KSharedConfig::openStateConfig(), myConfigGroupName);
const QSize size = group.readEntry("Size", QSize(600, 400));
if (size.isValid()) {
resize(size);
......@@ -67,7 +67,7 @@ void DKIMConfigureDialog::readConfig()
void DKIMConfigureDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), myConfigGroupName);
KConfigGroup group(KSharedConfig::openStateConfig(), myConfigGroupName);
group.writeEntry("Size", size());
group.sync();
}
......@@ -34,13 +34,13 @@ DKIMKeyRecordWidget::~DKIMKeyRecordWidget()
void DKIMKeyRecordWidget::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), myDKIMKeyRecordWidgetGroupName);
KConfigGroup group(KSharedConfig::openStateConfig(), myDKIMKeyRecordWidgetGroupName);
mManagerKeyWidget->restoreHeaders(group.readEntry("Header", QByteArray()));
}
void DKIMKeyRecordWidget::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), myDKIMKeyRecordWidgetGroupName);
KConfigGroup group(KSharedConfig::openStateConfig(), myDKIMKeyRecordWidgetGroupName);
group.writeEntry("Header", mManagerKeyWidget->saveHeaders());
group.sync();
}
......
......@@ -46,7 +46,7 @@ void ViewerPluginExternalEditDialog::slotScriptIsValid(bool valid)
void ViewerPluginExternalEditDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "ViewerPluginExternalEditDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "ViewerPluginExternalEditDialog");
const QSize size = group.readEntry("Size", QSize(350, 200));
if (size.isValid()) {
resize(size);
......@@ -55,7 +55,7 @@ void ViewerPluginExternalEditDialog::readConfig()
void ViewerPluginExternalEditDialog::saveConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "ViewerPluginExternalEditDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "ViewerPluginExternalEditDialog");
group.writeEntry("Size", size());
group.sync();
}
......
......@@ -62,13 +62,13 @@ void AdBlockBlockableItemsDialog::setAdblockResult(const QVector<AdBlock::AdBloc
void AdBlockBlockableItemsDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "AdBlockBlockableItemsDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "AdBlockBlockableItemsDialog");
group.writeEntry("Size", size());
}
void AdBlockBlockableItemsDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "AdBlockBlockableItemsDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "AdBlockBlockableItemsDialog");
const QSize sizeDialog = group.readEntry("Size", QSize(500, 300));
if (sizeDialog.isValid()) {
resize(sizeDialog);
......
......@@ -59,13 +59,13 @@ AdBlockCreateFilterDialog::~AdBlockCreateFilterDialog()
void AdBlockCreateFilterDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "AdBlockCreateFilterDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "AdBlockCreateFilterDialog");
group.writeEntry("Size", size());
}
void AdBlockCreateFilterDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "AdBlockCreateFilterDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "AdBlockCreateFilterDialog");
const QSize sizeDialog = group.readEntry("Size", QSize(800, 600));
if (sizeDialog.isValid()) {
resize(sizeDialog);
......
......@@ -69,13 +69,13 @@ AdBlockShowListDialog::~AdBlockShowListDialog()
void AdBlockShowListDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "AdBlockShowListDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "AdBlockShowListDialog");
group.writeEntry("Size", size());
}
void AdBlockShowListDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "AdBlockShowListDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "AdBlockShowListDialog");
const QSize sizeDialog = group.readEntry("Size", QSize(800, 600));
if (sizeDialog.isValid()) {
resize(sizeDialog);
......
......@@ -54,13 +54,13 @@ QString SelectImapFolderDialog::selectedFolderName() const
void SelectImapFolderDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "SelectImapFolderDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "SelectImapFolderDialog");
group.writeEntry("Size", size());
}
void SelectImapFolderDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "SelectImapFolderDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), "SelectImapFolderDialog");
const QSize sizeDialog = group.readEntry("Size", QSize(500, 300));
if (sizeDialog.isValid()) {
resize(sizeDialog);
......
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