X-Git-Url: http://git.maemo.org/git/?p=qtrapids;a=blobdiff_plain;f=src%2Fqml-client%2Fmodels%2FPlugin.cpp;fp=src%2Fqml-client%2Fmodels%2FPlugin.cpp;h=a6c61650c8da53abc9f0f4ec93b235df81c09a22;hp=0000000000000000000000000000000000000000;hb=df37f9235ec253566e7f88017c1775d34fe1392a;hpb=711f20225524f059da9296f814a06ab9332bb324 diff --git a/src/qml-client/models/Plugin.cpp b/src/qml-client/models/Plugin.cpp new file mode 100644 index 0000000..a6c6165 --- /dev/null +++ b/src/qml-client/models/Plugin.cpp @@ -0,0 +1,19 @@ +#include +#include +#include + +// This class is needed to make DownloadListModel class available to QML: +class QmlDownloadListModelPlugin : public QDeclarativeExtensionPlugin +{ + Q_OBJECT +public: + virtual void registerTypes(const char *uri) + { + Q_ASSERT(QLatin1String(uri) == QLatin1String("Qt.labs.downloadlistmodel")); + qmlRegisterType(uri, 1, 0, "DownloadListModel"); + } +}; + +#include "moc_Plugin.cxx" + +Q_EXPORT_PLUGIN2(downloadlistmodelplugin, QT_PREPEND_NAMESPACE(QmlDownloadListModelPlugin)); \ No newline at end of file