Bug 396339 - [Kmail] Main and status toolbars options not remembered
Summary: [Kmail] Main and status toolbars options not remembered
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: UI (show other bugs)
Version: 5.8.2
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-09 14:37 UTC by Daimonion
Modified: 2018-07-31 13:46 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daimonion 2018-07-09 14:37:21 UTC
Starting from 5.8.2 Kmail resets the state of the main and status toolbar so that they are disabled on next start. In `kmali2rc` these toolbars are set to `disabled`. I can manually set them to `enable` but after I open and close Kmail, they are back to disabled again.
Comment 1 Antonio Rojas 2018-07-09 14:47:36 UTC

*** This bug has been marked as a duplicate of bug 395988 ***
Comment 2 Mladen Milinkovic, Max 2018-07-17 15:08:13 UTC
KMail does saveMainWindowSettings() from mainwindow destructor:
https://cgit.kde.org/kmail.git/tree/src/kmmainwin.cpp#n99

That code should probably be moved to QMainWindow::closeEvent()

void KMMainWin::closeEvent(QCloseEvent *event)
{
    QMainWindow::closeEvent(event);
    if(event->isAccepted()) {
        ... saveMainWindowSettings() ...
    }
}
Comment 3 Mladen Milinkovic, Max 2018-07-17 15:28:23 UTC
sorry i meant KMainWindow not QMainWindow
Comment 4 David Faure 2018-07-29 11:10:26 UTC
Suggested fix https://phabricator.kde.org/D14454
Comment 5 David Faure 2018-07-31 13:46:15 UTC
Git commit 814f0db2a1ae5b15bf91909ce80a5d6792f9aeed by David Faure.
Committed on 31/07/2018 at 13:46.
Pushed by dfaure into branch 'Applications/18.08'.

Port to setAutoSaveSettings so that saving happens before hiding.

Summary:
See d35a882895 in kxmlgui for more complete explanation.
Related: bug 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

M  +1    -5    src/kmmainwin.cpp

https://commits.kde.org/kmail/814f0db2a1ae5b15bf91909ce80a5d6792f9aeed