kwin/scripting
David Edmundson ba7aecfe53 [scripting] Avoid threading issues when loading from a file
Summary:
KWin::Script::loadScriptFromFile ran in it's own thread and accessed
member variables of KWin::Script without any guards.

Potentially script could be destroyed whilst the file is loading.

Rather than adding mutexes everywhere, this patch scopes the QFile
object to be local to the threaded function making it independent.

BUG: 403038

Test Plan: Ran a script from a file

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18126
2019-01-09 23:37:37 +00:00
..
CMakeLists.txt
dbuscall.cpp
dbuscall.h
documentation-effect-global.xml
documentation-global.xml
genericscriptedconfig.cpp
genericscriptedconfig.h
genericscriptedconfig.json
kwinscript.desktop SVN_SILENT made messages (.desktop file) - always resolve ours 2017-09-27 09:13:10 +02:00
Messages.sh Fix message extraction 2018-05-20 08:14:50 +03:00
meta.cpp
meta.h
screenedgeitem.cpp Add support for new touch screen edge actions to declarative KWin scripts 2017-04-07 16:17:48 +02:00
screenedgeitem.h Add support for new touch screen edge actions to declarative KWin scripts 2017-04-07 16:17:48 +02:00
scriptedeffect.cpp [scripting] Introduce complete function 2018-11-17 13:44:20 +02:00
scriptedeffect.h [scripting] Introduce complete function 2018-11-17 13:44:20 +02:00
scripting.cpp [scripting] Avoid threading issues when loading from a file 2019-01-09 23:37:37 +00:00
scripting.h [scripting] Avoid threading issues when loading from a file 2019-01-09 23:37:37 +00:00
scripting_logging.cpp
scripting_logging.h
scripting_model.cpp
scripting_model.h
scriptingutils.cpp
scriptingutils.h Add support for new touch screen callbacks to KWin scripts and scripted effects 2017-04-07 16:18:09 +02:00
timer.cpp
workspace_wrapper.cpp Port some displayWidth/displayHeight usages to Screens::size() 2017-09-01 17:11:10 +02:00
workspace_wrapper.h Remove Qt module declarations in includes 2018-06-05 18:07:23 +01:00