Error handling for component loading

This commit is contained in:
Thomas Perl 2014-01-04 12:50:42 +01:00
parent 1533ecbcf2
commit 0afaba02d0

View file

@ -47,7 +47,10 @@ Item {
function loadPage(filename, properties) { function loadPage(filename, properties) {
var component = Qt.createComponent(filename); var component = Qt.createComponent(filename);
console.log('error: ' + component.errorString()); if (component.status != Component.Ready) {
console.log('Error loading ' + filename + ':' +
component.errorString());
}
if (properties === undefined) { if (properties === undefined) {
component.createObject(pgst); component.createObject(pgst);
} else { } else {