summaryrefslogtreecommitdiffstats
path: root/examples/declarative/cppextensions/referenceexamples
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/cppextensions/referenceexamples')
-rw-r--r--examples/declarative/cppextensions/referenceexamples/adding/main.cpp4
-rw-r--r--examples/declarative/cppextensions/referenceexamples/attached/main.cpp4
-rw-r--r--examples/declarative/cppextensions/referenceexamples/binding/main.cpp4
-rw-r--r--examples/declarative/cppextensions/referenceexamples/coercion/main.cpp4
-rw-r--r--examples/declarative/cppextensions/referenceexamples/default/main.cpp4
-rw-r--r--examples/declarative/cppextensions/referenceexamples/extended/main.cpp4
-rw-r--r--examples/declarative/cppextensions/referenceexamples/grouped/main.cpp4
-rw-r--r--examples/declarative/cppextensions/referenceexamples/properties/main.cpp4
-rw-r--r--examples/declarative/cppextensions/referenceexamples/signal/main.cpp4
-rw-r--r--examples/declarative/cppextensions/referenceexamples/valuesource/main.cpp4
10 files changed, 20 insertions, 20 deletions
diff --git a/examples/declarative/cppextensions/referenceexamples/adding/main.cpp b/examples/declarative/cppextensions/referenceexamples/adding/main.cpp
index f429b6e..19cf034 100644
--- a/examples/declarative/cppextensions/referenceexamples/adding/main.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/adding/main.cpp
@@ -51,13 +51,13 @@ int main(int argc, char ** argv)
//![0]
QDeclarativeEngine engine;
- QDeclarativeComponent component(&engine, ":example.qml");
+ QDeclarativeComponent component(&engine, QUrl("qrc:example.qml"));
Person *person = qobject_cast<Person *>(component.create());
if (person) {
qWarning() << "The person's name is" << person->name();
qWarning() << "They wear a" << person->shoeSize() << "sized shoe";
} else {
- qWarning() << "An error occured";
+ qWarning() << component.errors();
}
return 0;
diff --git a/examples/declarative/cppextensions/referenceexamples/attached/main.cpp b/examples/declarative/cppextensions/referenceexamples/attached/main.cpp
index 22e844f..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 occured";
+ qWarning() << component.errors();
}
return 0;
diff --git a/examples/declarative/cppextensions/referenceexamples/binding/main.cpp b/examples/declarative/cppextensions/referenceexamples/binding/main.cpp
index 29da994..150f961 100644
--- a/examples/declarative/cppextensions/referenceexamples/binding/main.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/binding/main.cpp
@@ -57,7 +57,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()) {
@@ -85,7 +85,7 @@ int main(int argc, char ** argv)
party->startParty();
} else {
- qWarning() << "An error occured";
+ qWarning() << component.errors();
}
return app.exec();
diff --git a/examples/declarative/cppextensions/referenceexamples/coercion/main.cpp b/examples/declarative/cppextensions/referenceexamples/coercion/main.cpp
index 9b32c8b..5b16f99 100644
--- a/examples/declarative/cppextensions/referenceexamples/coercion/main.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/coercion/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()) {
@@ -70,7 +70,7 @@ int main(int argc, char ** argv)
for (int ii = 0; ii < party->guestCount(); ++ii)
qWarning() << " " << party->guest(ii)->name();
} else {
- qWarning() << "An error occured";
+ qWarning() << component.errors();
}
return 0;
diff --git a/examples/declarative/cppextensions/referenceexamples/default/main.cpp b/examples/declarative/cppextensions/referenceexamples/default/main.cpp
index f3a7068..bfba642 100644
--- a/examples/declarative/cppextensions/referenceexamples/default/main.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/default/main.cpp
@@ -54,7 +54,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()) {
@@ -68,7 +68,7 @@ int main(int argc, char ** argv)
for (int ii = 0; ii < party->guestCount(); ++ii)
qWarning() << " " << party->guest(ii)->name();
} else {
- qWarning() << "An error occured";
+ qWarning() << component.errors();
}
return 0;
diff --git a/examples/declarative/cppextensions/referenceexamples/extended/main.cpp b/examples/declarative/cppextensions/referenceexamples/extended/main.cpp
index fb7ce1a..08c8440 100644
--- a/examples/declarative/cppextensions/referenceexamples/extended/main.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/extended/main.cpp
@@ -51,14 +51,14 @@ int main(int argc, char ** argv)
qmlRegisterExtendedType<QLineEdit, LineEditExtension>("People", 1,0, "QLineEdit");
QDeclarativeEngine engine;
- QDeclarativeComponent component(&engine, ":example.qml");
+ QDeclarativeComponent component(&engine, QUrl("qrc:example.qml"));
QLineEdit *edit = qobject_cast<QLineEdit *>(component.create());
if (edit) {
edit->show();
return app.exec();
} else {
- qWarning() << "An error occured";
+ qWarning() << component.errors();
return 0;
}
}
diff --git a/examples/declarative/cppextensions/referenceexamples/grouped/main.cpp b/examples/declarative/cppextensions/referenceexamples/grouped/main.cpp
index f2e0f55..6f7f13f 100644
--- a/examples/declarative/cppextensions/referenceexamples/grouped/main.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/grouped/main.cpp
@@ -55,7 +55,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()) {
@@ -78,7 +78,7 @@ int main(int argc, char ** argv)
qWarning() << bestShoe->name() << "is wearing the best shoes!";
} else {
- qWarning() << "An error occured";
+ qWarning() << component.errors();
}
return 0;
diff --git a/examples/declarative/cppextensions/referenceexamples/properties/main.cpp b/examples/declarative/cppextensions/referenceexamples/properties/main.cpp
index b5dafe2..d974647 100644
--- a/examples/declarative/cppextensions/referenceexamples/properties/main.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/properties/main.cpp
@@ -52,7 +52,7 @@ int main(int argc, char ** argv)
qmlRegisterType<Person>("People", 1,0, "Person");
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()) {
@@ -61,7 +61,7 @@ int main(int argc, char ** argv)
for (int ii = 0; ii < party->guestCount(); ++ii)
qWarning() << " " << party->guest(ii)->name();
} else {
- qWarning() << "An error occured";
+ qWarning() << component.errors();
}
return 0;
diff --git a/examples/declarative/cppextensions/referenceexamples/signal/main.cpp b/examples/declarative/cppextensions/referenceexamples/signal/main.cpp
index 6add975..ad87bee 100644
--- a/examples/declarative/cppextensions/referenceexamples/signal/main.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/signal/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()) {
@@ -84,7 +84,7 @@ int main(int argc, char ** argv)
party->startParty();
} else {
- qWarning() << "An error occured";
+ qWarning() << component.errors();
}
return 0;
diff --git a/examples/declarative/cppextensions/referenceexamples/valuesource/main.cpp b/examples/declarative/cppextensions/referenceexamples/valuesource/main.cpp
index 5752af7..aa77665 100644
--- a/examples/declarative/cppextensions/referenceexamples/valuesource/main.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/valuesource/main.cpp
@@ -58,7 +58,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()) {
@@ -86,7 +86,7 @@ int main(int argc, char ** argv)
party->startParty();
} else {
- qWarning() << "An error occured";
+ qWarning() << component.errors();
}
return app.exec();