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
+71
View File
@@ -38,6 +38,66 @@
#include "BackgroundSlicingProcess.hpp" // complete type for background_process().get_current_gcode_result()
#include "DeviceCore/DevStorage.h"
#include <wx/event.h>
#include <string>
#include "libslic3r/PrintConfig.hpp"
#include <cassert>
#include <vector>
#include "slic3r/GUI/GUI_Utils.hpp"
#include <wx/gdicmn.h>
#include "slic3r/GUI/AmsMappingPopup.hpp"
#include "libslic3r/ProjectTask.hpp"
#include <wx/panel.h>
#include "slic3r/GUI/wxExtensions.hpp"
#include "slic3r/GUI/Widgets/TextInput.hpp"
#include "slic3r/GUI/PrePrintChecker.hpp"
#include "slic3r/GUI/DeviceTab/uiAMSBestPositionPopup.hpp"
#include <wx/anybutton.h>
#include "slic3r/GUI/Widgets/Button.hpp"
#include <memory>
#include "slic3r/GUI/BBLStatusBarPrint.hpp"
#include "slic3r/GUI/Widgets/HyperLink.hpp"
#include "slic3r/GUI/DeviceCore/DevDefs.h"
#include <wx/busycursor.h>
#include <boost/log/trivial.hpp>
#include <cstdio>
#include <cstddef>
#include "libslic3r/Config.hpp"
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
#include <exception>
#include <cstdlib>
#include <map>
#include <ctime>
#include <set>
#include "slic3r/GUI/DeviceManager.hpp"
#include <optional>
#include <cmath>
#include "libslic3r/GCode/GCodeProcessor.hpp"
#include <wx/chartype.h>
#include <unordered_set>
#include "libslic3r/CommonDefs.hpp"
#include "slic3r/GUI/ReleaseNote.hpp"
#include <boost/algorithm/string/case_conv.hpp>
#include "slic3r/GUI/Widgets/StateColor.hpp"
#include <wx/dcclient.h>
#include "libslic3r/Print.hpp"
#include <wx/dialog.h>
#include <utility>
#include "slic3r/GUI/Monitor.hpp"
#include <ostream>
#include "slic3r/GUI/Jobs/PrintJob.hpp"
#include "slic3r/GUI/MsgDialog.hpp"
#include "slic3r/GUI/Jobs/Worker.hpp"
#include <wx/arrstr.h>
#include "slic3r/GUI/Auxiliary.hpp"
#include <cstring>
#include "libslic3r/PrintBase.hpp"
#include "slic3r/GUI/PartPlate.hpp"
#include "slic3r/GUI/3DScene.hpp"
#include <wx/image.h>
#include <wx/dcmemory.h>
#include <wx/dc.h>
#include "slic3r/GUI/Widgets/DropDown.hpp"
#include <wx/progdlg.h>
#include <wx/clipbrd.h>
#include <wx/dcgraph.h>
@@ -45,6 +105,17 @@
#include <miniz.h>
#include <algorithm>
#include <unordered_map>
#include <wx/wx.h>
#include <wx/toplevel.h>
#include <wx/simplebook.h>
#include <wx/string.h>
#include <wx/stattext.h>
#include <wx/textctrl.h>
#include <wx/sizer.h>
#include <wx/timer.h>
#include <wx/tglbtn.h>
#include <wx/wxcrt.h>
#include <wx/utils.h>
#include "Plater.hpp"
#include "Notebook.hpp"
#include "BitmapCache.hpp"