From f5340a27c52903ae5a3dfc52d6c6dfd6170f2bfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 12 Dec 2013 11:29:25 +0100 Subject: [PATCH] [kwin/tabbox] Drop define TABBOX_KCM No longer needed as the preview does not include the tabboxhandler any more. --- kcmkwin/kwintabbox/CMakeLists.txt | 2 -- tabbox/tabboxhandler.cpp | 10 ---------- 2 files changed, 12 deletions(-) diff --git a/kcmkwin/kwintabbox/CMakeLists.txt b/kcmkwin/kwintabbox/CMakeLists.txt index 6aa6c6a0f0..e1438f47f6 100644 --- a/kcmkwin/kwintabbox/CMakeLists.txt +++ b/kcmkwin/kwintabbox/CMakeLists.txt @@ -2,8 +2,6 @@ include_directories( ${KDEBASE_WORKSPACE_SOURCE_DIR}/kwin/tabbox ${KDEBASE_WORKS ########### next target ############### -add_definitions(-DTABBOX_KCM) - set(kcm_kwintabbox_PART_SRCS main.cpp layoutpreview.cpp diff --git a/tabbox/tabboxhandler.cpp b/tabbox/tabboxhandler.cpp index 9474fa6712..99a47d3610 100644 --- a/tabbox/tabboxhandler.cpp +++ b/tabbox/tabboxhandler.cpp @@ -71,9 +71,7 @@ public: void show(); QQuickWindow *window() const; -#ifndef TABBOX_KCM SwitcherItem *switcherItem() const; -#endif ClientModel* clientModel() const; DesktopModel* desktopModel() const; @@ -143,7 +141,6 @@ QQuickWindow *TabBoxHandlerPrivate::window() const return m_mainItem->findChild(); } -#ifndef TABBOX_KCM SwitcherItem *TabBoxHandlerPrivate::switcherItem() const { if (!m_mainItem) { @@ -156,7 +153,6 @@ SwitcherItem *TabBoxHandlerPrivate::switcherItem() const } return m_mainItem->findChild(); } -#endif ClientModel* TabBoxHandlerPrivate::clientModel() const { @@ -294,10 +290,8 @@ void TabBoxHandlerPrivate::show() { if (m_qmlEngine.isNull()) { m_qmlEngine.reset(new QQmlEngine); -#ifndef TABBOX_KCM qmlRegisterType("org.kde.kwin", 2, 0, "Switcher"); qmlRegisterType("org.kde.kwin", 2, 0, "DesktopThumbnailItem"); -#endif qmlRegisterType("org.kde.kwin", 2, 0, "ThumbnailItem"); } if (m_qmlComponent.isNull()) { @@ -319,7 +313,6 @@ void TabBoxHandlerPrivate::show() return; } } -#ifndef TABBOX_KCM if (SwitcherItem *item = switcherItem()) { if (!item->model()) { QAbstractItemModel *model = nullptr; @@ -335,7 +328,6 @@ void TabBoxHandlerPrivate::show() // everything is prepared, so let's make the whole thing visible item->setVisible(true); } -#endif } /*********************************************** @@ -394,11 +386,9 @@ void TabBoxHandler::hide(bool abort) if (d->config.isHighlightWindows()) { d->endHighlightWindows(abort); } -#ifndef TABBOX_KCM if (SwitcherItem *item = d->switcherItem()) { item->setVisible(false); } -#endif if (QQuickWindow *w = d->window()) { w->hide(); w->destroy();