ae6e6dc63c
Summary: QScriptEngine is deprecated for years and suffers bitrot. Plasma hit one super major bug with it in 5.11.0 and has now ported away. Main porting notes: - creating low level functions no longer exists The old global functions are exposed on the ScriptedEffect instance and then the QJSValue wrappers of the globalObject are modified to trampoline the methods at a wrapper level. - We can then use QJSEngine to automatically do argument error checking rather than unmarshalling a QJSValue manually which significantly reduces a lot of code. - We can't make FPX2 a native type, so these are QJSValue args and unboxed there. Long term I want overloads for animate that take int/QSize/QPoint which are native JS types, but that might be an API break. Test Plan: Hopefully comprehensive unit test which passes Tested fade/fadeDesktop manually. It's a very invasive change, so I expect some things will be broke please help test any JS effects. Reviewers: #kwin, mart, fvogt Subscribers: fvogt, zzag, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D14536
22 lines
405 B
C++
22 lines
405 B
C++
/*
|
|
KWin - the KDE window manager
|
|
This file is part of the KDE project.
|
|
|
|
SPDX-FileCopyrightText: 2012 Martin Gräßlin <mgraesslin@kde.org>
|
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
*/
|
|
|
|
#ifndef KWIN_SCRIPTINGUTILS_H
|
|
#define KWIN_SCRIPTINGUTILS_H
|
|
|
|
#include <QVariant>
|
|
|
|
namespace KWin
|
|
{
|
|
|
|
QVariant dbusToVariant(const QVariant &variant);
|
|
|
|
} // namespace KWin
|
|
|
|
#endif // KWIN_SCRIPTINGUTILS_H
|