WIP: ConfigWizard: 3rd party bundle installation roughly done

This commit is contained in:
Vojtech Kral 2019-06-17 16:39:22 +02:00
parent dba9925c4e
commit 235b659cf9
11 changed files with 493 additions and 215 deletions

View file

@ -1318,7 +1318,7 @@ bool PresetCollection::select_preset_by_name_strict(const std::string &name)
}
// Merge one vendor's presets with the other vendor's presets, report duplicates.
std::vector<std::string> PresetCollection::merge_presets(PresetCollection &&other, const std::set<VendorProfile> &new_vendors)
std::vector<std::string> PresetCollection::merge_presets(PresetCollection &&other, const VendorMap &new_vendors)
{
std::vector<std::string> duplicates;
for (Preset &preset : other.m_presets) {
@ -1329,9 +1329,9 @@ std::vector<std::string> PresetCollection::merge_presets(PresetCollection &&othe
if (it == m_presets.end() || it->name != preset.name) {
if (preset.vendor != nullptr) {
// Re-assign a pointer to the vendor structure in the new PresetBundle.
auto it = new_vendors.find(*preset.vendor);
auto it = new_vendors.find(preset.vendor->id);
assert(it != new_vendors.end());
preset.vendor = &(*it);
preset.vendor = &it->second;
}
this->m_presets.emplace(it, std::move(preset));
} else