Add Missing Includes Across src/slic3r/GUI (#16048)

* Add Missing Includes Across src/slic3r/GUI

Every GUI source and header now directly includes the headers declaring what it uses, rather than relying on the precompiled header or transitive includes. Generated with clang-tidy misc-include-cleaner, plus one hand edit making CalibrationPanel.hpp self-contained.

* Drop the OS-Specific Includes Added Outside Their Platform Guards

GLib, GTK, D-Bus and POSIX headers are only used inside platform #if blocks, which already include them. Added unconditionally at the top of the file they broke the Windows build.

* Add the clang-tidy Configuration That Generated These Includes

Only misc-include-cleaner's missing-include check, with the headers it must never suggest: per-platform, internal and OS-specific ones that would break other platforms or are not meant to be included directly.

* Match Windows Paths in the clang-tidy Ignore List

Header paths use backslashes on Windows, so every / in a pattern is now [/\\]. The Windows SDK headers are ignored alongside the other OS-specific ones, and the list is one pattern per line. Suggested by @raistlin7447 from a Windows clang-cl run.
This commit is contained in:
HanifKoh
2026-10-02 14:56:56 +08:00
committed by GitHub
parent 9d71125495
commit 1a5f91d727
687 changed files with 8010 additions and 1 deletions
+51
View File
@@ -6,7 +6,58 @@
#include "slic3r/Utils/bambu_networking.hpp"
#include "MainFrame.hpp"
#include "Widgets/RadioBox.hpp"
#include <wx/event.h>
#include <wx/gdicmn.h>
#include "slic3r/GUI/MultiMachine.hpp"
#include <wx/dc.h>
#include "slic3r/GUI/Widgets/StateColor.hpp"
#include <wx/dcclient.h>
#include "slic3r/GUI/GUI_Utils.hpp"
#include "slic3r/GUI/GUI.hpp"
#include "slic3r/GUI/AmsMappingPopup.hpp"
#include "slic3r/GUI/MultiTaskManagerPage.hpp"
#include <map>
#include <string>
#include <vector>
#include <algorithm>
#include "slic3r/GUI/Jobs/PrintJob.hpp"
#include "libslic3r/Utils.hpp"
#include <boost/log/trivial.hpp>
#include "slic3r/GUI/DeviceCore/DevDefs.h"
#include "slic3r/GUI/PartPlate.hpp"
#include "libslic3r/PrintConfig.hpp"
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
#include "slic3r/GUI/MsgDialog.hpp"
#include "slic3r/GUI/Widgets/Label.hpp"
#include "slic3r/GUI/Widgets/TextInput.hpp"
#include <utility>
#include "slic3r/GUI/SelectMachine.hpp"
#include <wx/arrstr.h>
#include <wx/chartype.h>
#include <wx/layout.h>
#include "slic3r/GUI/Widgets/Button.hpp"
#include "slic3r/GUI/MultiMachinePage.hpp"
#include "libslic3r/Config.hpp"
#include "slic3r/GUI/BitmapCache.hpp"
#include "libslic3r/GCode/ThumbnailData.hpp"
#include <wx/image.h>
#include <cstdio>
#include "slic3r/GUI/Auxiliary.hpp"
#include <cstddef>
#include <cstring>
#include <wx/listimpl.cpp>
#include <wx/scrolwin.h>
#include <wx/string.h>
#include <wx/toplevel.h>
#include <wx/sizer.h>
#include <wx/panel.h>
#include <wx/timer.h>
#include <wx/tglbtn.h>
#include <wx/valtext.h>
#include <wx/stattext.h>
#include <wx/textctrl.h>
#include <wx/wxcrt.h>
#include <wx/simplebook.h>
#include "DeviceCore/DevManager.h"
#include "DeviceCore/DevStorage.h"