diff options
Diffstat (limited to 'examples/qml/cppextensions/referenceexamples/coercion')
4 files changed, 12 insertions, 12 deletions
diff --git a/examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.cpp index 1859ca9461..e15ffe1604 100644 --- a/examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.cpp +++ b/examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.cpp @@ -54,9 +54,9 @@ void BirthdayParty::setHost(Person *c) m_host = c; } -QDeclarativeListProperty<Person> BirthdayParty::guests() +QQmlListProperty<Person> BirthdayParty::guests() { - return QDeclarativeListProperty<Person>(this, m_guests); + return QQmlListProperty<Person>(this, m_guests); } int BirthdayParty::guestCount() const diff --git a/examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.h index 4315d3727e..43611693d9 100644 --- a/examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.h +++ b/examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.h @@ -41,7 +41,7 @@ #define BIRTHDAYPARTY_H #include <QObject> -#include <QDeclarativeListProperty> +#include <QQmlListProperty> #include "person.h" class BirthdayParty : public QObject @@ -49,7 +49,7 @@ class BirthdayParty : public QObject Q_OBJECT // ![0] Q_PROPERTY(Person *host READ host WRITE setHost) - Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests) + Q_PROPERTY(QQmlListProperty<Person> guests READ guests) // ![0] public: BirthdayParty(QObject *parent = 0); @@ -57,7 +57,7 @@ public: Person *host() const; void setHost(Person *); - QDeclarativeListProperty<Person> guests(); + QQmlListProperty<Person> guests(); int guestCount() const; Person *guest(int) const; diff --git a/examples/qml/cppextensions/referenceexamples/coercion/coercion.pro b/examples/qml/cppextensions/referenceexamples/coercion/coercion.pro index 742b85b683..60e8532bab 100644 --- a/examples/qml/cppextensions/referenceexamples/coercion/coercion.pro +++ b/examples/qml/cppextensions/referenceexamples/coercion/coercion.pro @@ -1,4 +1,4 @@ -QT += declarative +QT += qml SOURCES += main.cpp \ person.cpp \ @@ -7,7 +7,7 @@ HEADERS += person.h \ birthdayparty.h RESOURCES += coercion.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/coercion +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/coercion sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS coercion.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/coercion +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/coercion INSTALLS += target sources diff --git a/examples/qml/cppextensions/referenceexamples/coercion/main.cpp b/examples/qml/cppextensions/referenceexamples/coercion/main.cpp index 95b309de4c..15e41ca597 100644 --- a/examples/qml/cppextensions/referenceexamples/coercion/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/coercion/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include <QCoreApplication> -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> +#include <QQmlEngine> +#include <QQmlComponent> #include <QDebug> #include "birthdayparty.h" #include "person.h" @@ -58,8 +58,8 @@ int main(int argc, char ** argv) qmlRegisterType<Girl>("People", 1,0, "Girl"); //![register boy girl] - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl("qrc:example.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl("qrc:example.qml")); BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create()); if (party && party->host()) { |