From 7d1db53f6b26f341d304b0b0cbf2a5fc0deac48e Mon Sep 17 00:00:00 2001 From: Alexander Lohnau Date: Wed, 10 Jan 2024 19:55:44 +0100 Subject: [PATCH] Remove unneeded includes from headers and cpp files --- data/update_default_rules.cpp | 8 +++++--- src/activities.h | 3 +-- src/appmenu.h | 2 -- src/backends/drm/drm_abstract_output.cpp | 1 - src/backends/drm/drm_buffer.cpp | 3 --- src/backends/drm/drm_crtc.cpp | 2 -- src/backends/drm/drm_egl_backend.cpp | 2 -- src/backends/drm/icc_shader.cpp | 1 - src/compositor.h | 3 ++- src/compositor_wayland.h | 1 + src/compositor_x11.h | 1 + src/decorations/decorationbridge.h | 5 +---- src/decorations/decorationpalette.cpp | 1 - src/effect/anidata.cpp | 2 -- src/effect/animationeffect.cpp | 3 ++- src/effect/effecthandler.cpp | 7 +++---- src/effect/effecthandler.h | 4 ---- src/kcms/compositing/kwincompositingdata.h | 2 +- src/kcms/decoration/decorationmodel.cpp | 1 + src/kcms/decoration/decorationmodel.h | 2 -- src/kcms/decoration/kcm.cpp | 1 + src/kcms/decoration/kcm.h | 2 -- src/kcms/options/mouse.cpp | 8 +++----- src/kcms/scripts/module.cpp | 1 - src/kcms/tabbox/main.cpp | 1 - src/kcms/tabbox/main.h | 1 - src/scripting/scriptedeffect.cpp | 4 ++-- src/scripting/tilemodel.cpp | 2 -- src/scripting/tilemodel.h | 2 -- src/scripting/windowthumbnailitem.cpp | 4 ++-- 30 files changed, 26 insertions(+), 54 deletions(-) diff --git a/data/update_default_rules.cpp b/data/update_default_rules.cpp index 503556a12b..172cbaf1e9 100644 --- a/data/update_default_rules.cpp +++ b/data/update_default_rules.cpp @@ -9,11 +9,13 @@ // read additional window rules and add them to kwinrulesrc +#include +#include +#include +#include +#include #include #include -#include -#include -#include int main(int argc, char *argv[]) { diff --git a/src/activities.h b/src/activities.h index e1fecd455b..ee61f4ef75 100644 --- a/src/activities.h +++ b/src/activities.h @@ -8,10 +8,9 @@ */ #pragma once -#include "effect/globals.h" - #include #include +#include #include diff --git a/src/appmenu.h b/src/appmenu.h index 54e481225c..55bdc149ae 100644 --- a/src/appmenu.h +++ b/src/appmenu.h @@ -9,8 +9,6 @@ SPDX-License-Identifier: GPL-2.0-or-later */ #pragma once -// KWin -#include "effect/globals.h" // Qt #include // xcb diff --git a/src/backends/drm/drm_abstract_output.cpp b/src/backends/drm/drm_abstract_output.cpp index 78aa5c6085..2d27b707d9 100644 --- a/src/backends/drm/drm_abstract_output.cpp +++ b/src/backends/drm/drm_abstract_output.cpp @@ -8,7 +8,6 @@ */ #include "drm_abstract_output.h" #include "core/renderbackend.h" -#include "core/renderloop_p.h" #include "drm_backend.h" #include "drm_gpu.h" #include "drm_layer.h" diff --git a/src/backends/drm/drm_buffer.cpp b/src/backends/drm/drm_buffer.cpp index c2e3ec2043..1f246463db 100644 --- a/src/backends/drm/drm_buffer.cpp +++ b/src/backends/drm/drm_buffer.cpp @@ -11,7 +11,6 @@ #include "core/graphicsbuffer.h" #include "drm_gpu.h" -#include "drm_logging.h" // system #include @@ -19,8 +18,6 @@ #include #include #endif -// c++ -#include // drm #include #include diff --git a/src/backends/drm/drm_crtc.cpp b/src/backends/drm/drm_crtc.cpp index 7ec300c1c5..c7c9168682 100644 --- a/src/backends/drm/drm_crtc.cpp +++ b/src/backends/drm/drm_crtc.cpp @@ -11,10 +11,8 @@ #include "drm_buffer.h" #include "drm_commit.h" #include "drm_gpu.h" -#include "drm_logging.h" #include "drm_output.h" #include "drm_pointer.h" -#include namespace KWin { diff --git a/src/backends/drm/drm_egl_backend.cpp b/src/backends/drm/drm_egl_backend.cpp index 72707e37cd..cfb7a482a0 100644 --- a/src/backends/drm/drm_egl_backend.cpp +++ b/src/backends/drm/drm_egl_backend.cpp @@ -18,10 +18,8 @@ #include "drm_output.h" #include "drm_pipeline.h" #include "drm_virtual_egl_layer.h" -#include "opengl/eglutils_p.h" // system #include -#include #include #include diff --git a/src/backends/drm/icc_shader.cpp b/src/backends/drm/icc_shader.cpp index e8b00070fc..ea3e0a2a58 100644 --- a/src/backends/drm/icc_shader.cpp +++ b/src/backends/drm/icc_shader.cpp @@ -11,7 +11,6 @@ #include "opengl/gllut3D.h" #include "opengl/glshader.h" #include "opengl/glshadermanager.h" -#include "opengl/gltexture.h" namespace KWin { diff --git a/src/compositor.h b/src/compositor.h index 7957e6d536..2f0ea7c1a6 100644 --- a/src/compositor.h +++ b/src/compositor.h @@ -9,9 +9,10 @@ */ #pragma once -#include "effect/globals.h" +#include #include +#include #include #include #include diff --git a/src/compositor_wayland.h b/src/compositor_wayland.h index 0d0529f5a6..4d501825d8 100644 --- a/src/compositor_wayland.h +++ b/src/compositor_wayland.h @@ -11,6 +11,7 @@ #pragma once #include "compositor.h" +#include "effect/globals.h" namespace KWin { diff --git a/src/compositor_x11.h b/src/compositor_x11.h index be396e4787..8c1a91e8e2 100644 --- a/src/compositor_x11.h +++ b/src/compositor_x11.h @@ -11,6 +11,7 @@ #pragma once #include "compositor.h" +#include namespace KWin { diff --git a/src/decorations/decorationbridge.h b/src/decorations/decorationbridge.h index cd37716a1a..b52f233da9 100644 --- a/src/decorations/decorationbridge.h +++ b/src/decorations/decorationbridge.h @@ -8,14 +8,11 @@ */ #pragma once -#include "effect/globals.h" - +#include "kwin_export.h" #include - #include class KPluginFactory; - namespace KDecoration2 { class DecorationSettings; diff --git a/src/decorations/decorationpalette.cpp b/src/decorations/decorationpalette.cpp index d659269fd9..3fab1b907b 100644 --- a/src/decorations/decorationpalette.cpp +++ b/src/decorations/decorationpalette.cpp @@ -11,7 +11,6 @@ */ #include "decorationpalette.h" -#include "decorations_logging.h" #include diff --git a/src/effect/anidata.cpp b/src/effect/anidata.cpp index 77e1c27d8b..c8e34a543b 100644 --- a/src/effect/anidata.cpp +++ b/src/effect/anidata.cpp @@ -11,8 +11,6 @@ #include "effect/anidata_p.h" #include "effect/effecthandler.h" -#include "logging_p.h" - namespace KWin { diff --git a/src/effect/animationeffect.cpp b/src/effect/animationeffect.cpp index bfd18ba639..4305c974f2 100644 --- a/src/effect/animationeffect.cpp +++ b/src/effect/animationeffect.cpp @@ -11,7 +11,8 @@ #include "effect/animationeffect.h" #include "effect/anidata_p.h" #include "effect/effecthandler.h" -#include "opengl/glutils.h" +#include "opengl/glshader.h" +#include "opengl/glshadermanager.h" #include #include diff --git a/src/effect/effecthandler.cpp b/src/effect/effecthandler.cpp index 38b6559b48..aa1a359474 100644 --- a/src/effect/effecthandler.cpp +++ b/src/effect/effecthandler.cpp @@ -16,7 +16,6 @@ #include "compositor.h" #include "core/output.h" #include "core/renderbackend.h" -#include "core/renderlayer.h" #include "core/rendertarget.h" #include "core/renderviewport.h" #include "decorations/decorationbridge.h" @@ -28,7 +27,9 @@ #include "inputmethod.h" #include "inputpanelv1window.h" #include "keyboard_input.h" -#include "opengl/glutils.h" +#include "opengl/glshader.h" +#include "opengl/glshadermanager.h" +#include "opengl/gltexture.h" #include "osd.h" #include "pointer_input.h" #include "scene/itemrenderer.h" @@ -65,8 +66,6 @@ #include #include -#include - namespace KWin { diff --git a/src/effect/effecthandler.h b/src/effect/effecthandler.h index 76ac1b697e..f3a2c1ef14 100644 --- a/src/effect/effecthandler.h +++ b/src/effect/effecthandler.h @@ -29,11 +29,7 @@ #include -#include -#include #include -#include -#include class KConfigGroup; class QFont; diff --git a/src/kcms/compositing/kwincompositingdata.h b/src/kcms/compositing/kwincompositingdata.h index 1d2b7403df..416b85a535 100644 --- a/src/kcms/compositing/kwincompositingdata.h +++ b/src/kcms/compositing/kwincompositingdata.h @@ -11,7 +11,7 @@ #include -#include "kcmoduledata.h" +#include class KWinCompositingSetting; diff --git a/src/kcms/decoration/decorationmodel.cpp b/src/kcms/decoration/decorationmodel.cpp index 9c10adc16a..4d2aaa52dd 100644 --- a/src/kcms/decoration/decorationmodel.cpp +++ b/src/kcms/decoration/decorationmodel.cpp @@ -4,6 +4,7 @@ SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ #include "decorationmodel.h" +#include "utils.h" // KDecoration2 #include #include diff --git a/src/kcms/decoration/decorationmodel.h b/src/kcms/decoration/decorationmodel.h index a52e4c7807..6b3e8be9c2 100644 --- a/src/kcms/decoration/decorationmodel.h +++ b/src/kcms/decoration/decorationmodel.h @@ -5,8 +5,6 @@ */ #pragma once -#include "utils.h" - #include #include diff --git a/src/kcms/decoration/kcm.cpp b/src/kcms/decoration/kcm.cpp index c770d24243..ac9d5a2ef8 100644 --- a/src/kcms/decoration/kcm.cpp +++ b/src/kcms/decoration/kcm.cpp @@ -24,6 +24,7 @@ #include "kwindecorationdata.h" #include "kwindecorationsettings.h" +#include "utils.h" K_PLUGIN_FACTORY_WITH_JSON(KCMKWinDecorationFactory, "kcm_kwindecoration.json", registerPlugin(); registerPlugin();) diff --git a/src/kcms/decoration/kcm.h b/src/kcms/decoration/kcm.h index 65607438af..a30c127e36 100644 --- a/src/kcms/decoration/kcm.h +++ b/src/kcms/decoration/kcm.h @@ -7,8 +7,6 @@ #pragma once -#include "utils.h" - #include #include diff --git a/src/kcms/options/mouse.cpp b/src/kcms/options/mouse.cpp index 8756edb402..b4e55a6cb0 100644 --- a/src/kcms/options/mouse.cpp +++ b/src/kcms/options/mouse.cpp @@ -5,13 +5,11 @@ */ #include "mouse.h" - -#include - -#include - #include "kwinoptions_settings.h" +#include +#include + KWinMouseConfigForm::KWinMouseConfigForm(QWidget *parent) : QWidget(parent) { diff --git a/src/kcms/scripts/module.cpp b/src/kcms/scripts/module.cpp index fe91923a39..b63d0fc2f0 100644 --- a/src/kcms/scripts/module.cpp +++ b/src/kcms/scripts/module.cpp @@ -20,7 +20,6 @@ #include #include -#include "config-kwin.h" #include "kwinscriptsdata.h" Module::Module(QObject *parent, const KPluginMetaData &data) diff --git a/src/kcms/tabbox/main.cpp b/src/kcms/tabbox/main.cpp index 8beb5972e8..882c7221e0 100644 --- a/src/kcms/tabbox/main.cpp +++ b/src/kcms/tabbox/main.cpp @@ -36,7 +36,6 @@ // own #include "kwinpluginssettings.h" -#include "kwinswitcheffectsettings.h" #include "kwintabboxconfigform.h" #include "kwintabboxdata.h" #include "kwintabboxsettings.h" diff --git a/src/kcms/tabbox/main.h b/src/kcms/tabbox/main.h index a1a988469b..69e8b2c612 100644 --- a/src/kcms/tabbox/main.h +++ b/src/kcms/tabbox/main.h @@ -11,7 +11,6 @@ #pragma once -#include "tabbox/tabboxconfig.h" #include #include diff --git a/src/scripting/scriptedeffect.cpp b/src/scripting/scriptedeffect.cpp index 6e6a081185..d3f9aed305 100644 --- a/src/scripting/scriptedeffect.cpp +++ b/src/scripting/scriptedeffect.cpp @@ -9,8 +9,9 @@ */ #include "scriptedeffect.h" +#include "opengl/glshader.h" +#include "opengl/glshadermanager.h" #include "scripting_logging.h" -#include "scriptingutils.h" #include "workspace_wrapper.h" #include "core/output.h" @@ -19,7 +20,6 @@ #include "screenedge.h" #include "workspace.h" // KDE -#include "opengl/glutils.h" #include #include #include diff --git a/src/scripting/tilemodel.cpp b/src/scripting/tilemodel.cpp index 8b246fb6e5..ae78b2ad41 100644 --- a/src/scripting/tilemodel.cpp +++ b/src/scripting/tilemodel.cpp @@ -8,9 +8,7 @@ */ #include "tilemodel.h" -#include "core/output.h" #include "tiles/tilemanager.h" -#include "virtualdesktops.h" #include "workspace.h" #include diff --git a/src/scripting/tilemodel.h b/src/scripting/tilemodel.h index 81fe1c13f8..55aaa56cd7 100644 --- a/src/scripting/tilemodel.h +++ b/src/scripting/tilemodel.h @@ -10,9 +10,7 @@ #pragma once #include "tiles/customtile.h" -#include "tiles/quicktile.h" #include "tiles/tile.h" -#include "utils/common.h" #include #include diff --git a/src/scripting/windowthumbnailitem.cpp b/src/scripting/windowthumbnailitem.cpp index 01e4e926d0..ec9fdb9a77 100644 --- a/src/scripting/windowthumbnailitem.cpp +++ b/src/scripting/windowthumbnailitem.cpp @@ -12,16 +12,15 @@ #include "core/rendertarget.h" #include "core/renderviewport.h" #include "effect/effect.h" +#include "opengl/glframebuffer.h" #include "scene/itemrenderer.h" #include "scene/windowitem.h" #include "scene/workspacescene.h" #include "scripting_logging.h" -#include "virtualdesktops.h" #include "window.h" #include "workspace.h" #include "opengl/gltexture.h" -#include "opengl/glutils.h" #include #include @@ -350,6 +349,7 @@ void WindowThumbnailItem::setWId(const QUuid &wId) updateImplicitSize(); Q_EMIT clientChanged(); } + Q_EMIT wIdChanged(); }