diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt
index bcc7d1faa0..a7975f7ea9 100644
--- a/autotests/CMakeLists.txt
+++ b/autotests/CMakeLists.txt
@@ -95,6 +95,7 @@ if (XCB_ICCCM_FOUND)
target_link_libraries( testXcbSizeHints
Qt5::Test
Qt5::X11Extras
+ Qt5::Widgets
KF5::ConfigCore
KF5::WindowSystem
XCB::XCB
@@ -242,6 +243,7 @@ target_link_libraries(testScreens
Qt5::Sensors
Qt5::Test
Qt5::X11Extras
+ Qt5::Widgets
KF5::ConfigCore
KF5::ConfigGui
KF5::I18n
@@ -271,8 +273,8 @@ kconfig_add_kcfg_files(testXRandRScreens_SRCS ../settings.kcfgc)
add_executable( testXRandRScreens ${testXRandRScreens_SRCS} )
target_link_libraries( testXRandRScreens
Qt5::Test
- Qt5::Gui
Qt5::Sensors
+ Qt5::Widgets
KF5::ConfigCore
KF5::ConfigGui
KF5::I18n
diff --git a/autotests/tabbox/CMakeLists.txt b/autotests/tabbox/CMakeLists.txt
index e214f89994..a3108e6458 100644
--- a/autotests/tabbox/CMakeLists.txt
+++ b/autotests/tabbox/CMakeLists.txt
@@ -18,7 +18,7 @@ add_executable( testTabBoxClientModel ${testTabBoxClientModel_SRCS} )
set_target_properties(testTabBoxClientModel PROPERTIES COMPILE_DEFINITIONS "NO_NONE_WINDOW")
target_link_libraries( testTabBoxClientModel
Qt5::Core
- Qt5::Gui
+ Qt5::Widgets
Qt5::Script
Qt5::Quick
Qt5::Test
@@ -50,7 +50,7 @@ add_executable( testTabBoxHandler ${testTabBoxHandler_SRCS} )
set_target_properties(testTabBoxHandler PROPERTIES COMPILE_DEFINITIONS "NO_NONE_WINDOW")
target_link_libraries( testTabBoxHandler
Qt5::Core
- Qt5::Gui
+ Qt5::Widgets
Qt5::Script
Qt5::Quick
Qt5::Test
diff --git a/effects/coverswitch/coverswitch.cpp b/effects/coverswitch/coverswitch.cpp
index b2c26c41f6..303782c1b1 100644
--- a/effects/coverswitch/coverswitch.cpp
+++ b/effects/coverswitch/coverswitch.cpp
@@ -27,6 +27,7 @@ along with this program. If not, see .
#include
#include
#include
+#include
#include
#include
diff --git a/effects/coverswitch/coverswitch.h b/effects/coverswitch/coverswitch.h
index b058db4d4d..320c0521d3 100644
--- a/effects/coverswitch/coverswitch.h
+++ b/effects/coverswitch/coverswitch.h
@@ -26,6 +26,7 @@ along with this program. If not, see .
#include
#include
#include
+#include
#include
#include
diff --git a/effects/cube/cube.h b/effects/cube/cube.h
index 9745266785..0de8ad53ec 100644
--- a/effects/cube/cube.h
+++ b/effects/cube/cube.h
@@ -27,6 +27,7 @@ along with this program. If not, see .
#include
#include
#include
+#include
#include "cube_inside.h"
#include "cube_proxy.h"
diff --git a/effects/flipswitch/flipswitch.h b/effects/flipswitch/flipswitch.h
index 859f30c65f..add05b4ff3 100644
--- a/effects/flipswitch/flipswitch.h
+++ b/effects/flipswitch/flipswitch.h
@@ -25,6 +25,7 @@ along with this program. If not, see .
#include
#include
#include
+#include
namespace KWin
{
diff --git a/effects/mouseclick/mouseclick.h b/effects/mouseclick/mouseclick.h
index 40cddeb4c9..afcd170bcd 100644
--- a/effects/mouseclick/mouseclick.h
+++ b/effects/mouseclick/mouseclick.h
@@ -25,6 +25,7 @@ along with this program. If not, see .
#include
#include
#include
+#include
namespace KWin
{
diff --git a/effects/presentwindows/presentwindows.h b/effects/presentwindows/presentwindows.h
index 4d7f2b1665..6e95bdada9 100644
--- a/effects/presentwindows/presentwindows.h
+++ b/effects/presentwindows/presentwindows.h
@@ -26,6 +26,7 @@ along with this program. If not, see .
#include
+class QMouseEvent;
class QElapsedTimer;
class QQuickView;
diff --git a/effects/showfps/showfps.cpp b/effects/showfps/showfps.cpp
index f95fb5e9d9..b17aa2342e 100644
--- a/effects/showfps/showfps.cpp
+++ b/effects/showfps/showfps.cpp
@@ -35,6 +35,7 @@ along with this program. If not, see .
#include
#include
#include
+#include
namespace KWin
{
diff --git a/effects/showfps/showfps.h b/effects/showfps/showfps.h
index 3f8909a05e..40c6a86ddd 100644
--- a/effects/showfps/showfps.h
+++ b/effects/showfps/showfps.h
@@ -22,6 +22,7 @@ along with this program. If not, see .
#define KWIN_SHOWFPS_H
#include
+#include
#include
diff --git a/effects/slidingpopups/slidingpopups.cpp b/effects/slidingpopups/slidingpopups.cpp
index 5408c10bfd..548b67457a 100644
--- a/effects/slidingpopups/slidingpopups.cpp
+++ b/effects/slidingpopups/slidingpopups.cpp
@@ -23,6 +23,7 @@ along with this program. If not, see .
#include
#include
+#include
#include
#include
diff --git a/libkwineffects/kwineffects.h b/libkwineffects/kwineffects.h
index cf9fe42cc1..04e77aa1f0 100644
--- a/libkwineffects/kwineffects.h
+++ b/libkwineffects/kwineffects.h
@@ -56,6 +56,7 @@ class QFont;
class QGraphicsScale;
class QKeyEvent;
class QMatrix4x4;
+class QAction;
/**
* Logging category to be used inside the KWin effects.