Move QAbstractItemModel QML workaround to declarativeplugin
This commit is contained in:
parent
81a2be7670
commit
af94100952
2 changed files with 7 additions and 1 deletions
|
@ -122,6 +122,13 @@ void KdeConnectDeclarativePlugin::registerTypes(const char* uri)
|
||||||
return new DaemonDbusInterface;
|
return new DaemonDbusInterface;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
||||||
|
qmlRegisterAnonymousType<QAbstractItemModel>(uri, 1);
|
||||||
|
#else
|
||||||
|
qmlRegisterType<QAbstractItemModel>();
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void KdeConnectDeclarativePlugin::initializeEngine(QQmlEngine* engine, const char* uri)
|
void KdeConnectDeclarativePlugin::initializeEngine(QQmlEngine* engine, const char* uri)
|
||||||
|
|
|
@ -62,7 +62,6 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
KDBusService service(KDBusService::Unique);
|
KDBusService service(KDBusService::Unique);
|
||||||
|
|
||||||
qmlRegisterType<QAbstractItemModel>();
|
|
||||||
qmlRegisterType<OurSortFilterProxyModel>("org.kde.kdeconnect.sms", 1, 0, "QSortFilterProxyModel");
|
qmlRegisterType<OurSortFilterProxyModel>("org.kde.kdeconnect.sms", 1, 0, "QSortFilterProxyModel");
|
||||||
qmlRegisterType<ConversationModel>("org.kde.kdeconnect.sms", 1, 0, "ConversationModel");
|
qmlRegisterType<ConversationModel>("org.kde.kdeconnect.sms", 1, 0, "ConversationModel");
|
||||||
qmlRegisterType<ConversationListModel>("org.kde.kdeconnect.sms", 1, 0, "ConversationListModel");
|
qmlRegisterType<ConversationListModel>("org.kde.kdeconnect.sms", 1, 0, "ConversationListModel");
|
||||||
|
|
Loading…
Reference in a new issue