X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fclient%2Fmodels%2FPlugin.cpp;fp=src%2Fclient%2Fmodels%2FPlugin.cpp;h=a6c61650c8da53abc9f0f4ec93b235df81c09a22;hb=711f20225524f059da9296f814a06ab9332bb324;hp=0000000000000000000000000000000000000000;hpb=678f23ebb9d4b0f2ce713be2ce7bba9cb3c42bb5;p=qtrapids diff --git a/src/client/models/Plugin.cpp b/src/client/models/Plugin.cpp new file mode 100644 index 0000000..a6c6165 --- /dev/null +++ b/src/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