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

Method create

src/scripting/scriptedeffect.cpp:158–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156}
157
158ScriptedEffect *ScriptedEffect::create(const KPluginMetaData &effect)
159{
160 const QString name = effect.pluginId();
161 QString scriptFile = QStandardPaths::locate(QStandardPaths::GenericDataLocation, KWIN_DATADIR + QLatin1String("/effects/") + name + QLatin1String("/contents/code/main.js"));
162 if (scriptFile.isEmpty()) {
163 scriptFile = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("kwin/effects/") + name + QLatin1String("/contents/code/main.js"));
164 if (scriptFile.isEmpty()) {
165 qCDebug(KWIN_SCRIPTING) << "Could not locate effect script" << name;
166 return nullptr;
167 }
168 }
169
170 return ScriptedEffect::create(name, scriptFile, effect.value(QStringLiteral("X-KDE-Ordering"), 0), effect.value(QStringLiteral("X-KWin-Exclusive-Category")));
171}
172
173ScriptedEffect *ScriptedEffect::create(const QString &effectName, const QString &pathToScript, int chainPosition, const QString &exclusiveCategory)
174{

Callers

nothing calls this directly

Calls 5

pluginIdMethod · 0.80
createFunction · 0.50
isEmptyMethod · 0.45
valueMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected