aboutsummaryrefslogtreecommitdiffstats
path: root/examples/qml/cppextensions
diff options
context:
space:
mode:
Diffstat (limited to 'examples/qml/cppextensions')
-rw-r--r--examples/qml/cppextensions/imageprovider/imageprovider.cpp6
-rw-r--r--examples/qml/cppextensions/imageprovider/imageprovider.json1
-rw-r--r--examples/qml/cppextensions/imageprovider/imageprovider.pro2
-rw-r--r--examples/qml/cppextensions/plugins/plugin.cpp6
-rw-r--r--examples/qml/cppextensions/plugins/plugin.json1
-rw-r--r--examples/qml/cppextensions/plugins/plugins.pro8
-rw-r--r--examples/qml/cppextensions/referenceexamples/attached/birthdayparty.cpp2
-rw-r--r--examples/qml/cppextensions/referenceexamples/binding/birthdayparty.cpp2
-rw-r--r--examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.cpp2
-rw-r--r--examples/qml/cppextensions/referenceexamples/default/birthdayparty.cpp2
-rw-r--r--examples/qml/cppextensions/referenceexamples/grouped/birthdayparty.cpp2
-rw-r--r--examples/qml/cppextensions/referenceexamples/methods/birthdayparty.cpp2
-rw-r--r--examples/qml/cppextensions/referenceexamples/properties/birthdayparty.cpp2
-rw-r--r--examples/qml/cppextensions/referenceexamples/signal/birthdayparty.cpp2
-rw-r--r--examples/qml/cppextensions/referenceexamples/valuesource/birthdayparty.cpp2
15 files changed, 24 insertions, 18 deletions
diff --git a/examples/qml/cppextensions/imageprovider/imageprovider.cpp b/examples/qml/cppextensions/imageprovider/imageprovider.cpp
index 506d5b0812..f6632a89e8 100644
--- a/examples/qml/cppextensions/imageprovider/imageprovider.cpp
+++ b/examples/qml/cppextensions/imageprovider/imageprovider.cpp
@@ -87,6 +87,7 @@ public:
class ImageProviderExtensionPlugin : public QQmlExtensionPlugin
{
Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface" FILE "imageprovider.json")
public:
void registerTypes(const char *uri)
{
@@ -101,7 +102,8 @@ public:
};
-#include "imageprovider.moc"
-Q_EXPORT_PLUGIN(ImageProviderExtensionPlugin);
+#define QQmlExtensionInterface_iid "org.qt-project.Qt.QQmlExtensionInterface"
+
+#include "imageprovider.moc"
diff --git a/examples/qml/cppextensions/imageprovider/imageprovider.json b/examples/qml/cppextensions/imageprovider/imageprovider.json
new file mode 100644
index 0000000000..0967ef424b
--- /dev/null
+++ b/examples/qml/cppextensions/imageprovider/imageprovider.json
@@ -0,0 +1 @@
+{}
diff --git a/examples/qml/cppextensions/imageprovider/imageprovider.pro b/examples/qml/cppextensions/imageprovider/imageprovider.pro
index f75a6ebd89..b4a832b720 100644
--- a/examples/qml/cppextensions/imageprovider/imageprovider.pro
+++ b/examples/qml/cppextensions/imageprovider/imageprovider.pro
@@ -7,6 +7,8 @@ TARGET = qmlimageproviderplugin
SOURCES += imageprovider.cpp
+OTHER_FILES += imageprovider.json
+
sources.files = $$SOURCES imageprovider.qml imageprovider.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/imageprovider
diff --git a/examples/qml/cppextensions/plugins/plugin.cpp b/examples/qml/cppextensions/plugins/plugin.cpp
index b53ef2ccb3..5e9900cb4f 100644
--- a/examples/qml/cppextensions/plugins/plugin.cpp
+++ b/examples/qml/cppextensions/plugins/plugin.cpp
@@ -141,6 +141,8 @@ MinuteTimer *TimeModel::timer=0;
class QExampleQmlPlugin : public QQmlExtensionPlugin
{
Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface" FILE "plugin.json")
+
public:
void registerTypes(const char *uri)
{
@@ -151,7 +153,3 @@ public:
//![plugin]
#include "plugin.moc"
-
-//![export]
-Q_EXPORT_PLUGIN2(qmlqtimeexampleplugin, QExampleQmlPlugin);
-//![export]
diff --git a/examples/qml/cppextensions/plugins/plugin.json b/examples/qml/cppextensions/plugins/plugin.json
new file mode 100644
index 0000000000..0967ef424b
--- /dev/null
+++ b/examples/qml/cppextensions/plugins/plugin.json
@@ -0,0 +1 @@
+{}
diff --git a/examples/qml/cppextensions/plugins/plugins.pro b/examples/qml/cppextensions/plugins/plugins.pro
index e6c7fe64a0..08a4d1a61c 100644
--- a/examples/qml/cppextensions/plugins/plugins.pro
+++ b/examples/qml/cppextensions/plugins/plugins.pro
@@ -7,7 +7,9 @@ TARGET = qmlqtimeexampleplugin
SOURCES += plugin.cpp
-qqmlsources.files += \
+OTHER_FILES += "plugin.json"
+
+qdeclarativesources.files += \
com/nokia/TimeExample/qmldir \
com/nokia/TimeExample/center.png \
com/nokia/TimeExample/clock.png \
@@ -15,11 +17,11 @@ qqmlsources.files += \
com/nokia/TimeExample/hour.png \
com/nokia/TimeExample/minute.png
-qqmlsources.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/plugins/com/nokia/TimeExample
+qdeclarativesources.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/plugins/com/nokia/TimeExample
sources.files += plugins.pro plugin.cpp plugins.qml README
sources.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/plugins
target.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/plugins/com/nokia/TimeExample
-INSTALLS += qqmlsources sources target
+INSTALLS += qdeclarativesources sources target
diff --git a/examples/qml/cppextensions/referenceexamples/attached/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/attached/birthdayparty.cpp
index 6b784fdccd..c4f906119a 100644
--- a/examples/qml/cppextensions/referenceexamples/attached/birthdayparty.cpp
+++ b/examples/qml/cppextensions/referenceexamples/attached/birthdayparty.cpp
@@ -69,7 +69,7 @@ void BirthdayParty::setHost(Person *c)
m_host = c;
}
-QQmlListProperty<Person> BirthdayParty::guests()
+QQmlListProperty<Person> BirthdayParty::guests()
{
return QQmlListProperty<Person>(this, m_guests);
}
diff --git a/examples/qml/cppextensions/referenceexamples/binding/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/binding/birthdayparty.cpp
index 9a38c3b646..62499862f0 100644
--- a/examples/qml/cppextensions/referenceexamples/binding/birthdayparty.cpp
+++ b/examples/qml/cppextensions/referenceexamples/binding/birthdayparty.cpp
@@ -75,7 +75,7 @@ void BirthdayParty::setHost(Person *c)
emit hostChanged();
}
-QQmlListProperty<Person> BirthdayParty::guests()
+QQmlListProperty<Person> BirthdayParty::guests()
{
return QQmlListProperty<Person>(this, m_guests);
}
diff --git a/examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.cpp
index d697ac22b6..e15ffe1604 100644
--- a/examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.cpp
+++ b/examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.cpp
@@ -54,7 +54,7 @@ void BirthdayParty::setHost(Person *c)
m_host = c;
}
-QQmlListProperty<Person> BirthdayParty::guests()
+QQmlListProperty<Person> BirthdayParty::guests()
{
return QQmlListProperty<Person>(this, m_guests);
}
diff --git a/examples/qml/cppextensions/referenceexamples/default/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/default/birthdayparty.cpp
index d697ac22b6..e15ffe1604 100644
--- a/examples/qml/cppextensions/referenceexamples/default/birthdayparty.cpp
+++ b/examples/qml/cppextensions/referenceexamples/default/birthdayparty.cpp
@@ -54,7 +54,7 @@ void BirthdayParty::setHost(Person *c)
m_host = c;
}
-QQmlListProperty<Person> BirthdayParty::guests()
+QQmlListProperty<Person> BirthdayParty::guests()
{
return QQmlListProperty<Person>(this, m_guests);
}
diff --git a/examples/qml/cppextensions/referenceexamples/grouped/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/grouped/birthdayparty.cpp
index d697ac22b6..e15ffe1604 100644
--- a/examples/qml/cppextensions/referenceexamples/grouped/birthdayparty.cpp
+++ b/examples/qml/cppextensions/referenceexamples/grouped/birthdayparty.cpp
@@ -54,7 +54,7 @@ void BirthdayParty::setHost(Person *c)
m_host = c;
}
-QQmlListProperty<Person> BirthdayParty::guests()
+QQmlListProperty<Person> BirthdayParty::guests()
{
return QQmlListProperty<Person>(this, m_guests);
}
diff --git a/examples/qml/cppextensions/referenceexamples/methods/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/methods/birthdayparty.cpp
index 0935d708a7..c96f41d944 100644
--- a/examples/qml/cppextensions/referenceexamples/methods/birthdayparty.cpp
+++ b/examples/qml/cppextensions/referenceexamples/methods/birthdayparty.cpp
@@ -55,7 +55,7 @@ void BirthdayParty::setHost(Person *c)
m_host = c;
}
-QQmlListProperty<Person> BirthdayParty::guests()
+QQmlListProperty<Person> BirthdayParty::guests()
{
return QQmlListProperty<Person>(this, m_guests);
}
diff --git a/examples/qml/cppextensions/referenceexamples/properties/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/properties/birthdayparty.cpp
index f7280560ab..8e79d07748 100644
--- a/examples/qml/cppextensions/referenceexamples/properties/birthdayparty.cpp
+++ b/examples/qml/cppextensions/referenceexamples/properties/birthdayparty.cpp
@@ -55,7 +55,7 @@ void BirthdayParty::setHost(Person *c)
m_host = c;
}
-QQmlListProperty<Person> BirthdayParty::guests()
+QQmlListProperty<Person> BirthdayParty::guests()
{
return QQmlListProperty<Person>(this, m_guests);
}
diff --git a/examples/qml/cppextensions/referenceexamples/signal/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/signal/birthdayparty.cpp
index 078c5f9a2d..b9f7e15907 100644
--- a/examples/qml/cppextensions/referenceexamples/signal/birthdayparty.cpp
+++ b/examples/qml/cppextensions/referenceexamples/signal/birthdayparty.cpp
@@ -70,7 +70,7 @@ void BirthdayParty::setHost(Person *c)
m_host = c;
}
-QQmlListProperty<Person> BirthdayParty::guests()
+QQmlListProperty<Person> BirthdayParty::guests()
{
return QQmlListProperty<Person>(this, m_guests);
}
diff --git a/examples/qml/cppextensions/referenceexamples/valuesource/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/valuesource/birthdayparty.cpp
index a69a58557e..aa8bc77116 100644
--- a/examples/qml/cppextensions/referenceexamples/valuesource/birthdayparty.cpp
+++ b/examples/qml/cppextensions/referenceexamples/valuesource/birthdayparty.cpp
@@ -70,7 +70,7 @@ void BirthdayParty::setHost(Person *c)
m_host = c;
}
-QQmlListProperty<Person> BirthdayParty::guests()
+QQmlListProperty<Person> BirthdayParty::guests()
{
return QQmlListProperty<Person>(this, m_guests);
}