https://bugs.kde.org/show_bug.cgi?id=515087
Finley Watson <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Latest Commit| |https://invent.kde.org/sdk/ | |lokalize/-/commit/b5b47d177 | |6ff0329e7e8431debf3eb17613c | |9772 Status|ASSIGNED |RESOLVED --- Comment #4 from Finley Watson <[email protected]> --- Git commit b5b47d1776ff0329e7e8431debf3eb17613c9772 by Finley Watson. Committed on 27/03/2026 at 18:25. Pushed by finw into branch 'master'. fix: stop constant "load project?" dialogues when closing tabs / project With eb44227f65369fa6f5e19c3202700d0b82f89f09 I implemented `Project::instance()->glossaryTab()` which returns a pointer to the glossary tab page. This is a handy way to refer to the glossary tab in other places. However because the function first checks if the glossary exists, and thus that the project exists (because a glossary is tied to the project it belongs to), every time you try to refer to the glossary, even during certain destructive actions (e.g. closing a project), you get at least one dialogue from the helper function `SettingsController::instance()->ensureProjectIsLoaded()` which is bad design, not to mention being very annoying and disruptive. This fix resolves the immediate problem, though really this needs a better redesign where the glossary tab page widget is not always created (and hidden) but rather is only created when it's shown to the user. I had to modify `termlabel.cpp` so that it uses a signal instead of grabbing the glossary tab directly. `TermLabel` is only used by `FlowLayout`, which inherits `QLayout` and is the layout the editor tab pages uses in the dock widget `GlossaryView`. So I had to chain / bubble up the signal until it can access the glossary tab. Related: bug 516944, bug 516927 M +8 -1 src/common/flowlayout.cpp M +3 -6 src/common/termlabel.cpp M +1 -0 src/common/termlabel.h M +8 -0 src/editortab.cpp M +4 -3 src/editortab.h M +1 -0 src/glossary/glossarytab.cpp M +7 -0 src/glossary/glossaryview.cpp M +3 -0 src/glossary/glossaryview.h M +47 -29 src/lokalizemainwindow.cpp M +9 -0 src/lokalizemainwindow.h M +0 -11 src/project/project.cpp M +0 -2 src/project/project.h https://invent.kde.org/sdk/lokalize/-/commit/b5b47d1776ff0329e7e8431debf3eb17613c9772 -- You are receiving this mail because: You are watching all bug changes.
