Use boost::nowide directly from boost (#9037)

* Use `boost::nowide` directly from boost

Cherry-picked from prusa3d/PrusaSlicer@bffa3f8578

Co-authored-by: tamasmeszaros <meszaros.q@gmail.com>

* Replaced all occurrences of boost::nowide::narrow for wxStrings with into_u8

Cherry-picked from prusa3d/PrusaSlicer@8d6497297a

Co-authored-by: tamasmeszaros <meszaros.q@gmail.com>

* Fix flatpak build
This commit is contained in:
Noisyfox 2025-03-29 20:14:10 +08:00 committed by GitHub
parent 45221a2bea
commit ed45bf425e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
39 changed files with 36 additions and 2506 deletions

View file

@ -47,7 +47,7 @@ static char marker_by_type(Preset::Type type, PrinterTechnology pt)
}
}
std::string Option::opt_key() const { return boost::nowide::narrow(key).substr(2); }
std::string Option::opt_key() const { return into_u8(key).substr(2); }
void FoundOption::get_marked_label_and_tooltip(const char **label_, const char **tooltip_) const
{
@ -210,9 +210,9 @@ bool OptionsSearcher::search(const std::string &search, bool force /* = false*/,
std::string label = into_u8(get_label(opt));
//all
if (type == Preset::TYPE_INVALID) {
found.emplace_back(FoundOption{label, label, boost::nowide::narrow(get_tooltip(opt)), i, 0});
found.emplace_back(FoundOption{label, label, into_u8(get_tooltip(opt)), i, 0});
} else if (type == opt.type){
found.emplace_back(FoundOption{label, label, boost::nowide::narrow(get_tooltip(opt)), i, 0});
found.emplace_back(FoundOption{label, label, into_u8(get_tooltip(opt)), i, 0});
}
continue;
@ -253,9 +253,9 @@ bool OptionsSearcher::search(const std::string &search, bool force /* = false*/,
#endif
if (type == Preset::TYPE_INVALID) {
found.emplace_back(FoundOption{label_plain, label_u8, boost::nowide::narrow(get_tooltip(opt)), i, score});
found.emplace_back(FoundOption{label_plain, label_u8, into_u8(get_tooltip(opt)), i, score});
} else if (type == opt.type) {
found.emplace_back(FoundOption{label_plain, label_u8, boost::nowide::narrow(get_tooltip(opt)), i, score});
found.emplace_back(FoundOption{label_plain, label_u8, into_u8(get_tooltip(opt)), i, score});
}
}