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

Use openStateConfig for storing window size

parent ce670678
Pipeline #56714 passed with stage
in 42 minutes and 53 seconds
......@@ -43,7 +43,7 @@ DKIMManagerKeyDialog::~DKIMManagerKeyDialog()
void DKIMManagerKeyDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), myDKIMManagerKeyDialogConfigGroupName);
KConfigGroup group(KSharedConfig::openStateConfig(), myDKIMManagerKeyDialogConfigGroupName);
mManagerWidget->restoreHeaders(group.readEntry("Header", QByteArray()));
const QSize size = group.readEntry("Size", QSize(600, 400));
if (size.isValid()) {
......@@ -53,7 +53,7 @@ void DKIMManagerKeyDialog::readConfig()
void DKIMManagerKeyDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), myDKIMManagerKeyDialogConfigGroupName);
KConfigGroup group(KSharedConfig::openStateConfig(), myDKIMManagerKeyDialogConfigGroupName);
group.writeEntry("Header", mManagerWidget->saveHeaders());
group.writeEntry("Size", size());
group.sync();
......
......@@ -92,7 +92,7 @@ void DKIMManageRulesDialog::slotImport()
void DKIMManageRulesDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), myDKIMManageRulesDialogGroupName);
KConfigGroup group(KSharedConfig::openStateConfig(), myDKIMManageRulesDialogGroupName);
const QSize size = group.readEntry("Size", QSize(600, 400));
mRulesWidget->restoreHeaders(group.readEntry("Header", QByteArray()));
if (size.isValid()) {
......@@ -102,7 +102,7 @@ void DKIMManageRulesDialog::readConfig()
void DKIMManageRulesDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), myDKIMManageRulesDialogGroupName);
KConfigGroup group(KSharedConfig::openStateConfig(), myDKIMManageRulesDialogGroupName);
group.writeEntry("Header", mRulesWidget->saveHeaders());
group.writeEntry("Size", size());
group.sync();
......
......@@ -54,7 +54,7 @@ DKIMRuleDialog::~DKIMRuleDialog()
void DKIMRuleDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), myDKIMRuleDialogConfigGroupName);
KConfigGroup group(KSharedConfig::openStateConfig(), myDKIMRuleDialogConfigGroupName);
const QSize size = group.readEntry("Size", QSize(600, 400));
if (size.isValid()) {
resize(size);
......@@ -63,7 +63,7 @@ void DKIMRuleDialog::readConfig()
void DKIMRuleDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), myDKIMRuleDialogConfigGroupName);
KConfigGroup group(KSharedConfig::openStateConfig(), myDKIMRuleDialogConfigGroupName);
group.writeEntry("Size", size());
group.sync();
}
......
......@@ -50,7 +50,7 @@ void RemoteContentConfigureDialog::slotAccept()
void RemoteContentConfigureDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), myRemoteContentConfigureConfigGroupName);
KConfigGroup group(KSharedConfig::openStateConfig(), myRemoteContentConfigureConfigGroupName);
const QSize size = group.readEntry("Size", QSize(600, 400));
if (size.isValid()) {
resize(size);
......@@ -59,7 +59,7 @@ void RemoteContentConfigureDialog::readConfig()
void RemoteContentConfigureDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), myRemoteContentConfigureConfigGroupName);
KConfigGroup group(KSharedConfig::openStateConfig(), myRemoteContentConfigureConfigGroupName);
group.writeEntry("Size", size());
group.sync();
}
......@@ -93,7 +93,7 @@ void ScamDetectionDetailsDialog::setDetails(const QString &details)
void ScamDetectionDetailsDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), myScamDetectionDetailsDialogConfigGroupName);
KConfigGroup group(KSharedConfig::openStateConfig(), myScamDetectionDetailsDialogConfigGroupName);
const QSize size = group.readEntry("Size", QSize(600, 400));
if (size.isValid()) {
resize(size);
......@@ -102,7 +102,7 @@ void ScamDetectionDetailsDialog::readConfig()
void ScamDetectionDetailsDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), myScamDetectionDetailsDialogConfigGroupName);
KConfigGroup group(KSharedConfig::openStateConfig(), myScamDetectionDetailsDialogConfigGroupName);
group.writeEntry("Size", size());
group.sync();
}
......@@ -85,7 +85,7 @@ MailSourceWebEngineViewer::~MailSourceWebEngineViewer()
void MailSourceWebEngineViewer::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), myMailSourceWebEngineViewerConfigGroupName);
KConfigGroup group(KSharedConfig::openStateConfig(), myMailSourceWebEngineViewerConfigGroupName);
const QSize size = group.readEntry("Size", QSize(600, 400));
if (size.isValid()) {
resize(size);
......@@ -94,7 +94,7 @@ void MailSourceWebEngineViewer::readConfig()
void MailSourceWebEngineViewer::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), myMailSourceWebEngineViewerConfigGroupName);
KConfigGroup group(KSharedConfig::openStateConfig(), myMailSourceWebEngineViewerConfigGroupName);
group.writeEntry("Size", size());
group.sync();
}
......
......@@ -85,7 +85,7 @@ VCardViewer::~VCardViewer()
void VCardViewer::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), myVCardViewerConfigGroupName);
KConfigGroup group(KSharedConfig::openStateConfig(), myVCardViewerConfigGroupName);
const QSize size = group.readEntry("Size", QSize(300, 400));
if (size.isValid()) {
resize(size);
......@@ -94,7 +94,7 @@ void VCardViewer::readConfig()
void VCardViewer::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), myVCardViewerConfigGroupName);
KConfigGroup group(KSharedConfig::openStateConfig(), myVCardViewerConfigGroupName);
group.writeEntry("Size", size());
group.sync();
}
......
......@@ -45,7 +45,7 @@ QWebEnginePage *DeveloperToolDialog::enginePage() const
void DeveloperToolDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), myDeveloperToolDialogConfigGroupName);
KConfigGroup group(KSharedConfig::openStateConfig(), myDeveloperToolDialogConfigGroupName);
const QSize sizeDialog = group.readEntry("Size", QSize(800, 600));
if (sizeDialog.isValid()) {
resize(sizeDialog);
......@@ -54,6 +54,6 @@ void DeveloperToolDialog::readConfig()
void DeveloperToolDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), myDeveloperToolDialogConfigGroupName);
KConfigGroup group(KSharedConfig::openStateConfig(), myDeveloperToolDialogConfigGroupName);
group.writeEntry("Size", size());
}
......@@ -48,7 +48,7 @@ TrackingDetailsDialog::~TrackingDetailsDialog()
void TrackingDetailsDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), myMailTrackingDetailsDialogConfigGroupName);
KConfigGroup group(KSharedConfig::openStateConfig(), myMailTrackingDetailsDialogConfigGroupName);
const QSize size = group.readEntry("Size", QSize(600, 400));
if (size.isValid()) {
resize(size);
......@@ -57,7 +57,7 @@ void TrackingDetailsDialog::readConfig()
void TrackingDetailsDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), myMailTrackingDetailsDialogConfigGroupName);
KConfigGroup group(KSharedConfig::openStateConfig(), myMailTrackingDetailsDialogConfigGroupName);
group.writeEntry("Size", size());
group.sync();
}
......
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