and optional ones now too
svn path=/trunk/KDE/kdebase/runtime/; revision=1047346
This commit is contained in:
parent
9d91ea5a8c
commit
27f4697300
@ -388,16 +388,30 @@ bool SimpleJavaScriptApplet::importExtensions()
|
||||
i18n("Authorization for required extension '%1' was denied.",
|
||||
extension));
|
||||
return false;
|
||||
} else {
|
||||
m_engine->importExtension(extension);
|
||||
if (m_engine->hasUncaughtException()) {
|
||||
reportError(m_engine, true);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
m_engine->importExtension(extension);
|
||||
if (m_engine->hasUncaughtException()) {
|
||||
reportError(m_engine, true);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
QStringList optionalExtensions = info.property("X-Plasma-OptionalExtensions").toStringList();
|
||||
foreach (const QString &extension, requiredExtensions) {
|
||||
if (!applet()->hasAuthorization(extension)) {
|
||||
setFailedToLaunch(true,
|
||||
i18n("Authorization for required extension '%1' was denied.",
|
||||
extension));
|
||||
continue;
|
||||
}
|
||||
|
||||
m_engine->importExtension(extension);
|
||||
if (m_engine->hasUncaughtException()) {
|
||||
reportError(m_engine);
|
||||
}
|
||||
}
|
||||
|
||||
kDebug() << "extensions are" << optionalExtensions;
|
||||
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user