diff --git a/applets/kicker/plugin/kickerplugin.cpp b/applets/kicker/plugin/kickerplugin.cpp index e2896879e..b1d53873f 100644 --- a/applets/kicker/plugin/kickerplugin.cpp +++ b/applets/kicker/plugin/kickerplugin.cpp @@ -29,7 +29,7 @@ void KickerPlugin::registerTypes(const char *uri) { Q_ASSERT(QLatin1String(uri) == QLatin1String("org.kde.plasma.private.kicker")); - qmlRegisterType(); + qmlRegisterAnonymousType("", 1); qmlRegisterType(uri, 0, 1, "AppsModel"); qmlRegisterType(uri, 0, 1, "ComputerModel"); diff --git a/components/shellprivate/shellprivateplugin.cpp b/components/shellprivate/shellprivateplugin.cpp index a3a1da5d5..34e1de92a 100644 --- a/components/shellprivate/shellprivateplugin.cpp +++ b/components/shellprivate/shellprivateplugin.cpp @@ -16,6 +16,6 @@ void PlasmaShellPrivatePlugin::registerTypes(const char *uri) { Q_ASSERT(uri == QLatin1String("org.kde.plasma.private.shell")); - qmlRegisterType(); + qmlRegisterAnonymousType("", 1); qmlRegisterType(uri, 2, 0, "WidgetExplorer"); } diff --git a/kcms/colors/colors.cpp b/kcms/colors/colors.cpp index fb2459972..ec92e5b1f 100644 --- a/kcms/colors/colors.cpp +++ b/kcms/colors/colors.cpp @@ -57,10 +57,11 @@ KCMColors::KCMColors(QObject *parent, const KPluginMetaData &data, const QVarian , m_data(new ColorsData(this)) , m_config(KSharedConfig::openConfig(QStringLiteral("kdeglobals"))) { - qmlRegisterUncreatableType("org.kde.private.kcms.colors", 1, 0, "KCM", QStringLiteral("Cannot create instances of KCM")); - qmlRegisterType(); - qmlRegisterType(); - qmlRegisterType(); + auto uri = "org.kde.private.kcms.colors"; + qmlRegisterUncreatableType(uri, 1, 0, "KCM", QStringLiteral("Cannot create instances of KCM")); + qmlRegisterAnonymousType(uri, 1); + qmlRegisterAnonymousType(uri, 1); + qmlRegisterAnonymousType(uri, 1); KAboutData *about = new KAboutData(QStringLiteral("kcm_colors"), i18n("Colors"), QStringLiteral("2.0"), QString(), KAboutLicense::GPL); diff --git a/kcms/desktoptheme/kcm.cpp b/kcms/desktoptheme/kcm.cpp index 4462c82f5..e57112ab4 100644 --- a/kcms/desktoptheme/kcm.cpp +++ b/kcms/desktoptheme/kcm.cpp @@ -44,7 +44,7 @@ KCMDesktopTheme::KCMDesktopTheme(QObject *parent, const KPluginMetaData &data, c , m_filteredModel(new FilterProxyModel(this)) , m_haveThemeExplorerInstalled(false) { - qmlRegisterType(); + qmlRegisterAnonymousType("org.kde.private.kcms.desktoptheme", 1); qmlRegisterUncreatableType("org.kde.private.kcms.desktoptheme", 1, 0, "ThemesModel", "Cannot create ThemesModel"); qmlRegisterUncreatableType("org.kde.private.kcms.desktoptheme", 1, 0, "FilterProxyModel", "Cannot create FilterProxyModel"); diff --git a/kcms/icons/main.cpp b/kcms/icons/main.cpp index a75ada3ce..06e74c6fd 100644 --- a/kcms/icons/main.cpp +++ b/kcms/icons/main.cpp @@ -59,12 +59,13 @@ IconModule::IconModule(QObject *parent, const KPluginMetaData &data, const QVari , m_model(new IconsModel(m_data->settings(), this)) , m_iconSizeCategoryModel(new IconSizeCategoryModel(this)) { - qmlRegisterType(); - qmlRegisterType(); - qmlRegisterType(); + auto uri = "org.kde.private.kcms.icons"; + qmlRegisterAnonymousType(uri, 1); + qmlRegisterAnonymousType(uri, 1); + qmlRegisterAnonymousType(uri, 1); // to be able to access its enums - qmlRegisterUncreatableType("org.kde.private.kcms.icons", 1, 0, "KIconLoader", QString()); + qmlRegisterUncreatableType(uri, 1, 0, "KIconLoader", QString()); KAboutData *about = new KAboutData(QStringLiteral("kcm5_icons"), i18n("Icons"), diff --git a/kcms/lookandfeel/kcm.cpp b/kcms/lookandfeel/kcm.cpp index b7e1023d0..08c81e84d 100644 --- a/kcms/lookandfeel/kcm.cpp +++ b/kcms/lookandfeel/kcm.cpp @@ -57,9 +57,9 @@ KCMLookandFeel::KCMLookandFeel(QObject *parent, const KPluginMetaData &data, con : KQuickAddons::ManagedConfigModule(parent, data, args) , m_lnf(new LookAndFeelManager(this)) { - qmlRegisterType(); - qmlRegisterType(); - qmlRegisterType(); + qmlRegisterAnonymousType("", 1); + qmlRegisterAnonymousType("", 1); + qmlRegisterAnonymousType("", 1); KAboutData *about = new KAboutData(QStringLiteral("kcm_lookandfeel"), i18n("Global Theme"), QStringLiteral("0.1"), QString(), KAboutLicense::LGPL); about->addAuthor(i18n("Marco Martin"), QString(), QStringLiteral("mart@kde.org")); diff --git a/kcms/style/kcmstyle.cpp b/kcms/style/kcmstyle.cpp index 789339a03..1adb9c9da 100644 --- a/kcms/style/kcmstyle.cpp +++ b/kcms/style/kcmstyle.cpp @@ -70,9 +70,10 @@ KCMStyle::KCMStyle(QObject *parent, const KPluginMetaData &data, const QVariantL , m_data(new StyleData(this)) , m_model(new StylesModel(this)) { - qmlRegisterUncreatableType("org.kde.private.kcms.style", 1, 0, "KCM", QStringLiteral("Cannot create instances of KCM")); - qmlRegisterType(); - qmlRegisterType(); + auto uri = "org.kde.private.kcms.style"; + qmlRegisterUncreatableType(uri, 1, 0, "KCM", QStringLiteral("Cannot create instances of KCM")); + qmlRegisterAnonymousType(uri, 1); + qmlRegisterAnonymousType(uri, 1); qmlRegisterType("org.kde.private.kcms.style", 1, 0, "PreviewItem"); KAboutData *about = new KAboutData(QStringLiteral("kcm_style"),