From 482f89b91f2fa7f1e13cb82b21e60e1719bd7b8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Fri, 21 Nov 2014 16:48:39 +0100 Subject: [PATCH] Fix build without KF5Activities BUG: 340961 FIXED-IN: 5.2.0 REVIEW: 121202 --- client.cpp | 2 ++ dbusinterface.cpp | 2 ++ netinfo.cpp | 2 +- scripting/scripting_model.cpp | 7 +++++++ useractions.cpp | 2 ++ 5 files changed, 14 insertions(+), 1 deletion(-) diff --git a/client.cpp b/client.cpp index 4c3cc87229..0931f6cbec 100644 --- a/client.cpp +++ b/client.cpp @@ -1734,6 +1734,8 @@ void Client::setOnAllActivities(bool on) } else { setOnActivity(Activities::self()->current(), true); } +#else + Q_UNUSED(on) #endif } diff --git a/dbusinterface.cpp b/dbusinterface.cpp index ae1c9bb407..3b210e1aab 100644 --- a/dbusinterface.cpp +++ b/dbusinterface.cpp @@ -120,6 +120,7 @@ bool DBusInterface::startActivity(const QString &in0) #ifdef KWIN_BUILD_ACTIVITIES return Activities::self()->start(in0); #else + Q_UNUSED(in0) return false; #endif } @@ -129,6 +130,7 @@ bool DBusInterface::stopActivity(const QString &in0) #ifdef KWIN_BUILD_ACTIVITIES return Activities::self()->stop(in0); #else + Q_UNUSED(in0) return false; #endif } diff --git a/netinfo.cpp b/netinfo.cpp index 352c366404..e935fa2543 100644 --- a/netinfo.cpp +++ b/netinfo.cpp @@ -110,7 +110,7 @@ RootInfo *RootInfo::create() NET::WM2FullPlacement | NET::WM2FullscreenMonitors | NET::WM2KDEShadow; -#if KWIN_BUILD_ACTIVITIES +#ifdef KWIN_BUILD_ACTIVITIES properties2 |= NET::WM2Activities; #endif const NET::Actions actions = NET::ActionMove | diff --git a/scripting/scripting_model.cpp b/scripting/scripting_model.cpp index 60d32b7bb3..b4aeb89b8f 100644 --- a/scripting/scripting_model.cpp +++ b/scripting/scripting_model.cpp @@ -18,7 +18,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . *********************************************************************/ #include "scripting_model.h" +#include +#ifdef KWIN_BUILD_ACTIVITIES #include "activities.h" +#endif #include "client.h" #include "screens.h" #include "workspace.h" @@ -496,6 +499,8 @@ void ForkLevel::activityAdded(const QString &activityId) childLevel->init(); addChild(childLevel); emit endInsert(); +#else + Q_UNUSED(activityId) #endif } @@ -513,6 +518,8 @@ void ForkLevel::activityRemoved(const QString &activityId) break; } } +#else + Q_UNUSED(activityId) #endif } diff --git a/useractions.cpp b/useractions.cpp index ad7c511f03..7f7428b5bf 100644 --- a/useractions.cpp +++ b/useractions.cpp @@ -810,6 +810,8 @@ void UserActionsMenu::slotToggleOnActivity(QAction *action) } } } +#else + Q_UNUSED(action) #endif }