if the parsing fails, set failed to launch with a reasonable message
svn path=/trunk/KDE/kdebase/runtime/; revision=1186305
This commit is contained in:
parent
5d1f73a693
commit
3b219d6e39
@ -79,7 +79,12 @@ bool DeclarativeAppletScript::init()
|
|||||||
m_declarativeWidget->setInitializationDelayed(true);
|
m_declarativeWidget->setInitializationDelayed(true);
|
||||||
m_declarativeWidget->setQmlPath(mainScript());
|
m_declarativeWidget->setQmlPath(mainScript());
|
||||||
|
|
||||||
if (!m_declarativeWidget->engine()) {
|
if (!m_declarativeWidget->engine() || !m_declarativeWidget->engine()->rootContext() || !m_declarativeWidget->engine()->rootContext()->isValid() || m_declarativeWidget->mainComponent()->isError()) {
|
||||||
|
QString reason;
|
||||||
|
foreach (QDeclarativeError error, m_declarativeWidget->mainComponent()->errors()) {
|
||||||
|
reason += error.toString();
|
||||||
|
}
|
||||||
|
setFailedToLaunch(true, reason);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user