summaryrefslogtreecommitdiffstats
path: root/examples/declarative/cppextensions/referenceexamples/attached
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-08-11 05:06:56 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-08-11 05:06:56 (GMT)
commit0c1d29300c7248ead3392bb385ceae6889dc2834 (patch)
treeabb4e514e932c280de7292179288a779211f9d8a /examples/declarative/cppextensions/referenceexamples/attached
parentb63d7dc74b30b741c6481fb41d8bb3951a9bd763 (diff)
downloadQt-0c1d29300c7248ead3392bb385ceae6889dc2834.zip
Qt-0c1d29300c7248ead3392bb385ceae6889dc2834.tar.gz
Qt-0c1d29300c7248ead3392bb385ceae6889dc2834.tar.bz2
Fix cppextension examples.
Print a useful message on error. Specify the QML url correctly.
Diffstat (limited to 'examples/declarative/cppextensions/referenceexamples/attached')
-rw-r--r--examples/declarative/cppextensions/referenceexamples/attached/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/declarative/cppextensions/referenceexamples/attached/main.cpp b/examples/declarative/cppextensions/referenceexamples/attached/main.cpp
index 5a39a98..65cbc93 100644
--- a/examples/declarative/cppextensions/referenceexamples/attached/main.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/attached/main.cpp
@@ -56,7 +56,7 @@ int main(int argc, char ** argv)
qmlRegisterType<Girl>("People", 1,0, "Girl");
QDeclarativeEngine engine;
- QDeclarativeComponent component(&engine, ":example.qml");
+ QDeclarativeComponent component(&engine, QUrl("qrc:example.qml"));
BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create());
if (party && party->host()) {
@@ -83,7 +83,7 @@ int main(int argc, char ** argv)
}
} else {
- qWarning() << "An error occurred";
+ qWarning() << component.errors();
}
return 0;