Fix exporting of EffectWindowList to scripts

This commit is contained in:
Martin Gräßlin 2012-02-02 18:00:07 +01:00
parent ab0daa1701
commit 875df96143
2 changed files with 4 additions and 2 deletions

View file

@ -69,7 +69,7 @@ class ScreenPaintData;
typedef QPair< QString, Effect* > EffectPair;
typedef QPair< Effect*, Window > InputWindowPair;
typedef QList< EffectWindow* > EffectWindowList;
typedef QList< KWin::EffectWindow* > EffectWindowList;
/** @defgroup kwineffects KWin effects library
@ -596,7 +596,7 @@ class KWIN_EXPORT EffectsHandler : public QObject
* if used manually.
*/
Q_PROPERTY(qreal animationTimeFactor READ animationTimeFactor)
Q_PROPERTY(EffectWindowList stackingOrder READ stackingOrder)
Q_PROPERTY(QList< KWin::EffectWindow* > stackingOrder READ stackingOrder)
/**
* Whether window decorations use the alpha channel.
**/
@ -2373,6 +2373,7 @@ void Motion<T>::finish()
} // namespace
Q_DECLARE_METATYPE(KWin::EffectWindow*)
Q_DECLARE_METATYPE(QList<KWin::EffectWindow*>)
/** @} */

View file

@ -152,6 +152,7 @@ bool ScriptedEffect::init(const QString &effectName, const QString &pathToScript
MetaScripting::registration(m_engine);
qScriptRegisterMetaType<KEffectWindowRef>(m_engine, effectWindowToScriptValue, effectWindowFromScriptValue);
qScriptRegisterMetaType<KWin::FPx2>(m_engine, fpx2ToScriptValue, fpx2FromScriptValue);
qScriptRegisterSequenceMetaType<QList< KWin::EffectWindow* > >(m_engine);
// add our print
QScriptValue printFunc = m_engine->newFunction(kwinEffectScriptPrint);
printFunc.setData(m_engine->newQObject(this));