Changeset View
Changeset View
Standalone View
Standalone View
src/qml/plugin.cpp
Show All 18 Lines | |||||
19 | 19 | | |||
20 | #include "plugin.h" | 20 | #include "plugin.h" | ||
21 | 21 | | |||
22 | #include <QQmlContext> | 22 | #include <QQmlContext> | ||
23 | #include <QDebug> | 23 | #include <QDebug> | ||
24 | 24 | | |||
25 | #include <KDescendantsProxyModel> | 25 | #include <KDescendantsProxyModel> | ||
26 | #include <KNumberModel> | 26 | #include <KNumberModel> | ||
27 | #include <KColumnHeadersModel> | ||||
27 | #include "kconcatenaterowsproxymodel_qml.h" | 28 | #include "kconcatenaterowsproxymodel_qml.h" | ||
28 | 29 | | |||
29 | void Plugin::initializeEngine(QQmlEngine *engine, const char *uri) | 30 | void Plugin::initializeEngine(QQmlEngine *engine, const char *uri) | ||
30 | { | 31 | { | ||
31 | Q_UNUSED(engine); | 32 | Q_UNUSED(engine); | ||
32 | Q_UNUSED(uri); | 33 | Q_UNUSED(uri); | ||
33 | } | 34 | } | ||
34 | 35 | | |||
35 | void Plugin::registerTypes(const char *uri) | 36 | void Plugin::registerTypes(const char *uri) | ||
36 | { | 37 | { | ||
37 | #if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) | 38 | #if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) | ||
38 | qmlRegisterAnonymousType<QAbstractItemModel>(uri, 1); | 39 | qmlRegisterAnonymousType<QAbstractItemModel>(uri, 1); | ||
39 | #else | 40 | #else | ||
40 | qmlRegisterType<QAbstractItemModel>(); | 41 | qmlRegisterType<QAbstractItemModel>(); | ||
41 | #endif | 42 | #endif | ||
42 | qmlRegisterExtendedType<KConcatenateRowsProxyModel,KConcatenateRowsProxyModelQml>(uri, 1, 0, "KConcatenateRowsProxyModel"); | 43 | qmlRegisterExtendedType<KConcatenateRowsProxyModel,KConcatenateRowsProxyModelQml>(uri, 1, 0, "KConcatenateRowsProxyModel"); | ||
43 | qmlRegisterType<KDescendantsProxyModel>(uri, 1, 0, "KDescendantsProxyModel"); | 44 | qmlRegisterType<KDescendantsProxyModel>(uri, 1, 0, "KDescendantsProxyModel"); | ||
44 | qmlRegisterType<KNumberModel>(uri, 1, 0, "KNumberModel"); | 45 | qmlRegisterType<KNumberModel>(uri, 1, 0, "KNumberModel"); | ||
46 | qmlRegisterType<KColumnHeadersModel>(uri, 1, 0, "KColumnHeadersModel"); | ||||
45 | } | 47 | } | ||
46 | | ||||
47 | |