diff --git a/kcmkwin/kwintabbox/layoutpreview.cpp b/kcmkwin/kwintabbox/layoutpreview.cpp index a5922a0a3c..6af3cc6251 100644 --- a/kcmkwin/kwintabbox/layoutpreview.cpp +++ b/kcmkwin/kwintabbox/layoutpreview.cpp @@ -43,6 +43,7 @@ LayoutPreview::LayoutPreview(const QString &path, QObject *parent) QQmlComponent *component = new QQmlComponent(engine, this); qmlRegisterType("org.kde.kwin", 2, 0, "ThumbnailItem"); qmlRegisterType("org.kde.kwin", 2, 0, "Switcher"); + qmlRegisterType(); component->loadUrl(QUrl::fromLocalFile(path)); QObject *item = component->create(); auto findSwitcher = [item]() -> SwitcherItem* { diff --git a/tabbox/tabboxhandler.cpp b/tabbox/tabboxhandler.cpp index 99a47d3610..8514e06c90 100644 --- a/tabbox/tabboxhandler.cpp +++ b/tabbox/tabboxhandler.cpp @@ -293,6 +293,7 @@ void TabBoxHandlerPrivate::show() qmlRegisterType("org.kde.kwin", 2, 0, "Switcher"); qmlRegisterType("org.kde.kwin", 2, 0, "DesktopThumbnailItem"); qmlRegisterType("org.kde.kwin", 2, 0, "ThumbnailItem"); + qmlRegisterType(); } if (m_qmlComponent.isNull()) { m_qmlComponent.reset(new QQmlComponent(m_qmlEngine.data()));