summaryrefslogtreecommitdiff
blob: a7377b61f1909d7b9a9bab808f6fe4e384f0f0c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
From 814f0db2a1ae5b15bf91909ce80a5d6792f9aeed Mon Sep 17 00:00:00 2001
From: David Faure <faure@kde.org>
Date: Sun, 29 Jul 2018 13:05:38 +0200
Subject: Port to setAutoSaveSettings so that saving happens before hiding.

Summary:
See d35a882895 in kxmlgui for more complete explanation.

BUG: 396339
CCBUG: 395988

Test Plan: kmail ; Alt+F4 ; kmail -> now the statusbar and toolbar are visible again

Reviewers: ngraham, elvisangelaccio, broulik, cfeck, mlaurent

Reviewed By: mlaurent

Subscribers: kde-pim

Tags: #kde_pim

Differential Revision: https://phabricator.kde.org/D14454
---
 src/kmmainwin.cpp | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/kmmainwin.cpp b/src/kmmainwin.cpp
index ce3b042..f3550ba 100644
--- a/src/kmmainwin.cpp
+++ b/src/kmmainwin.cpp
@@ -76,7 +76,7 @@ KMMainWin::KMMainWin(QWidget *)
     createGUI(QStringLiteral("kmmainwin.rc"));
 
     //must be after createGUI, otherwise e.g toolbar settings are not loaded
-    applyMainWindowSettings(KMKernel::self()->config()->group("Main Window"));
+    setAutoSaveSettings(KMKernel::self()->config()->group("Main Window"));
 
     connect(KPIM::BroadcastStatus::instance(), &KPIM::BroadcastStatus::statusMsg,
             this, &KMMainWin::displayStatusMessage);
@@ -94,10 +94,6 @@ KMMainWin::~KMMainWin()
     // Avoids a crash if there are any Akonadi jobs running, which may
     // attempt to display a status message when they are killed.
     disconnect(KPIM::BroadcastStatus::instance(), &KPIM::BroadcastStatus::statusMsg, this, nullptr);
-
-    KConfigGroup grp(KMKernel::self()->config()->group("Main Window"));
-    saveMainWindowSettings(grp);
-    KMKernel::self()->config()->sync();
 }
 
 KMMainWidget *KMMainWin::mainKMWidget() const
-- 
cgit v0.11.2