Weeks 7, 8 & Extension: Hardware Failures and Final MRs
Heading into the final weeks of SoK, things got a bit chaotic. Week 7 was right in the middle of my university exams, so i had to take a planned break from coding. I survived the exams and was geared up for a solid Week 8 sprint to wrap things up, but then my laptop chose violence again. A few weeks back it had already died on me once (the screen went completely dark). I replaced the panel, it came back to life, and i thought we were good. This time it was worse: no screen flicker, no fan spin, nothing. The repair shop confirmed a motherboard failure and told me, “We can look at it… eventually… no promises on timeline.”
Me, staring at the SoK deadline and GSoC proposal date sliding toward me in glorious slow-motion...
Waiting around simply wasn't an option. So i did the only logical thing in full panic mode: I went straight to a store and bought a new laptop. RAM prices hit me hard too 💀, but I think it'll be worth it at this time. Huge thanks to my mentor, Finley, for being super understanding and providing an extension so i could set up my new dev environment and finish strong!
Once the new setup was ready, i jumped right back into Lokalize. Both of my final MRs ended up being fixes for edge cases in the major features i built earlier in the program.
1. Fixing an Oversight from Week 3: Menu Availability
Back in Week 3, i wrote the updateMenuAvailability() logic to dynamically disable top-level menus whenever a user switched tabs. However, i missed a crucial edge case: what happens when you close the very last tab? Because there were no tabs left to trigger my update function, the menu state would stay stale when the application fell back to the "Welcome" screen.
To fix my own bug, i patched the showWelcome() function to directly call updateMenuAvailability() and made sure that the application startup sequence initialized through showWelcome(). This way, the refresh path runs consistently every time the Welcome screen appears, ensuring the menus are greyed out correctly when no tab is active.
Merge Request: Lokalize: Refresh top-level menu availability on Welcome screen
2. Fixing a DRY Failure from Weeks 4 & 5: Tab Focus
The next task came out of the code review for the batch file actions (Save All, Close All, etc.) I built back in Weeks 4 and 5. While reviewing my MR that implemented the "Revert All" feature, Finley pointed out an existing DRY (Don't Repeat Yourself) failure in the codebase.
When "Revert All" is triggered, it checks if any open files have unsaved changes. If they do, it activates a warning prompt via the existing fileOpen() function. The problem was that fileOpen() was triggering a warningTwoActionsCancel dialog ("The document contains unsaved changes...") without focusing on the related tab first. If a translator had many files open, they wouldn't know which specific document the warning was actually about. Because this UX issue affected any call to fileOpen(), he asked me to tackle it in a separate, dedicated MR.
I fixed this by adding a new signal signalActivateThisTabRequested(QWidget *tabWidget) to the EditorTab class. Right before the prompt is called in editortab.cpp, I emit this signal passing this as the argument. I then wired this up in lokalizemainwindow.cpp to connect to activateTabByPageWidget. Now, the second the warning appears, the UI automatically flips to the correct document, making the action much safer and more intuitive.
Merge Request: editor: focus relevant tab before unsaved changes prompt in fileOpen()
While testing this new tab focus MR, i actually found another bug in my old "Revert All" code, it doesn't revert all the open files every time. I suspect this might be due to some interference from autosave, so I'll be looking into fixing that in the future.
This officially wraps up my Season of KDE! It’s been an incredible experience diving into C++, Qt, and KDE's XMLGUI architecture. Huge thanks to Finley and the KDE community for the mentorship and support throughout the journey 🙏.