tageditor/renamingutility
Martchus 4531d10a81 Move QJSEngine into the thread which executes the JavaScript
This fixes https://github.com/Martchus/tageditor/issues/50.

When keeping the QJSEngine tied to the main thread the garbage
collector will run on the main thread's event loop. This leads to
crashes when trying to allocate memory within the engine from
another thread (`QV4::PersistentValueStorage::allocate()`).

The Qt documentation does not mention that the garbage collector
might run on the event loop of the thread tied to the JSEngine.
I expected it only to run after or before allocations/deletions
within the thread calling the engine's methods. There is already
an issue regarding the lack of documentation:
https://bugreports.qt.io/browse/QTBUG-57227

I found no way to obtain the QThread object for a thread started
with Qt Concurrent. The possibility I found was calling
`QThread::currentThread()` from the concurrent thread once it has
already been started. However, when the concurrent thread has
been started it might already be too late to move the engine.
Adding further synchronization to solve this is an overkill so
I resorted to using QThread directly.
2019-10-11 19:47:30 +02:00
..
filesystemitem.cpp Refactor and improve coding style of renaming utility 2018-08-15 21:49:06 +02:00
filesystemitem.h Refactor and improve coding style of renaming utility 2018-08-15 21:49:06 +02:00
filesystemitemmodel.cpp Refactor and improve coding style of renaming utility 2018-08-15 21:49:06 +02:00
filesystemitemmodel.h Use override 2019-06-01 12:45:12 +02:00
filteredfilesystemitemmodel.cpp Don't use deprecated Qt features 2019-05-04 22:17:28 +02:00
filteredfilesystemitemmodel.h Use override 2019-06-01 12:45:12 +02:00
jsdefs.h Apply changes from jsincludes.h template 2018-04-29 18:59:41 +02:00
jsincludes.h Apply changes from jsincludes.h template 2018-04-29 18:59:41 +02:00
renamingengine.cpp Move QJSEngine into the thread which executes the JavaScript 2019-10-11 19:47:30 +02:00
renamingengine.h Move QJSEngine into the thread which executes the JavaScript 2019-10-11 19:47:30 +02:00
tageditorobject.cpp Remove leftovers from old notification system in JS code 2019-10-08 18:55:08 +02:00
tageditorobject.h Improve renaming tool 2018-11-15 21:36:12 +01:00