mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
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:
@@ -175,7 +175,7 @@ void Downloader::start_download(const std::string& full_url)
|
||||
void Downloader::on_progress(wxCommandEvent& event)
|
||||
{
|
||||
size_t id = event.GetInt();
|
||||
float percent = (float)std::stoi(boost::nowide::narrow(event.GetString())) / 100.f;
|
||||
float percent = (float)std::stoi(into_u8(event.GetString())) / 100.f;
|
||||
//BOOST_LOG_TRIVIAL(error) << "progress " << id << ": " << percent;
|
||||
NotificationManager* ntf_mngr = wxGetApp().notification_manager();
|
||||
BOOST_LOG_TRIVIAL(trace) << "Download "<< id << ": " << percent;
|
||||
@@ -187,7 +187,7 @@ void Downloader::on_error(wxCommandEvent& event)
|
||||
set_download_state(event.GetInt(), DownloadState::DownloadError);
|
||||
BOOST_LOG_TRIVIAL(error) << "Download error: " << event.GetString();
|
||||
NotificationManager* ntf_mngr = wxGetApp().notification_manager();
|
||||
ntf_mngr->set_download_URL_error(id, boost::nowide::narrow(event.GetString()));
|
||||
ntf_mngr->set_download_URL_error(id, into_u8(event.GetString()));
|
||||
show_error(nullptr, format_wxstr(L"%1%\n%2%", _L("The download has failed") + ":", event.GetString()));
|
||||
}
|
||||
void Downloader::on_complete(wxCommandEvent& event)
|
||||
|
||||
Reference in New Issue
Block a user