From 2a935c523fe0700a8b3328a242d0fb0588ca2012 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Fri, 29 Jan 2016 09:50:52 +0100 Subject: [PATCH] Make QmlPath in Outline configurable Fixes a TODO in the code and has the slight advantage that we can disable the Outline from integration tests by pointing to a not existing file. --- outline.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/outline.cpp b/outline.cpp index da5c7e1d6e..75e51cf086 100644 --- a/outline.cpp +++ b/outline.cpp @@ -26,6 +26,8 @@ along with this program. If not, see . // KWin libs #include #include "workspace.h" +// Frameworks +#include // Qt #include #include @@ -150,8 +152,8 @@ void CompositedOutlineVisual::show() } if (m_qmlComponent.isNull()) { m_qmlComponent.reset(new QQmlComponent(Scripting::self()->qmlEngine())); - // TODO: fileName should be configurable - const QString fileName = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral(KWIN_NAME "/outline/plasma/outline.qml")); + const QString fileName = QStandardPaths::locate(QStandardPaths::GenericDataLocation, + kwinApp()->config()->group(QStringLiteral("Outline")).readEntry("QmlPath", QStringLiteral(KWIN_NAME "/outline/plasma/outline.qml"))); if (fileName.isEmpty()) { qCDebug(KWIN_CORE) << "Could not locate outline.qml"; return;