diff --git a/kcmkwin/kwincompositing/CMakeLists.txt b/kcmkwin/kwincompositing/CMakeLists.txt index 8b4b2d2e57..fc50b2867f 100644 --- a/kcmkwin/kwincompositing/CMakeLists.txt +++ b/kcmkwin/kwincompositing/CMakeLists.txt @@ -64,7 +64,7 @@ include_directories(${KDE4_INCLUDES} ${kdeqt5staging_INCLUDE_DIRS} ${KF5_INCLUDE_DIRS} # since e-c-m 0.0.7 ${Qt5Widgets_INCLUDE_DIRS} - ) + ${KDECLARATIVE_INCLUDE_DIRS}) ################# configure checks and create the configured files ################# @@ -94,7 +94,9 @@ target_link_libraries(kwincompositing ${Qt5Widgets_LIBRARIES} ${KDE4_KCMUTILS_LIBS} ${Qt5Test_LIBRARIES} - ${KCoreAddons_LIBRARIES}) + ${KCoreAddons_LIBRARIES} + ${KDECLARATIVE_LIBRARIES}) + set(modelTest_SRC model.cpp @@ -116,8 +118,8 @@ target_link_libraries(effectModelTest ${Qt5Widgets_LIBRARIES} ${KDE4_KCMUTILS_LIBS} ${Qt5Test_LIBRARIES} - ${KCoreAddons_LIBRARIES}) - + ${KCoreAddons_LIBRARIES} + ${KDECLARATIVE_LIBRARIES}) INSTALL(DIRECTORY qml DESTINATION ${DATA_INSTALL_DIR}/kwincompositing) INSTALL(TARGETS kwincompositing ${INSTALL_TARGETS_DEFAULT_ARGS}) diff --git a/kcmkwin/kwincompositing/main.cpp b/kcmkwin/kwincompositing/main.cpp index 0dca243ff2..6d9a0ad4ac 100644 --- a/kcmkwin/kwincompositing/main.cpp +++ b/kcmkwin/kwincompositing/main.cpp @@ -25,6 +25,9 @@ #include #include +#include + +#include int main(int argc, char *argv[]) { @@ -40,7 +43,11 @@ int main(int argc, char *argv[]) QApplication app(argc, argv); + KDeclarative kdeclarative; + KWin::Compositing::EffectView *view = new KWin::Compositing::EffectView(); + kdeclarative.setDeclarativeEngine(view->engine()); + kdeclarative.setupBindings(); view->show(); return app.exec(); diff --git a/kcmkwin/kwincompositing/qml/EffectView.qml b/kcmkwin/kwincompositing/qml/EffectView.qml index 3e11f2b800..cf62139c61 100644 --- a/kcmkwin/kwincompositing/qml/EffectView.qml +++ b/kcmkwin/kwincompositing/qml/EffectView.qml @@ -52,7 +52,7 @@ Item { height: parent.height CheckBox { id: windowManagement - text: "Improved Window Management" + text: i18n("Improved Window Management") checked: false anchors.left: col.right anchors.top: parent.top @@ -129,7 +129,7 @@ Item { Button { id: apply - text: "Apply" + text: i18n("Apply") enabled: false anchors { bottom: parent.bottom diff --git a/kcmkwin/kwincompositing/qml/main.qml b/kcmkwin/kwincompositing/qml/main.qml index 56c1269f29..0f272ee46d 100644 --- a/kcmkwin/kwincompositing/qml/main.qml +++ b/kcmkwin/kwincompositing/qml/main.qml @@ -37,16 +37,16 @@ Item { anchors.leftMargin: parent.width/2 - 100 Text { id: openGLErrorText - text: "OpenGL compositing (the default) has crashed KWin in the past.\n" + + text: i18n("OpenGL compositing (the default) has crashed KWin in the past.\n" + "This was most likely due to a driver bug.\n" + "If you think that you have meanwhile upgraded to a stable driver,\n" + "you can reset this protection but be aware that this might result in an immediate crash!\n" + - "Alternatively, you might want to use the XRender backend instead." + "Alternatively, you might want to use the XRender backend instead.") } Button { id: openGLButton - text: "Re-enable OpenGL detection" + text: i18n("Re-enable OpenGL detection") anchors.top: openGLErrorText.bottom onClicked: { openGLBrokeState = compositing.OpenGLIsBroken();