[kcmkwin/compositing] Improve initialization of kdeclarative
We need kdeclarative for i18n support. This needs to be done before we load the source. By that we don't need to import Plasma.Core which isn't used by the views at all. Also we don't need to link twice against declarative.
This commit is contained in:
parent
5d4ddbf01c
commit
7292938520
6 changed files with 4 additions and 10 deletions
|
@ -39,7 +39,6 @@ target_link_libraries(kwincompositing
|
||||||
KF5::Service
|
KF5::Service
|
||||||
KF5::KCMUtils
|
KF5::KCMUtils
|
||||||
KF5::NewStuff
|
KF5::NewStuff
|
||||||
KF5::Declarative
|
|
||||||
kwin4_effect_builtins
|
kwin4_effect_builtins
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -71,7 +70,6 @@ target_link_libraries(effectModelTest
|
||||||
KF5::Service
|
KF5::Service
|
||||||
KF5::KCMUtils
|
KF5::KCMUtils
|
||||||
KF5::NewStuff
|
KF5::NewStuff
|
||||||
KF5::Declarative
|
|
||||||
kwin4_effect_builtins
|
kwin4_effect_builtins
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
|
|
||||||
#include <kcmodule.h>
|
#include <kcmodule.h>
|
||||||
#include <kservice.h>
|
#include <kservice.h>
|
||||||
#include <kdeclarative/kdeclarative.h>
|
|
||||||
|
|
||||||
class KWinCompositingKCM : public KCModule
|
class KWinCompositingKCM : public KCModule
|
||||||
{
|
{
|
||||||
|
@ -68,9 +67,6 @@ KWinCompositingKCM::KWinCompositingKCM(QWidget* parent, const QVariantList& args
|
||||||
: KCModule(parent, args)
|
: KCModule(parent, args)
|
||||||
, m_view(new KWin::Compositing::EffectView(viewType))
|
, m_view(new KWin::Compositing::EffectView(viewType))
|
||||||
{
|
{
|
||||||
KDeclarative::KDeclarative kdeclarative;
|
|
||||||
kdeclarative.setDeclarativeEngine(m_view->engine());
|
|
||||||
kdeclarative.setupBindings();
|
|
||||||
QVBoxLayout *vl = new QVBoxLayout(this);
|
QVBoxLayout *vl = new QVBoxLayout(this);
|
||||||
|
|
||||||
QWidget *w = QWidget::createWindowContainer(m_view.data(), this);
|
QWidget *w = QWidget::createWindowContainer(m_view.data(), this);
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include <KSharedConfig>
|
#include <KSharedConfig>
|
||||||
#include <KCModuleProxy>
|
#include <KCModuleProxy>
|
||||||
#include <KPluginTrader>
|
#include <KPluginTrader>
|
||||||
|
#include <kdeclarative/kdeclarative.h>
|
||||||
|
|
||||||
#include <QAbstractItemModel>
|
#include <QAbstractItemModel>
|
||||||
#include <QDBusConnection>
|
#include <QDBusConnection>
|
||||||
|
@ -511,6 +512,9 @@ EffectView::EffectView(ViewType type, QWindow *parent)
|
||||||
|
|
||||||
void EffectView::init(ViewType type)
|
void EffectView::init(ViewType type)
|
||||||
{
|
{
|
||||||
|
KDeclarative::KDeclarative kdeclarative;
|
||||||
|
kdeclarative.setDeclarativeEngine(engine());
|
||||||
|
kdeclarative.setupBindings();
|
||||||
QString path;
|
QString path;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case CompositingSettingsView:
|
case CompositingSettingsView:
|
||||||
|
|
|
@ -23,7 +23,6 @@ import QtQuick 2.1
|
||||||
import QtQuick.Controls 1.0
|
import QtQuick.Controls 1.0
|
||||||
import QtQuick.Layouts 1.0
|
import QtQuick.Layouts 1.0
|
||||||
import org.kde.kwin.kwincompositing 1.0
|
import org.kde.kwin.kwincompositing 1.0
|
||||||
import org.kde.plasma.core 2.0
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
signal changed
|
signal changed
|
||||||
|
|
|
@ -22,7 +22,6 @@ import QtQuick 2.1
|
||||||
import QtQuick.Controls 1.0
|
import QtQuick.Controls 1.0
|
||||||
import QtQuick.Layouts 1.0
|
import QtQuick.Layouts 1.0
|
||||||
import org.kde.kwin.kwincompositing 1.0
|
import org.kde.kwin.kwincompositing 1.0
|
||||||
import org.kde.plasma.core 2.0
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
signal changed
|
signal changed
|
||||||
|
|
|
@ -21,8 +21,6 @@
|
||||||
import QtQuick 2.1
|
import QtQuick 2.1
|
||||||
import QtQuick.Controls 1.0
|
import QtQuick.Controls 1.0
|
||||||
import QtQuick.Layouts 1.0
|
import QtQuick.Layouts 1.0
|
||||||
// for i18n
|
|
||||||
import org.kde.plasma.core 2.0
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: openGLErrorView
|
id: openGLErrorView
|
||||||
|
|
Loading…
Reference in a new issue