Bug 422251

Summary: Cannot acces the translation memory after a second launch of Lokalize
Product: [Applications] lokalize Reporter: Dimitrios Glentadakis <dglent>
Component: translation memoryAssignee: Simon Depiets <sdepiets>
Status: RESOLVED FIXED    
Severity: normal CC: shafff
Priority: NOR    
Version: 19.04.0   
Target Milestone: ---   
Platform: Mageia RPMs   
OS: Linux   
Latest Commit: Version Fixed In:

Description Dimitrios Glentadakis 2020-05-30 05:29:22 UTC
When i run Lokalize for the fisrt time after the system noot, everything works fine.
If i close Lokalize and i run again, the translation memory doesn't work.
All researches in the translation memory show no results. I don't have even the mouse indicator of searching.
And in the editor mode, i don't have any proposal in the translation memeory panel.
When it doesn't work i see this message in the terminal:
QSqlDatabasePrivate::database: requested database does not belong to the calling thread.

To make it work i have to reboot the computer. The user logout doesn't help.



STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Dimitrios Glentadakis 2020-05-30 05:34:05 UTC
Desktop environement: LXQt 0.15.0
Qt                  : 5.12.6
KDE Framework       : lib64kf5plasma5-5.57.0-1.mga7
                      plasma-framework-5.57.0-1.mga7
Comment 2 Simon Depiets 2020-06-14 03:19:12 UTC
Git commit 8ce6b3d89598b6bc7570d11e7063b08394b3c0c9 by Simon Depiets.
Committed on 14/06/2020 at 03:16.
Pushed by sdepiets into branch 'master'.

Use thread specific names for connection Names

There seems to have been two issues with TM connections.
The first was that the TM connection was closed on project change (while they are actually all opened for stats purposes).
The second was that the connection names where not thread specific, which could cause issues, and it will now be the case.
Related: bug 416427

M  +4    -2    src/project/project.cpp
M  +41   -27   src/tm/jobs.cpp

https://invent.kde.org/sdk/lokalize/commit/8ce6b3d89598b6bc7570d11e7063b08394b3c0c9
Comment 3 Simon Depiets 2020-06-14 03:21:04 UTC
I have made some changes in the handling of TM connections, could you build from master and give it a try ?
Comment 4 Dimitrios Glentadakis 2020-06-16 03:39:09 UTC
It works ok now
Thank you!