summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-02-23 23:31:31 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-02-23 23:31:31 (GMT)
commitec7ac34b4a6b1a330460838acc74a53d29f62a7c (patch)
tree5505189d15ce0a1f3b67f4cd65e4c39766080a1d /src/plugins
parent8727985d81c793d52d5e24ed6815e7237ae879f1 (diff)
parentd19f691a5646725c69b232e2adde8c2f961eb571 (diff)
downloadQt-ec7ac34b4a6b1a330460838acc74a53d29f62a7c.zip
Qt-ec7ac34b4a6b1a330460838acc74a53d29f62a7c.tar.gz
Qt-ec7ac34b4a6b1a330460838acc74a53d29f62a7c.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-qml
Conflicts: src/declarative/util/qmlanimation.cpp src/declarative/util/qmlxmllistmodel.cpp
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/qmlmodules/multimedia/multimedia.cpp16
-rw-r--r--src/plugins/qmlmodules/widgets/widgets.cpp12
2 files changed, 11 insertions, 17 deletions
diff --git a/src/plugins/qmlmodules/multimedia/multimedia.cpp b/src/plugins/qmlmodules/multimedia/multimedia.cpp
index d9414ee..0ebdfd9 100644
--- a/src/plugins/qmlmodules/multimedia/multimedia.cpp
+++ b/src/plugins/qmlmodules/multimedia/multimedia.cpp
@@ -39,27 +39,19 @@
**
****************************************************************************/
-#include <QtDeclarative/qmlmoduleplugin.h>
+#include <QtDeclarative/qmlextensionplugin.h>
#include <QtDeclarative/qml.h>
#include <QtMultimedia/qml.h>
QT_BEGIN_NAMESPACE
-class QMultimediaQmlModule : public QmlModulePlugin
+class QMultimediaQmlModule : public QmlExtensionPlugin
{
Q_OBJECT
public:
- QStringList keys() const
+ virtual void initialize(QmlEngine *engine, const char *uri)
{
- return QStringList() << QLatin1String("Qt.multimedia");
- }
-
- void defineModule(const QString& uri)
- {
- Q_UNUSED(uri)
- Q_ASSERT(uri == QLatin1String("Qt.multimedia"));
-
- QtMultimedia::qRegisterQmlElements();
+ QtMultimedia::qRegisterQmlElements(engine, uri);
}
};
diff --git a/src/plugins/qmlmodules/widgets/widgets.cpp b/src/plugins/qmlmodules/widgets/widgets.cpp
index a5cf389..72d5ce1 100644
--- a/src/plugins/qmlmodules/widgets/widgets.cpp
+++ b/src/plugins/qmlmodules/widgets/widgets.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include <QtDeclarative/qmlmoduleplugin.h>
+#include <QtDeclarative/qmlextensionplugin.h>
#include <QtDeclarative/qml.h>
#include "graphicslayouts_p.h"
@@ -110,7 +110,7 @@ private:
}
};
-class QWidgetsQmlModule : public QmlModulePlugin
+class QWidgetsQmlModule : public QmlExtensionPlugin
{
Q_OBJECT
public:
@@ -119,10 +119,12 @@ public:
return QStringList() << QLatin1String("Qt.widgets");
}
- void defineModule(const QString& uri)
+ virtual void initialize(QmlEngine *engine, const char *uri)
{
- Q_UNUSED(uri)
- Q_ASSERT(uri == QLatin1String("Qt.widgets"));
+ Q_UNUSED(uri);
+ Q_UNUSED(engine);
+
+ Q_ASSERT(QLatin1String(uri) == QLatin1String("Qt.widgets"));
QML_REGISTER_INTERFACE(QGraphicsLayoutItem);
QML_REGISTER_INTERFACE(QGraphicsLayout);