summaryrefslogtreecommitdiffstats
path: root/examples/declarative/extending/default/main.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-07-07 03:28:56 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-07-07 03:28:56 (GMT)
commitf0062920559dd44f5f463ea4c3fa2657fceb81fb (patch)
tree58fd70afedd518c45d9e76847c889b805b07eb7f /examples/declarative/extending/default/main.cpp
parent5972bfc6adaa32e4b21eb31a224346f143cbc530 (diff)
downloadQt-f0062920559dd44f5f463ea4c3fa2657fceb81fb.zip
Qt-f0062920559dd44f5f463ea4c3fa2657fceb81fb.tar.gz
Qt-f0062920559dd44f5f463ea4c3fa2657fceb81fb.tar.bz2
Improve QmlComponent API
Having to use QUrl::fromLocalFile() is crummy. Add appropriate overloads the QmlComponent, and resolve relative paths against a "base url" set on the QmlEngine.
Diffstat (limited to 'examples/declarative/extending/default/main.cpp')
-rw-r--r--examples/declarative/extending/default/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/declarative/extending/default/main.cpp b/examples/declarative/extending/default/main.cpp
index 7439ba9..75846fa 100644
--- a/examples/declarative/extending/default/main.cpp
+++ b/examples/declarative/extending/default/main.cpp
@@ -10,7 +10,7 @@ int main(int argc, char ** argv)
QCoreApplication app(argc, argv);
QmlEngine engine;
- QmlComponent component(&engine, QUrl::fromLocalFile(":example.qml"));
+ QmlComponent component(&engine, ":example.qml");
BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create());
if (party && party->celebrant()) {