Skip to content

Avoid keeping closed tabs settings in some cases

Toni Asensi Esteve requested to merge work/solve_bug_447197 into master

Avoid keeping closed tabs settings (or delete them) when the limit of closed tabs is reached, when closing Krusader and when cleaning the list of closed tabs.

FIXED: [ 447197 ] The size of the krusaderrc file gets too big
BUG: 447197

TEST PLAN:

  • Open five tabs (for example using Ctr+T), close those tabs (for example using Ctr+W). Clean the Recently Closed Tabs list using the "Go > Recently Closed Tabs > Empty [...]" menu, close Krusader. Check that in the krusaderrc file there is no [closedTab_NUMBER] section.

  • Repeat the last test, this time using six tabs. Note: Six tabs is the maximum that can be stored on the Recently Closed Tabs menu.

  • Repeat the last test, this time using seven tabs.

  • Open fifteen tabs (for example using Ctr+T), close those tabs (for example using Ctr+W), close Krusader. Check that in the krusaderrc file there is no [closedTab_NUMBER] section.

  • Open Krusader, open one tab, close that tab, press Ctrl+S, close that window (that forces the krusaderrc file to be updated). Open another instance of Krusader, open one tab, close that tab, press Ctrl+S, close that window (that forces the krusaderrc file to be updated). Close the first Krusader. Close the second Krusader. Check that in the krusaderrc file there is no [closedTab_NUMBER] section.

  • Open Krusader, open one tab, close that tab, press Ctrl+S, close that window (that forces the krusaderrc file to be updated). Open another instance of Krusader, open one tab, close that tab, press Ctrl+S, close that window (that forces the krusaderrc file to be updated). Close the second Krusader. Close the first Krusader. Check that in the krusaderrc file there is no [closedTab_NUMBER] section.

  • Some tests from !49 (merged) can be performed.

Notes:

  • It's useful to read the information written on https://bugs.kde.org/show_bug.cgi?id=447197

  • There are some exceptional cases where information of a closed tab section can be left on a krusaderrc file, for example: the user opens a tab, closes it, presses Ctrl+S, closes that window (that forces the krusaderrc file to be updated), and executes killall -9 krusader.

  • About prior krusaderrc files: it's preferable to close all instances of Krusader, edit the krusaderrc file and delete the [closedTab_NUMBER] sections.

Merge request reports