diff --git a/declarativeplugin/kdeconnectdeclarativeplugin.cpp b/declarativeplugin/kdeconnectdeclarativeplugin.cpp index ad8717e0d..d2f808167 100644 --- a/declarativeplugin/kdeconnectdeclarativeplugin.cpp +++ b/declarativeplugin/kdeconnectdeclarativeplugin.cpp @@ -122,6 +122,13 @@ void KdeConnectDeclarativePlugin::registerTypes(const char* uri) return new DaemonDbusInterface; } ); + +#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) + qmlRegisterAnonymousType(uri, 1); +#else + qmlRegisterType(); +#endif + } void KdeConnectDeclarativePlugin::initializeEngine(QQmlEngine* engine, const char* uri) diff --git a/smsapp/main.cpp b/smsapp/main.cpp index 66efcc98c..9b9af7033 100644 --- a/smsapp/main.cpp +++ b/smsapp/main.cpp @@ -62,7 +62,6 @@ int main(int argc, char *argv[]) KDBusService service(KDBusService::Unique); - qmlRegisterType(); qmlRegisterType("org.kde.kdeconnect.sms", 1, 0, "QSortFilterProxyModel"); qmlRegisterType("org.kde.kdeconnect.sms", 1, 0, "ConversationModel"); qmlRegisterType("org.kde.kdeconnect.sms", 1, 0, "ConversationListModel");