[websites/blogs-kde-org] content/posts/navyasai: Mid GSoC blog for Redesigning TM Tab project

Finley Watson <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit a2d0be5a92c3cef34dab1f7fbfdc92d6dc15c546 by Finley Watson, on behalf of Navya Sai  Sadu.
Committed on 26/07/2026 at 14:04.
Pushed by finw into branch 'master'.

Mid GSoC blog for Redesigning TM Tab project

wrote week 6 blog.

 moved week 3 blog to another folder with media to render.

R  +-    --    content/posts/navyasai/week3/checkboxes.png [from: content/posts/navyasai/checkboxes.png - 100% similarity]
R  +2    -2    content/posts/navyasai/week3/index.md [from: content/posts/navyasai/2026-06-20-week2-3-gsoc.md - 097% similarity]
R  +-    --    content/posts/navyasai/week3/menu_options_before.png [from: content/posts/navyasai/menu_options_before.png - 100% similarity]
R  +-    --    content/posts/navyasai/week3/tm_manager_before.png [from: content/posts/navyasai/tm_manager_before.png - 100% similarity]
R  +-    --    content/posts/navyasai/week3/tm_tab_after.png [from: content/posts/navyasai/tm_tab_after.png - 100% similarity]
A  +-    --    content/posts/navyasai/week6/TMTabRedesign.png
A  +42   -0    content/posts/navyasai/week6/index.md

https://invent.kde.org/websites/blogs-kde-org/-/commit/a2d0be5a92c3cef34dab1f7fbfdc92d6dc15c546

diff --git a/content/posts/navyasai/checkboxes.png b/content/posts/navyasai/week3/checkboxes.png
similarity index 100%
rename from content/posts/navyasai/checkboxes.png
rename to content/posts/navyasai/week3/checkboxes.png
diff --git a/content/posts/navyasai/2026-06-20-week2-3-gsoc.md b/content/posts/navyasai/week3/index.md
similarity index 97%
rename from content/posts/navyasai/2026-06-20-week2-3-gsoc.md
rename to content/posts/navyasai/week3/index.md
index 78ac8bf7..e43ef313 100644
--- a/content/posts/navyasai/2026-06-20-week2-3-gsoc.md
+++ b/content/posts/navyasai/week3/index.md
@@ -13,7 +13,7 @@ The past two weeks went by fast. The learnings I gained while building the toy p
 
 The TM Manager is currently a standalone window which is accesible from any tab.
 
-![TM Manager](tm_manager_before.png) 
+![TM Manager Before](tm_manager_before.png) 
 
 The "Manage Translation Memories" option is already available in the Tools Menu and again in the ToolBar of TM Tab since it's specific to it.
 
@@ -33,7 +33,7 @@ The obsolete references and methods for TM Manager are cleaned up.
 
[suppressed due to size limit]
 
-![Multi-TM Selection](checkboxes.png)
+![Multi-TM Selection](checkboxes.png) 
 
 This is a deviation from my GSoc Proposal wherein I proposed to replace Combo Box with a List Widget having entries with checkboxes for Multi-TM selection. Since there would be TM dbs on the left of the tab anyways, I thought of enabling selection there itself, than to have two places(TM Manager and the List Widget) listing all the TMs. 
 
diff --git a/content/posts/navyasai/menu_options_before.png b/content/posts/navyasai/week3/menu_options_before.png
similarity index 100%
rename from content/posts/navyasai/menu_options_before.png
rename to content/posts/navyasai/week3/menu_options_before.png
diff --git a/content/posts/navyasai/tm_manager_before.png b/content/posts/navyasai/week3/tm_manager_before.png
similarity index 100%
rename from content/posts/navyasai/tm_manager_before.png
rename to content/posts/navyasai/week3/tm_manager_before.png
diff --git a/content/posts/navyasai/tm_tab_after.png b/content/posts/navyasai/week3/tm_tab_after.png
similarity index 100%
rename from content/posts/navyasai/tm_tab_after.png
rename to content/posts/navyasai/week3/tm_tab_after.png
diff --git a/content/posts/navyasai/week6/TMTabRedesign.png b/content/posts/navyasai/week6/TMTabRedesign.png
new file mode 100644
index 00000000..9c1a9695
Binary files /dev/null and b/content/posts/navyasai/week6/TMTabRedesign.png differ
diff --git a/content/posts/navyasai/week6/index.md b/content/posts/navyasai/week6/index.md
new file mode 100644
index 00000000..d7264938
--- /dev/null
+++ b/content/posts/navyasai/week6/index.md
@@ -0,0 +1,42 @@
+---
+title:   "Redesigning Lokalize's Translation Memory Tab - Mid-GSoC"
+date:    2026-07-13
+authors:
+ - navyasai
+slug:    mid-gsoc-blog
+categories:
+ - GSoC
+ - mentorship
+---
+
+The past three weeks were a mix of cleanup, debugging, completing the work concerning UI and understanding *TMView*( since I did not look into it during proposal period) and *TMTab* again to review my design choices and see if I'm going in the right direction.
+
+## Cleaning up TMManager and getting checkboxes working
+First up was cleaning `TMManagerWin`, reformatting, removing now obsolete references and code. With that done, I resumed work on the per-project TM selection checkboxes.
+
+The checkboxes are backed directly by DBFilesModel rather than a separate proxy layer. Overriding `flags()`, `data()`, and `setData()` on the existing model was the way to go. Qt's view renders the checkboxes automatically once `Qt::ItemIsUserCheckable` is set and `Qt::CheckStateRole` returns a value. Check state persists to `ProjectLocal::selectedTMs()` immediately on every toggle via `saveCheckedState()`, and reloads on project open via a `Project::loaded` connection. 
+
[suppressed due to size limit]
+
+After testing this end-to-end and verifying the *.local* config file was being written and read correctly, I merged this in.
+
+## Studying TMView's querying and why it can't help TMTab
+Before touching TMTab's query logic, I spent time understanding how TMView (the suggestions dock widget in the editor) does its querying since my mentor suggested that it's querying might help designing something similar for TMTab's multi-TM quering. 
+
+TMView uses *SelectJob* which operates on *TMEntry* structs, it does fuzzy word-level matching, scores results, and is designed specifically for the suggestions workflow. It fires secondary DB queries only when the primary project DB scores below a threshold.
+
+This is fundamentally different from what TMTab needs, it uses *ExecQueryJob* which runs SQL query against a DB and hands the cursor to *QSqlQueryModel*. The two systems aren't interchangeable, so the multi-DB approach for each has to be designed separately I guess. For TMView, the change is relatively small, loop `selectedTMs()` and fire one SelectJob per DB. For TMTab, it might turn to be little complex.
+
+## Removing the dbName combobox
+With the TM list in TMManagerWin now showing checkboxes for selection, the `dbName` KComboBox in the search panel is redundant, users select which TMs to query via checkboxes, not a dropdown. I removed it from queryoptions.ui and cleaned up all references in tmtab.cpp, but some of them need workaround. The `openFile()` (RemoveFileJob) gets a TODO, to be fixed properly once multi-DB results carry their source DB name.
+
+## Debugging with GDB and Dr Konqi
+My mentor reported a crash when opening the QA dock widget in the TM tab. This was a good opportunity to learn proper debugging with GDB, Dr Konqi, and reading backtraces. 
+
+After investigating, this appeared to be a preexisting bug unrelated to my changes. It's probably data-dependent and only triggers with specific content in the TM results view at the moment the QA dock repaints. It didn't reproduce on my machine. I might work on it later when I have time.
+
+The years old chats on QtForum and StackOverflow were helpful throughout. Qt itself is so well documented! 
+
+![TM Tab Redesigned](TMTabRedesign.png)
+
+I'm looking forward to see how translators would like the TMTab's glow up when the project is completed and all the changes get merged.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.