diff options
Diffstat (limited to 'examples/qml/cppextensions/referenceexamples/attached')
4 files changed, 12 insertions, 12 deletions
diff --git a/examples/qml/cppextensions/referenceexamples/attached/attached.pro b/examples/qml/cppextensions/referenceexamples/attached/attached.pro index 4cfd4e0aed..f4385e1a30 100644 --- a/examples/qml/cppextensions/referenceexamples/attached/attached.pro +++ b/examples/qml/cppextensions/referenceexamples/attached/attached.pro @@ -1,4 +1,4 @@ -QT += declarative +QT += qml SOURCES += main.cpp \ person.cpp \ @@ -7,7 +7,7 @@ HEADERS += person.h \ birthdayparty.h RESOURCES += attached.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/attached +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/attached sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS attached.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/attached +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/attached INSTALLS += target sources diff --git a/examples/qml/cppextensions/referenceexamples/attached/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/attached/birthdayparty.cpp index feefef4fe1..c4f906119a 100644 --- a/examples/qml/cppextensions/referenceexamples/attached/birthdayparty.cpp +++ b/examples/qml/cppextensions/referenceexamples/attached/birthdayparty.cpp @@ -69,9 +69,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/attached/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/attached/birthdayparty.h index c789c0bd51..1da6c34026 100644 --- a/examples/qml/cppextensions/referenceexamples/attached/birthdayparty.h +++ b/examples/qml/cppextensions/referenceexamples/attached/birthdayparty.h @@ -42,7 +42,7 @@ #include <QObject> #include <QDate> -#include <qdeclarative.h> +#include <qqml.h> #include "person.h" class BirthdayPartyAttached : public QObject @@ -63,7 +63,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); @@ -71,7 +71,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/attached/main.cpp b/examples/qml/cppextensions/referenceexamples/attached/main.cpp index 4c2c3003fe..ce067bbbf7 100644 --- a/examples/qml/cppextensions/referenceexamples/attached/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/attached/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include <QCoreApplication> -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> +#include <QQmlEngine> +#include <QQmlComponent> #include <QDebug> #include "birthdayparty.h" #include "person.h" @@ -55,8 +55,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()) { |