templateName and templateComment global variables accessible when running a template.
it says the name and comment fields of the package desktop file svn path=/trunk/KDE/kdebase/workspace/; revision=1121162
This commit is contained in:
parent
0ad362c94c
commit
2b42e85991
|
@ -296,6 +296,8 @@ QScriptValue ScriptEngine::loadTemplate(QScriptContext *context, QScriptEngine *
|
|||
}
|
||||
|
||||
ScriptEngine *env = envFor(engine);
|
||||
env->globalObject().setProperty("templateName", env->newVariant(info.name()), QScriptValue::ReadOnly | QScriptValue::Undeletable);
|
||||
env->globalObject().setProperty("templateComment", env->newVariant(info.comment()), QScriptValue::ReadOnly | QScriptValue::Undeletable);
|
||||
env->evaluateScript(script, path);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user