From 1d7ee6174130aee0b927206d82be00a9edb65918 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Mon, 16 Dec 2013 11:48:41 +0100 Subject: [PATCH] [kwin] Register QAbstractItemModel as a qml type in TabBox It's needed if we don't import any Plasma components. --- kcmkwin/kwintabbox/layoutpreview.cpp | 1 + tabbox/tabboxhandler.cpp | 1 + 2 files changed, 2 insertions(+) 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()));