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.
This commit is contained in:
parent
1f7daa934d
commit
2a935c523f
1 changed files with 4 additions and 2 deletions
|
@ -26,6 +26,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
// KWin libs
|
||||
#include <kwinxrenderutils.h>
|
||||
#include "workspace.h"
|
||||
// Frameworks
|
||||
#include <KConfigGroup>
|
||||
// Qt
|
||||
#include <QDebug>
|
||||
#include <QQmlComponent>
|
||||
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue