MCPcopy Create free account
hub / github.com/Sonic-DE/sonic-win / Scripting

Method Scripting

src/scripting/scripting.cpp:626–639  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

624}
625
626KWin::Scripting::Scripting(QObject *parent)
627 : QObject(parent)
628 , m_scriptsLock(new QRecursiveMutex)
629 , m_qmlEngine(new QQmlEngine(this))
630 , m_declarativeScriptSharedContext(new QQmlContext(m_qmlEngine, this))
631 , m_workspaceWrapper(new QtScriptWorkspaceWrapper(this))
632{
633 m_qmlEngine->setProperty("_kirigamiTheme", QStringLiteral("KirigamiPlasmaStyle"));
634 m_qmlEngine->rootContext()->setContextObject(new KLocalizedQmlContext(m_qmlEngine));
635 init();
636 QDBusConnection::sessionBus().registerObject(QStringLiteral("/Scripting"), this, QDBusConnection::ExportScriptableContents | QDBusConnection::ExportScriptableInvokables);
637 connect(Workspace::self(), &Workspace::configChanged, this, &Scripting::start);
638 connect(Workspace::self(), &Workspace::workspaceInitialized, this, &Scripting::start);
639}
640
641void KWin::Scripting::init()
642{

Callers

nothing calls this directly

Calls 3

selfFunction · 0.85
setPropertyMethod · 0.80
initFunction · 0.50

Tested by

no test coverage detected