Fix connection list regression from PR #61 MUID type change #64
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix connection list regression from PR #61 MUID type change
Problem
After PR #61, the Qt GUI "Device:" combo box on the "Initiator" tab no longer populates with discovered connections when clicking "Send Discovery". The
InitiatorWidget::updateDeviceList()method receives an emptyconnections_veceven though discovery is working.Root Cause
PR #61 changed the core
MidiCIDeviceto useuint32_tfor MUIDs instead ofuint8_t, butCIDeviceModel::on_connections_changed()was still usinguint8_tvectors when iterating through connections. This type mismatch prevented the connection synchronization callback chain from working properly between the core device and GUI layers.Solution
Changed all
uint8_tMUID variables touint32_tinCIDeviceModel::on_connections_changed()to align with the core device interface changes:std::vector<uint8_t> current_muids→std::vector<uint32_t> current_muidsstd::vector<uint8_t> existing_muids→std::vector<uint32_t> existing_muidsfor (uint8_t muid : current_muids)→for (uint32_t muid : current_muids)uint8_t muid = conn_model->get_connection()->get_target_muid()→uint32_t muid = ...Testing
Files Changed
tools/ci-tool/src/CIDeviceModel.cpp- Fixed MUID type mismatch in connection synchronizationLink to Devin run
https://app.devin.ai/sessions/876ffe834a52417783bf78c600be8dfc
Requested by: Atsushi Eno (atsushieno@gmail.com)