Compare commits

..
Author SHA1 Message Date
Hanif Koh db0c4b277a Remove Header Usings and Aliases Nothing Depends On
- ClipperUtils.hpp imported jtMiter, jtRound and jtSquare into the
  global namespace for every includer. No code names them there.
- BBLStatusBar.hpp, BBLStatusBarBind.hpp, BBLStatusBarPrint.hpp,
  BBLStatusBarSend.hpp and ProgressStatusBar.hpp re-exported their class
  into Slic3r::GUI. Nothing refers to the class through that namespace.
- Jobs/SendJob.hpp, Jobs/BindJob.hpp, Jobs/UpgradeNetworkJob.hpp and
  AuxiliaryDataViewModel.hpp declared "namespace fs = boost::filesystem;"
  at global scope without using it.
2026-10-07 01:38:53 +08:00
12 changed files with 6 additions and 45 deletions
+4 -9
View File
@@ -1,15 +1,10 @@
# clang-tidy configuration, enforced by the clang-tidy CI job on the lines a pull
# request changes (scripts/clang_tidy_diff.py). Two things are reported.
# Missing includes: a file should include the header for every symbol it uses, not
# rely on the precompiled header or another header's includes. Run with --fix to
# add them.
# Using-directives and using-declarations in the global namespace of a header:
# they reach every file that includes the header, and a using-declaration also
# makes the header look like the one to include for that name. Qualify the name
# in the header, and put the using in the source files that want it.
# request changes (scripts/clang_tidy_diff.py). Only missing includes are reported
# for now: a file should include the header for every symbol it uses, not rely on
# the precompiled header or another header's includes. Run with --fix to add them.
# Every check listed here gates pull requests, so enable a new one only once the
# code it flags on touched lines is reasonable to fix in passing.
Checks: '-*,misc-include-cleaner,google-global-names-in-headers'
Checks: '-*,misc-include-cleaner'
WarningsAsErrors: '*'
CheckOptions:
# Missing includes only. Builds without the precompiled header break on these.
+2 -3
View File
@@ -311,12 +311,11 @@ def main():
for path in fixed:
print(f" {path}")
if failed and fixed:
print(f"\nclang-tidy still fails on {len(failed)} file(s); the findings above are what --fix could not fix.")
print(f"\nclang-tidy still fails on {len(failed)} file(s); the findings above are what --fix could not add.")
return 1
if failed:
print(f"\nclang-tidy failed on {len(failed)} file(s). Add the includes it names, or apply its "
"suggestions locally with scripts/run_clang_tidy.sh --fix (scripts\\run_clang_tidy.ps1 -Fix on Windows). "
"Other findings need a manual fix.")
"suggestions locally with scripts/run_clang_tidy.sh --fix (scripts\\run_clang_tidy.ps1 -Fix on Windows).")
return 1
print("clang-tidy passed.")
return 0
-5
View File
@@ -23,11 +23,6 @@ enum ClipType { ctIntersection, ctUnion, ctDifference, ctXor };
} // namespace Slic3r
// import these wherever we're included
using Slic3r::jtMiter;
using Slic3r::jtRound;
using Slic3r::jtSquare;
namespace Slic3r {
static constexpr const float ClipperSafetyOffset = 10.f;
@@ -18,8 +18,6 @@
class AuxiliaryModelNode;
WX_DEFINE_ARRAY_PTR(AuxiliaryModelNode*, AuxiliaryModelNodePtrArray);
namespace fs = boost::filesystem;
class AuxiliaryModelNode
{
public:
-4
View File
@@ -73,10 +73,6 @@ private:
CancelFn m_cancel_cb;
};
namespace GUI {
using Slic3r::BBLStatusBar;
}
}
#endif // BBLSTATUSBAR_HPP
-4
View File
@@ -80,10 +80,6 @@ private:
CancelFn m_cancel_cb_fina;
};
namespace GUI {
using Slic3r::BBLStatusBarBind;
}
} // namespace Slic3r
#endif // BBLSTATUSBAR_HPP
-4
View File
@@ -97,10 +97,6 @@ private:
CancelFn m_cancel_cb_fina;
};
namespace GUI {
using Slic3r::BBLStatusBarPrint;
}
wxDECLARE_EVENT(EVT_SHOW_ERROR_INFO, wxCommandEvent);
} // namespace Slic3r
-4
View File
@@ -99,10 +99,6 @@ private:
CancelFn m_cancel_cb_fina;
};
namespace GUI {
using Slic3r::BBLStatusBarSend;
}
wxDECLARE_EVENT(EVT_SHOW_ERROR_INFO_SEND, wxCommandEvent);
wxDECLARE_EVENT(EVT_SHOW_ERROR_FAIL_SEND, wxCommandEvent);
} // namespace Slic3r
-2
View File
@@ -11,8 +11,6 @@
class wxWindow;
namespace fs = boost::filesystem;
namespace Slic3r {
namespace GUI {
-2
View File
@@ -11,8 +11,6 @@
#include "Job.hpp"
#include "PrintJob.hpp"
namespace fs = boost::filesystem;
namespace Slic3r {
namespace GUI {
@@ -12,8 +12,6 @@
class wxWindow;
namespace fs = boost::filesystem;
namespace Slic3r {
namespace GUI {
-4
View File
@@ -68,10 +68,6 @@ private:
CancelFn m_cancel_cb;
};
namespace GUI {
using Slic3r::ProgressStatusBar;
}
}
#endif // PROGRESSSTATUSBAR_HPP