mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-05 14:51:06 +00:00
* 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.
23 lines
732 B
C++
23 lines
732 B
C++
#include "AuiPaneLayout.hpp"
|
|
#include <string>
|
|
#include <cstddef>
|
|
|
|
namespace Slic3r { namespace GUI {
|
|
|
|
std::string aui_pane_layout_entry(const std::string& layout, const std::string& pane_name)
|
|
{
|
|
// Panes are separated by '|'; SavePerspective() escapes a '|' inside a caption as "\|".
|
|
const std::string prefix = "name=" + pane_name + ";";
|
|
size_t begin = 0;
|
|
for (size_t i = 0; i <= layout.size(); ++i) {
|
|
if (i < layout.size() && (layout[i] != '|' || (i > 0 && layout[i - 1] == '\\')))
|
|
continue;
|
|
if (layout.compare(begin, prefix.size(), prefix) == 0)
|
|
return layout.substr(begin, i - begin);
|
|
begin = i + 1;
|
|
}
|
|
return {};
|
|
}
|
|
|
|
}} // namespace Slic3r::GUI
|