editor: implement file save/revert/close all actions

Lokalize already had Save and Save As for the current file, but Close, Close All, Revert and Revert all were never wired up in code so they never appeared in the menus.

I implemented Close and Revert for the current tab, and Save All, Revert All and Close All for all open tabs at once.

Close All works in three steps - collect all tab indices, ask the user about each unsaved file, then close everything only if nothing was cancelled.

To keep hierarchy clean, EditorTab now routes these actions through SettingsController::instance()->mainWindowPtr() instead of directly depending on LokalizeMainWindow headers.

queryAndCloseCurrentTab was moved from private to public Q_SLOTS so EditorTab can trigger it externally.

Ctrl+W already has a "Close Current Tab" action in MainWindow (close-active-tab), so in EditorTab I only use KStandardActions::Close for the File menu and cleared its shortcut to avoid the conflict.

Files touched:

src/editortab.cpp: register file_revert, file_save_all, file_revert_all, file_close, file_close_all using mainWindowPtr

src/lokalizemainwindow.cpp: implement saveAllEditorTabs, revertAllEditorTabs, queryAndCloseAllEditorTabs

src/lokalizemainwindow.h: move queryAndCloseCurrentTab to public Q_SLOTS, declare three new public slots

Edited by Finley Watson

Merge request reports

Loading