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
+38
View File
@@ -1,6 +1,7 @@
#include "ReleaseNote.hpp"
#include "I18N.hpp"
#include "bambu_networking.hpp"
#include "libslic3r/Utils.hpp"
#include "libslic3r/Thread.hpp"
#include "GUI.hpp"
@@ -16,6 +17,35 @@
#include "Jobs/BoostThreadWorker.hpp"
#include "Jobs/PlaterWorker.hpp"
#include <wx/event.h>
#include <wx/gdicmn.h>
#include <wx/panel.h>
#include "slic3r/GUI/wxExtensions.hpp"
#include "slic3r/GUI/Widgets/Label.hpp"
#include "slic3r/GUI/Widgets/Button.hpp"
#include <boost/nowide/fstream.hpp>
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
#include <exception>
#include <boost/log/trivial.hpp>
#include "slic3r/GUI/Widgets/HyperLink.hpp"
#include "slic3r/GUI/Widgets/CheckBox.hpp"
#include <sstream>
#include <ios>
#include <iomanip>
#include <vector>
#include "slic3r/GUI/Widgets/StateColor.hpp"
#include <md4c/src/md4c.h>
#include <wx/image.h>
#include <wx/datetime.h>
#include <utility>
#include "slic3r/GUI/Widgets/AMSItem.hpp"
#include "slic3r/GUI/Widgets/TextInput.hpp"
#include "slic3r/GUI/DeviceCore/DevConfigUtil.h"
#include <memory>
#include "slic3r/GUI/BBLStatusBarSend.hpp"
#include <boost/bind/bind.hpp>
#include "slic3r/GUI/Jobs/SendJob.hpp"
#include "slic3r/GUI/Jobs/Worker.hpp"
#include <wx/regex.h>
#include <wx/progdlg.h>
#include <wx/clipbrd.h>
@@ -24,6 +54,14 @@
#include <miniz.h>
#include <algorithm>
#include <cctype>
#include <wx/toplevel.h>
#include <wx/string.h>
#include <wx/simplebook.h>
#include <wx/webview.h>
#include <wx/utils.h>
#include <wx/tglbtn.h>
#include <wx/webrequest.h>
#include <wx/timer.h>
#include "Plater.hpp"
#include "BitmapCache.hpp"
#include "slic3r/GUI/GUI_App.hpp"