Fix sorting & tabs preset in config file
ClosedPublic

Authored by andreylegayev on Apr 19 2020, 6:15 PM.

Details

Summary

Fixes applied:

  1. TabWidget and KeyTreeView were saving sorting preset to the config group TabWidget::setKeyFilter with overriding settings of each other.

In other words all tabs were saved to the same group.
I've fixed it by setting config group to View #1, 2, 3... as it should be.
I've also had to prevent saving empty filter of last tab.

  1. TabWidget didn't save settings on exit - added call to saveViews() to destructor
  2. Prevented saving empty filter for the last tab in TabWidget::setKeyFilter()
Test Plan

Steps:

  1. Create several tabs with different filters
  2. Apply sorting to some columns
  3. Exit from kleopatra
  4. Run kleopatra

Expected result:
List of tabs, filters and sorting should be restored after app restart

Diff Detail

Repository
R168 Kleopatra
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
andreylegayev created this revision.Apr 19 2020, 6:15 PM
Restricted Application added a project: KDE PIM. · View Herald TranscriptApr 19 2020, 6:15 PM
Restricted Application added a subscriber: kde-pim. · View Herald Transcript
andreylegayev edited the summary of this revision. (Show Details)Apr 19 2020, 6:17 PM
dvratil accepted this revision.Apr 27 2020, 10:22 AM
dvratil added a subscriber: dvratil.

Looks OK, thanks for the patch.

This revision is now accepted and ready to land.Apr 27 2020, 10:22 AM
This revision was automatically updated to reflect the committed changes.