moves the registration helper methods for io related extensions into extension_io.cpp
This commit is contained in:
parent
6924341329
commit
c02557ffa6
@ -123,4 +123,20 @@ QScriptValue ScriptEnv::userDataPath(QScriptContext *context, QScriptEngine *eng
|
||||
return QString();
|
||||
}
|
||||
|
||||
void ScriptEnv::registerGetUrl(QScriptValue &obj)
|
||||
{
|
||||
QScriptValue get = obj.property("getUrl");
|
||||
if (!get.isValid()) {
|
||||
obj.setProperty("getUrl", m_engine->newFunction(ScriptEnv::getUrl));
|
||||
}
|
||||
}
|
||||
|
||||
void ScriptEnv::registerOpenUrl(QScriptValue &obj)
|
||||
{
|
||||
QScriptValue value = obj.property("openUrl");
|
||||
if (!value.isValid()) {
|
||||
obj.setProperty("openUrl", m_engine->newFunction(ScriptEnv::openUrl));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -153,22 +153,6 @@ bool ScriptEnv::checkForErrors(bool fatal)
|
||||
return false;
|
||||
}
|
||||
|
||||
void ScriptEnv::registerGetUrl(QScriptValue &obj)
|
||||
{
|
||||
QScriptValue get = obj.property("getUrl");
|
||||
if (!get.isValid()) {
|
||||
obj.setProperty("getUrl", m_engine->newFunction(ScriptEnv::getUrl));
|
||||
}
|
||||
}
|
||||
|
||||
void ScriptEnv::registerOpenUrl(QScriptValue &obj)
|
||||
{
|
||||
QScriptValue value = obj.property("openUrl");
|
||||
if (!value.isValid()) {
|
||||
obj.setProperty("openUrl", m_engine->newFunction(ScriptEnv::openUrl));
|
||||
}
|
||||
}
|
||||
|
||||
bool ScriptEnv::importBuiltinExtension(const QString &extension, QScriptValue &obj)
|
||||
{
|
||||
kDebug() << extension;
|
||||
|
Loading…
Reference in New Issue
Block a user