Since 5.22, trying to do var timer = new QTimer(); in a KWin script results in error: QTimer has no invokable constructor I believe this is due to the port to QJSEngine.
Git commit d29954ae3359c4ac5d6e59cef8249427568bc00a by Vlad Zahorodnii. Committed on 19/07/2021 at 09:14. Pushed by vladz into branch 'master'. scripting: Make QTimer constructible If a QObject is exposed to js using QJSEngine::newQMetaObject(), a new instance of it can be made only with constructors exposed by Q_INVOKABLE At the moment, QTimer's constructor is not Q_INVOKABLE, so code such as `const timer = new QTimer()` will not work. FIXED-IN: 5.22.4 M +6 -1 src/scripting/scripting.cpp M +13 -0 src/scripting/scripting.h https://invent.kde.org/plasma/kwin/commit/d29954ae3359c4ac5d6e59cef8249427568bc00a
Git commit 71a1ff04b55ee62cdc2b37583c1ade6a7297847c by Vlad Zahorodnii. Committed on 19/07/2021 at 09:56. Pushed by vladz into branch 'Plasma/5.22'. scripting: Make QTimer constructible If a QObject is exposed to js using QJSEngine::newQMetaObject(), a new instance of it can be made only with constructors exposed by Q_INVOKABLE At the moment, QTimer's constructor is not Q_INVOKABLE, so code such as `const timer = new QTimer()` will not work. FIXED-IN: 5.22.4 (cherry picked from commit d29954ae3359c4ac5d6e59cef8249427568bc00a) M +6 -1 src/scripting/scripting.cpp M +13 -0 src/scripting/scripting.h https://invent.kde.org/plasma/kwin/commit/71a1ff04b55ee62cdc2b37583c1ade6a7297847c