diff --git a/kcms/lookandfeel/CMakeLists.txt b/kcms/lookandfeel/CMakeLists.txt --- a/kcms/lookandfeel/CMakeLists.txt +++ b/kcms/lookandfeel/CMakeLists.txt @@ -5,6 +5,7 @@ set(kcm_lookandfeel_SRCS + kcmmain.cpp kcm.cpp ../krdb/krdb.cpp ../cursortheme/xcursor/cursortheme.cpp @@ -62,6 +63,7 @@ set(lookandfeeltool_SRCS lnftool.cpp + # TODO: load kcm plugin instead of using code copy kcm.cpp ../krdb/krdb.cpp ../cursortheme/xcursor/cursortheme.cpp diff --git a/kcms/lookandfeel/kcm.cpp b/kcms/lookandfeel/kcm.cpp --- a/kcms/lookandfeel/kcm.cpp +++ b/kcms/lookandfeel/kcm.cpp @@ -24,8 +24,6 @@ #include "config-workspace.h" #include -#include -#include #include #include #include @@ -57,8 +55,6 @@ # include #endif -K_PLUGIN_FACTORY_WITH_JSON(KCMLookandFeelFactory, "kcm_lookandfeel.json", registerPlugin();) - KCMLookandFeel::KCMLookandFeel(QObject* parent, const QVariantList& args) : KQuickAddons::ConfigModule(parent, args) , m_config(QStringLiteral("kdeglobals")) @@ -813,6 +809,3 @@ { return m_resetDefaultLayout; } - - -#include "kcm.moc" diff --git a/kcms/lookandfeel/kcmmain.cpp b/kcms/lookandfeel/kcmmain.cpp new file mode 100644 --- /dev/null +++ b/kcms/lookandfeel/kcmmain.cpp @@ -0,0 +1,26 @@ +/* This file is part of the KDE Project + Copyright (c) 2014 Marco Martin + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "kcm.h" + +#include + +K_PLUGIN_FACTORY_WITH_JSON(KCMLookandFeelFactory, "kcm_lookandfeel.json", + registerPlugin();) + +#include "kcmmain.moc"