From 9ec28ce29cb3b80dd294f0c46e46c1ba1bdadc54 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 27 Dec 2024 17:13:03 +0100 Subject: [PATCH 1/3] slic3r:gui: Fix ambiguous load_files call MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit src/slic3r/GUI/Plater.cpp: In member function ‘void Slic3r::GUI::Plater::load_project(const wxString&)’: src/slic3r/GUI/Plater.cpp:4423: error: call of overloaded ‘load_files()’ is ambiguous 4423 | if (! load_files({ into_path(filename) }).empty()) { In file included from /home/asn/workspace/prj/oss/PrusaSlicer/asn-debug/src/slic3r/GUI/Plater.cpp:20: src/slic3r/GUI/Plater.hpp:127:25: note: candidate: ‘std::vector Slic3r::GUI::Plater::load_files(const std::vector&, bool, bool, bool)’ 127 | std::vector load_files(const std::vector& input_files, bool load_model = true, bool load_config = true, bool imperial_units = false); | ^~~~~~~~~~ src/slic3r/GUI/Plater.hpp:131:10: note: candidate: ‘bool Slic3r::GUI::Plater::load_files(const wxArrayString&, bool)’ 131 | bool load_files(const wxArrayString& filenames, bool delete_after_load = false); | ^~~~~~~~~~ --- src/slic3r/GUI/Plater.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index debfe625fd..4d61e29a2d 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -4420,7 +4420,7 @@ void Plater::load_project(const wxString& filename) s_multiple_beds.set_loading_project_flag(true); ScopeGuard guard([](){ s_multiple_beds.set_loading_project_flag(false);}); - if (! load_files({ into_path(filename) }).empty()) { + if (! load_files(std::vector({ into_path(filename) })).empty()) { // At least one file was loaded. p->set_project_filename(filename); // Save the names of active presets and project specific config into ProjectDirtyStateManager. From accbbbe40b0c0ed19377a6395b062b2c1a2fee16 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 27 Dec 2024 17:19:48 +0100 Subject: [PATCH 2/3] slic3r:gui: Fix ambiguous set_values call MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit src/slic3r/GUI/PhysicalPrinterDialog.cpp: In member function ‘void Slic3r::GUI::PhysicalPrinterDialog::build_printhost_settings(Slic3r::GUI::ConfigOptionsGroup*)’: /home/asn/workspace/prj/oss/PrusaSlicer/asn-debug/src/slic3r/GUI/PhysicalPrinterDialog.cpp:610: error: call of overloaded ‘set_values()’ is ambiguous 610 | choice->set_values({ m_config->opt_string("printhost_port") }); In file included from /home/asn/workspace/prj/oss/PrusaSlicer/asn-debug/src/slic3r/GUI/OptionsGroup.hpp:24, from /home/asn/workspace/prj/oss/PrusaSlicer/asn-debug/src/slic3r/GUI/Search.hpp:24, from /home/asn/workspace/prj/oss/PrusaSlicer/asn-debug/src/slic3r/GUI/MainFrame.hpp:30, from /home/asn/workspace/prj/oss/PrusaSlicer/asn-debug/src/slic3r/GUI/PhysicalPrinterDialog.cpp:31: src/slic3r/GUI/Field.hpp:446:33: note: candidate: ‘void Slic3r::GUI::Choice::set_values(const std::vector > &)’ 446 | void set_values(const std::vector &values); | ^~~~~~~~~~ src/slic3r/GUI/Field.hpp:447:33: note: candidate: ‘void Slic3r::GUI::Choice::set_values(const wxArrayString&)’ 447 | void set_values(const wxArrayString &values); | ^~~~~~~~~~ --- src/slic3r/GUI/PhysicalPrinterDialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slic3r/GUI/PhysicalPrinterDialog.cpp b/src/slic3r/GUI/PhysicalPrinterDialog.cpp index 849e987c73..7d0c628c23 100644 --- a/src/slic3r/GUI/PhysicalPrinterDialog.cpp +++ b/src/slic3r/GUI/PhysicalPrinterDialog.cpp @@ -607,7 +607,7 @@ void PhysicalPrinterDialog::build_printhost_settings(ConfigOptionsGroup* m_optgr // Always fill in the "printhost_port" combo box from the config and select it. { Choice* choice = dynamic_cast(m_optgroup->get_field("printhost_port")); - choice->set_values({ m_config->opt_string("printhost_port") }); + choice->set_values(std::vector({ m_config->opt_string("printhost_port") })); choice->set_selection(); } From e4a42ff980a4a240f241efb8ec766ed8cbd7ec8a Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 27 Dec 2024 17:28:20 +0100 Subject: [PATCH 3/3] slic3r:utils: Fix type mismatch in ternary MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit src/slic3r/Utils/OctoPrint.cpp: In lambda function: src/slic3r/Utils/OctoPrint.cpp:754:36: error: operands to ‘?:’ have different types ‘std::wstring’ {aka ‘std::__cxx11::basic_string ’} and ‘wxString’ 754 | si.name = name ? boost::nowide::widen(*name) : wxString(); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- src/slic3r/Utils/OctoPrint.cpp | 2 +- src/slic3r/Utils/PrusaConnect.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/slic3r/Utils/OctoPrint.cpp b/src/slic3r/Utils/OctoPrint.cpp index 2c84e293ef..5e8886d650 100644 --- a/src/slic3r/Utils/OctoPrint.cpp +++ b/src/slic3r/Utils/OctoPrint.cpp @@ -751,7 +751,7 @@ bool PrusaLink::get_storage(wxArrayString& storage_path, wxArrayString& storage_ if (path && (!available || *available)) { StorageInfo si; si.path = boost::nowide::widen(*path); - si.name = name ? boost::nowide::widen(*name) : wxString(); + si.name = name ? boost::nowide::widen(*name) : std::wstring(); // If read_only is missing, assume it is NOT read only. // si.read_only = read_only ? *read_only : false; // version without "ro" si.read_only = (read_only ? *read_only : (ro ? *ro : false)); diff --git a/src/slic3r/Utils/PrusaConnect.cpp b/src/slic3r/Utils/PrusaConnect.cpp index 3812bc04f6..f8f662145b 100644 --- a/src/slic3r/Utils/PrusaConnect.cpp +++ b/src/slic3r/Utils/PrusaConnect.cpp @@ -256,7 +256,7 @@ bool PrusaConnectNew::get_storage(wxArrayString& storage_path, wxArrayString& st if (path && (!available || *available)) { StorageInfo si; si.path = boost::nowide::widen(*path); - si.name = name ? boost::nowide::widen(*name) : wxString(); + si.name = name ? boost::nowide::widen(*name) : std::wstring(); // If read_only is missing, assume it is NOT read only. // si.read_only = read_only ? *read_only : false; // version without "ro" si.read_only = (read_only ? *read_only : (ro ? *ro : false));