Make bare plugin build, correct plugin macro

This commit is contained in:
Sebastian Kügler 2013-02-12 04:37:22 +01:00
parent 4eb4608608
commit 2ca026e96e
2 changed files with 15 additions and 16 deletions

View File

@ -23,24 +23,24 @@
#include <QtDeclarative/qdeclarative.h>
#include "qpixmapitem.h"
#include "qimageitem.h"
#include "qiconitem.h"
#include "mouseeventlistener.h"
// #include "qpixmapitem.h"
// #include "qimageitem.h"
// #include "qiconitem.h"
//#include "mouseeventlistener.h"
#include "columnproxymodel.h"
void QtExtraComponentsPlugin::registerTypes(const char *uri)
{
Q_ASSERT(uri == QLatin1String("org.kde.qtextracomponents"));
qmlRegisterType<QPixmapItem>(uri, 0, 1, "QPixmapItem");
qmlRegisterType<QImageItem>(uri, 0, 1, "QImageItem");
qmlRegisterType<QIconItem>(uri, 0, 1, "QIconItem");
qmlRegisterType<MouseEventListener>(uri, 0, 1, "MouseEventListener");
qmlRegisterType<ColumnProxyModel>(uri, 0, 1, "ColumnProxyModel");
qmlRegisterType<QAbstractItemModel>();
qRegisterMetaType<QModelIndex>("QModelIndex");
// qmlRegisterType<QPixmapItem>(uri, 0, 1, "QPixmapItem");
// qmlRegisterType<QImageItem>(uri, 0, 1, "QImageItem");
// qmlRegisterType<QIconItem>(uri, 0, 1, "QIconItem");
// qmlRegisterType<MouseEventListener>(uri, 0, 1, "MouseEventListener");
// qmlRegisterType<ColumnProxyModel>(uri, 0, 1, "ColumnProxyModel");
//
// qmlRegisterType<QAbstractItemModel>();
// qRegisterMetaType<QModelIndex>("QModelIndex");
}

View File

@ -22,17 +22,16 @@
#ifndef QTEXTRACOMPONENTSPLUGIN_H
#define QTEXTRACOMPONENTSPLUGIN_H
#include <QDeclarativeExtensionPlugin>
#include <QQmlExtensionPlugin>
class QtExtraComponentsPlugin : public QDeclarativeExtensionPlugin
class QtExtraComponentsPlugin : public QQmlExtensionPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
public:
void registerTypes(const char *uri);
};
Q_EXPORT_PLUGIN2(qtextracomponentsplugin, QtExtraComponentsPlugin);
#endif