diff options
Diffstat (limited to 'examples/qml/cppextensions/referenceexamples/methods')
4 files changed, 12 insertions, 12 deletions
diff --git a/examples/qml/cppextensions/referenceexamples/methods/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/methods/birthdayparty.cpp index 35444f505a..c96f41d944 100644 --- a/examples/qml/cppextensions/referenceexamples/methods/birthdayparty.cpp +++ b/examples/qml/cppextensions/referenceexamples/methods/birthdayparty.cpp @@ -55,9 +55,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/methods/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/methods/birthdayparty.h index e49afdb78d..df8a859972 100644 --- a/examples/qml/cppextensions/referenceexamples/methods/birthdayparty.h +++ b/examples/qml/cppextensions/referenceexamples/methods/birthdayparty.h @@ -41,21 +41,21 @@ #define BIRTHDAYPARTY_H #include <QObject> -#include <QDeclarativeListProperty> +#include <QQmlListProperty> #include "person.h" 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) public: BirthdayParty(QObject *parent = 0); 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/methods/main.cpp b/examples/qml/cppextensions/referenceexamples/methods/main.cpp index d037d88f20..1e502c3943 100644 --- a/examples/qml/cppextensions/referenceexamples/methods/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/methods/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include <QCoreApplication> -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> +#include <QQmlEngine> +#include <QQmlComponent> #include <QDebug> #include "birthdayparty.h" #include "person.h" @@ -51,8 +51,8 @@ int main(int argc, char ** argv) qmlRegisterType<BirthdayParty>("People", 1,0, "BirthdayParty"); qmlRegisterType<Person>("People", 1,0, "Person"); - 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()) { diff --git a/examples/qml/cppextensions/referenceexamples/methods/methods.pro b/examples/qml/cppextensions/referenceexamples/methods/methods.pro index ee28355188..f4c63bfa29 100644 --- a/examples/qml/cppextensions/referenceexamples/methods/methods.pro +++ b/examples/qml/cppextensions/referenceexamples/methods/methods.pro @@ -1,4 +1,4 @@ -QT += declarative +QT += qml SOURCES += main.cpp \ person.cpp \ @@ -7,7 +7,7 @@ HEADERS += person.h \ birthdayparty.h RESOURCES += methods.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/methods +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/methods sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS methods.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/methods +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/methods INSTALLS += target sources |