Bug 422251 - Cannot acces the translation memory after a second launch of Lokalize
Summary: Cannot acces the translation memory after a second launch of Lokalize
Status: RESOLVED FIXED
Alias: None
Product: lokalize
Classification: Applications
Component: translation memory (show other bugs)
Version: 19.04.0
Platform: Mageia RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Simon Depiets
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-30 05:29 UTC by Dimitrios Glentadakis
Modified: 2020-06-16 03:39 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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!