diff options
Diffstat (limited to 'examples/qml/cppextensions/referenceexamples/default')
4 files changed, 12 insertions, 12 deletions
diff --git a/examples/qml/cppextensions/referenceexamples/default/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/default/birthdayparty.cpp index 1859ca9461..e15ffe1604 100644 --- a/examples/qml/cppextensions/referenceexamples/default/birthdayparty.cpp +++ b/examples/qml/cppextensions/referenceexamples/default/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/default/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/default/birthdayparty.h index cfca6689db..3ee635039d 100644 --- a/examples/qml/cppextensions/referenceexamples/default/birthdayparty.h +++ b/examples/qml/cppextensions/referenceexamples/default/birthdayparty.h @@ -41,7 +41,7 @@ #define BIRTHDAYPARTY_H #include <QObject> -#include <QDeclarativeListProperty> +#include <QQmlListProperty> #include "person.h" // ![0] @@ -49,7 +49,7 @@ class BirthdayParty : public QObject { Q_OBJECT Q_PROPERTY(Person *host READ host WRITE setHost) - Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests) + Q_PROPERTY(QQmlListProperty<Person> guests READ guests) Q_CLASSINFO("DefaultProperty", "guests") 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/default/default.pro b/examples/qml/cppextensions/referenceexamples/default/default.pro index 6533cdd7d3..36ef39fc55 100644 --- a/examples/qml/cppextensions/referenceexamples/default/default.pro +++ b/examples/qml/cppextensions/referenceexamples/default/default.pro @@ -1,4 +1,4 @@ -QT += declarative +QT += qml SOURCES += main.cpp \ person.cpp \ @@ -7,7 +7,7 @@ HEADERS += person.h \ birthdayparty.h RESOURCES += default.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/default +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/default sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS default.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/default +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/default INSTALLS += target sources diff --git a/examples/qml/cppextensions/referenceexamples/default/main.cpp b/examples/qml/cppextensions/referenceexamples/default/main.cpp index 3a03279129..175945fc5d 100644 --- a/examples/qml/cppextensions/referenceexamples/default/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/default/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include <QCoreApplication> -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> +#include <QQmlEngine> +#include <QQmlComponent> #include <QDebug> #include "birthdayparty.h" #include "person.h" @@ -53,8 +53,8 @@ int main(int argc, char ** argv) qmlRegisterType<Boy>("People", 1,0, "Boy"); qmlRegisterType<Girl>("People", 1,0, "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()) { |