PresetUpdater: Fix string type
This commit is contained in:
parent
60f62a6463
commit
0feb4d823f
@ -150,7 +150,7 @@ MsgUpdateConfig::~MsgUpdateConfig() {}
|
|||||||
|
|
||||||
// MsgDataIncompatible
|
// MsgDataIncompatible
|
||||||
|
|
||||||
MsgDataIncompatible::MsgDataIncompatible(const std::unordered_map<std::string, std::string> &incompats) :
|
MsgDataIncompatible::MsgDataIncompatible(const std::unordered_map<std::string, wxString> &incompats) :
|
||||||
MsgDialog(_(L("Slic3r incompatibility")), _(L("Slic3r configuration is incompatible")), wxBitmap(from_u8(Slic3r::var("Slic3r_192px_grayscale.png"))), wxID_NONE)
|
MsgDialog(_(L("Slic3r incompatibility")), _(L("Slic3r configuration is incompatible")), wxBitmap(from_u8(Slic3r::var("Slic3r_192px_grayscale.png"))), wxID_NONE)
|
||||||
{
|
{
|
||||||
auto *text = new wxStaticText(this, wxID_ANY, _(L(
|
auto *text = new wxStaticText(this, wxID_ANY, _(L(
|
||||||
|
@ -77,7 +77,7 @@ class MsgDataIncompatible : public MsgDialog
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// incompats is a map of "vendor name" -> "version restrictions"
|
// incompats is a map of "vendor name" -> "version restrictions"
|
||||||
MsgDataIncompatible(const std::unordered_map<std::string, std::string> &incompats);
|
MsgDataIncompatible(const std::unordered_map<std::string, wxString> &incompats);
|
||||||
MsgDataIncompatible(MsgDataIncompatible &&) = delete;
|
MsgDataIncompatible(MsgDataIncompatible &&) = delete;
|
||||||
MsgDataIncompatible(const MsgDataIncompatible &) = delete;
|
MsgDataIncompatible(const MsgDataIncompatible &) = delete;
|
||||||
MsgDataIncompatible &operator=(MsgDataIncompatible &&) = delete;
|
MsgDataIncompatible &operator=(MsgDataIncompatible &&) = delete;
|
||||||
|
@ -483,14 +483,14 @@ bool PresetUpdater::config_update() const
|
|||||||
if (updates.incompats.size() > 0) {
|
if (updates.incompats.size() > 0) {
|
||||||
BOOST_LOG_TRIVIAL(info) << boost::format("%1% bundles incompatible. Asking for action...") % updates.incompats.size();
|
BOOST_LOG_TRIVIAL(info) << boost::format("%1% bundles incompatible. Asking for action...") % updates.incompats.size();
|
||||||
|
|
||||||
std::unordered_map<std::string, std::string> incompats_map;
|
std::unordered_map<std::string, wxString> incompats_map;
|
||||||
for (const auto &incompat : updates.incompats) {
|
for (const auto &incompat : updates.incompats) {
|
||||||
auto vendor = incompat.name();
|
auto vendor = incompat.name();
|
||||||
auto restrictions = wxString::Format(_(L("requires min. %s and max. %s")),
|
auto restrictions = wxString::Format(_(L("requires min. %s and max. %s")),
|
||||||
incompat.version.min_slic3r_version.to_string(),
|
incompat.version.min_slic3r_version.to_string(),
|
||||||
incompat.version.max_slic3r_version.to_string()
|
incompat.version.max_slic3r_version.to_string()
|
||||||
);
|
);
|
||||||
incompats_map.emplace(std::move(vendor), std::move(restrictions));
|
incompats_map.emplace(std::make_pair(std::move(vendor), std::move(restrictions)));
|
||||||
}
|
}
|
||||||
|
|
||||||
GUI::MsgDataIncompatible dlg(std::move(incompats_map));
|
GUI::MsgDataIncompatible dlg(std::move(incompats_map));
|
||||||
@ -519,7 +519,7 @@ bool PresetUpdater::config_update() const
|
|||||||
if (! update.version.comment.empty()) {
|
if (! update.version.comment.empty()) {
|
||||||
ver_str += std::string(" (") + update.version.comment + ")";
|
ver_str += std::string(" (") + update.version.comment + ")";
|
||||||
}
|
}
|
||||||
updates_map.emplace(std::move(vendor), std::move(ver_str));
|
updates_map.emplace(std::make_pair(std::move(vendor), std::move(ver_str)));
|
||||||
}
|
}
|
||||||
|
|
||||||
GUI::MsgUpdateConfig dlg(std::move(updates_map));
|
GUI::MsgUpdateConfig dlg(std::move(updates_map));
|
||||||
|
Loading…
Reference in New Issue
Block a user