| 131 | } |
| 132 | |
| 133 | KWin::Script::Script(int id, QString scriptName, QString pluginName, QObject *parent) |
| 134 | : AbstractScript(id, scriptName, pluginName, parent) |
| 135 | , m_engine(new QJSEngine(this)) |
| 136 | , m_starting(false) |
| 137 | { |
| 138 | // TODO: Remove in kwin 6. We have these converters only for compatibility reasons. |
| 139 | if (!QMetaType::hasRegisteredConverterFunction<QJSValue, QRect>()) { |
| 140 | QMetaType::registerConverter<QJSValue, QRect>(scriptValueToRect); |
| 141 | } |
| 142 | if (!QMetaType::hasRegisteredConverterFunction<QJSValue, QRectF>()) { |
| 143 | QMetaType::registerConverter<QJSValue, QRectF>(scriptValueToRectF); |
| 144 | } |
| 145 | |
| 146 | if (!QMetaType::hasRegisteredConverterFunction<QJSValue, QPoint>()) { |
| 147 | QMetaType::registerConverter<QJSValue, QPoint>(scriptValueToPoint); |
| 148 | } |
| 149 | if (!QMetaType::hasRegisteredConverterFunction<QJSValue, QPointF>()) { |
| 150 | QMetaType::registerConverter<QJSValue, QPointF>(scriptValueToPointF); |
| 151 | } |
| 152 | |
| 153 | if (!QMetaType::hasRegisteredConverterFunction<QJSValue, QSize>()) { |
| 154 | QMetaType::registerConverter<QJSValue, QSize>(scriptValueToSize); |
| 155 | } |
| 156 | if (!QMetaType::hasRegisteredConverterFunction<QJSValue, QSizeF>()) { |
| 157 | QMetaType::registerConverter<QJSValue, QSizeF>(scriptValueToSizeF); |
| 158 | } |
| 159 | } |
| 160 | |
| 161 | KWin::Script::~Script() |
| 162 | { |
nothing calls this directly
no outgoing calls
no test coverage detected