From 8245a74b31dc69af06b273bd61ac4a3c5a121be4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Fl=C3=B6ser?= Date: Sun, 4 Feb 2018 15:34:10 +0100 Subject: [PATCH] Make it possible to compile 5.12 branch with a kdecoration from master Summary: KDecoration has two new pure virtual methods. Due to that one cannot build KWin in the stable branch. This makes bug fixing rather cumbersome as one also needs to switch the kdecoration branch. This rather unusual change for a stable branch improves the compatibility by adding the new virtual methods without doing anything and without marking them as override, so that the code can compile with a kdecoration from 5.12 and a kdecoration from master. Test Plan: 5.12 branch compiles with kdecoration master branch Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #plasma Differential Revision: https://phabricator.kde.org/D10296 --- decorations/decoratedclient.cpp | 9 +++++++++ decorations/decoratedclient.h | 2 ++ .../kwindecoration/declarative-plugin/previewclient.cpp | 9 +++++++++ .../kwindecoration/declarative-plugin/previewclient.h | 2 ++ 4 files changed, 22 insertions(+) diff --git a/decorations/decoratedclient.cpp b/decorations/decoratedclient.cpp index ff5ce64d4e..c50d5a4346 100644 --- a/decorations/decoratedclient.cpp +++ b/decorations/decoratedclient.cpp @@ -200,6 +200,15 @@ QColor DecoratedClientImpl::color(KDecoration2::ColorGroup group, KDecoration2:: return QColor(); } +void DecoratedClientImpl::requestShowToolTip(const QString &text) +{ + Q_UNUSED(text) +} + +void DecoratedClientImpl::requestHideToolTip() +{ +} + void DecoratedClientImpl::requestShowWindowMenu() { // TODO: add rect to requestShowWindowMenu diff --git a/decorations/decoratedclient.h b/decorations/decoratedclient.h index e01a2e6a05..17363c6148 100644 --- a/decorations/decoratedclient.h +++ b/decorations/decoratedclient.h @@ -72,6 +72,8 @@ public: bool hasApplicationMenu() const override; bool isApplicationMenuActive() const override; + void requestShowToolTip(const QString &text); + void requestHideToolTip(); void requestClose() override; void requestContextHelp() override; void requestToggleMaximization(Qt::MouseButtons buttons) override; diff --git a/kcmkwin/kwindecoration/declarative-plugin/previewclient.cpp b/kcmkwin/kwindecoration/declarative-plugin/previewclient.cpp index 2a022473f2..f51fe843e9 100644 --- a/kcmkwin/kwindecoration/declarative-plugin/previewclient.cpp +++ b/kcmkwin/kwindecoration/declarative-plugin/previewclient.cpp @@ -351,6 +351,15 @@ void PreviewClient::setBordersTopEdge(bool enabled) emit bordersTopEdgeChanged(enabled); } +void PreviewClient::requestShowToolTip(const QString &text) +{ + Q_UNUSED(text) +} + +void PreviewClient::requestHideToolTip() +{ +} + void PreviewClient::requestClose() { emit closeRequested(); diff --git a/kcmkwin/kwindecoration/declarative-plugin/previewclient.h b/kcmkwin/kwindecoration/declarative-plugin/previewclient.h index 8fb681e1ef..16473925bf 100644 --- a/kcmkwin/kwindecoration/declarative-plugin/previewclient.h +++ b/kcmkwin/kwindecoration/declarative-plugin/previewclient.h @@ -97,6 +97,8 @@ public: bool hasApplicationMenu() const override; bool isApplicationMenuActive() const override; + void requestShowToolTip(const QString &text); + void requestHideToolTip(); void requestClose() override; void requestContextHelp() override; void requestToggleMaximization(Qt::MouseButtons buttons) override;