Version: 1.4 (KDE 4.8) (using Devel) OS: Linux Also happens when opening the same project again. Reproducible: Always Steps to Reproduce: 1. Open a project (with many files, for example l10n-kde4/[lang], so that adding doesn't finish immediately) 2. Click "Add to translation memory" from context menu 3. Open another project 2. can also be: 2a. Open "Manage translation memories" 2b. Create a new translation memory 2c. Add data to TM Actual Results: The job seems to be running, but it doesn't progress anymore. Expected Results: The job either cancels or continues to progress.
I’ve been able to verify that stopping them is the intended behavior: https://cgit.kde.org/lokalize.git/tree/src/project/project.cpp#n158 (“qCDebug(LOKALIZE_LOG) << "loading" << newProjectPath << "finishing tm jobs...";”) I think the problem is that the line right before stops the threads where the underlying jobs are run, but the progress report job is never finished.
Git commit b5f5c8eb13f81702171ff2caae17d5e3e64b0026 by Adrián Chaves. Committed on 01/09/2019 at 12:19. Pushed by adrianchavesfernandez into branch 'master'. Delete translation memory “meta” scan jobs when switching projects Summary: When you start an operation to add files to the translation memory of the current project, a “meta” job is created and registered in the system with KIO, so that there is a system-wide progress report. When you switch to a different project before the process finishes, however, the process stops (as in stops progressing) but the notification continues, and needs to be manually stopped by the user. The reason is that on project switch we are cancelling all the jobs that perform the actual scanning, but we are leaving the parent job responsible for reporting the total progress in memory. The proposed changes aim to fix that. I must say however that I do not consider myself a C++/Qt programmer, but rather a Python programmer. So please pay close attention to the code, in case I’m doing something silly. I’m also completely open to any kind of style feedback, including variable naming. Test Plan: Tested manually. Reviewers: shaforostoff, aacid, sdepiets, aspotashev Reviewed By: aacid Differential Revision: https://phabricator.kde.org/D23244 M +1 -3 src/tm/jobs.h M +6 -4 src/tm/tmscanapi.cpp M +2 -0 src/tm/tmscanapi.h https://commits.kde.org/lokalize/b5f5c8eb13f81702171ff2caae17d5e3e64b0026