diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-05-05 01:17:15 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-05-05 01:17:15 (GMT) |
commit | c7a0cae7deb6e31c5b2e82c9a63ebe0a167fed09 (patch) | |
tree | b57be3fff131de378258a4017dddda361c8799d2 /tools | |
parent | 1fbb8472ccb3fe7c1c92e960e37f31b7077f999f (diff) | |
download | Qt-c7a0cae7deb6e31c5b2e82c9a63ebe0a167fed09.zip Qt-c7a0cae7deb6e31c5b2e82c9a63ebe0a167fed09.tar.gz Qt-c7a0cae7deb6e31c5b2e82c9a63ebe0a167fed09.tar.bz2 |
Improve error handling consistency
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qmlviewer/qmlviewer.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/qmlviewer/qmlviewer.cpp b/tools/qmlviewer/qmlviewer.cpp index 3c52cfe..00cb7f1 100644 --- a/tools/qmlviewer/qmlviewer.cpp +++ b/tools/qmlviewer/qmlviewer.cpp @@ -85,6 +85,14 @@ void QmlViewer::openQml(const QString& fileName) QmlComponent comp(canvas->engine()); comp.setData(data, QUrl()); QObject *dummyData = comp.create(); + + if(comp.isError()) { + QList<QmlError> errors = comp.errors(); + foreach (const QmlError &error, errors) { + qWarning() << error; + } + } + if (dummyData) { qWarning() << "Loaded dummy data:" << dir.filePath(qml); qml.truncate(qml.length()-4); |