[kwin/tabbox] Drop define TABBOX_KCM

No longer needed as the preview does not include the tabboxhandler
any more.
icc-effect-5.14.5
Martin Gräßlin 2013-12-12 11:29:25 +01:00
parent f63797d3b1
commit f5340a27c5
2 changed files with 0 additions and 12 deletions

View File

@ -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

View File

@ -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<QQuickWindow*>();
}
#ifndef TABBOX_KCM
SwitcherItem *TabBoxHandlerPrivate::switcherItem() const
{
if (!m_mainItem) {
@ -156,7 +153,6 @@ SwitcherItem *TabBoxHandlerPrivate::switcherItem() const
}
return m_mainItem->findChild<SwitcherItem*>();
}
#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<SwitcherItem>("org.kde.kwin", 2, 0, "Switcher");
qmlRegisterType<DesktopThumbnailItem>("org.kde.kwin", 2, 0, "DesktopThumbnailItem");
#endif
qmlRegisterType<WindowThumbnailItem>("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();