Skip to content

Fixed plugin parameters not saved when device is disconnected#1998

Open
mryhel wants to merge 1 commit into
mcallegari:masterfrom
mryhel:fix_5_plugin_params
Open

Fixed plugin parameters not saved when device is disconnected#1998
mryhel wants to merge 1 commit into
mcallegari:masterfrom
mryhel:fix_5_plugin_params

Conversation

@mryhel
Copy link
Copy Markdown
Contributor

@mryhel mryhel commented Apr 29, 2026

Description

Summary of Changes:
InputPatch::getPluginParameters() and OutputPatch::getPluginParameters() returned an empty map when the plugin device was disconnected (m_plugin == NULL), causing all custom plugin parameters to be silently dropped when saving a workspace while the device is not connected.

m_parametersCache already existed and was used in reconnect(), but getPluginParameters() ignored it. This fix adds the missing fallback.

Related Issues: N/A

Checklist

  • I have read and followed the QLC+ Coding Guidelines.
  • My code adheres to the project's coding style, including:
    • Placing opening braces { on a new line for functions and class definitions.
    • Consistent use of spaces and indentation.
  • I have tested my changes on the following platforms:
    • Linux
    • Windows
    • macOS
  • I have added or updated documentation as necessary.

Testing

Test Cases:

  1. Open a workspace with MIDI plugin parameters configured (init message, send note off, mode).
  2. Disconnect the device and save the workspace.
  3. Check the saved XML — verify parameters are present.

Test Results:

Before the fix — workspace opened with MIDI parameters configured, saved with device disconnected, parameters lost.

Was:

    <Input Plugin="MIDI" UID="None" Line="0" Profile="Akai APC Mini">
     <PluginParameters MIDISendNoteOff="false" initmessage="APC mini Ableton mode 2"/>
    </Input>
    <Output Plugin="DMX USB" UID="None" Line="0">
     <PluginParameters UniverseChannels="279"/>
    </Output>
    <Feedback Plugin="MIDI" UID="None" Line="1">
     <PluginParameters initmessage="APC mini Ableton mode 2" mode="Note Velocity"/>
    </Feedback>

Became:

    <Input Plugin="MIDI" UID="None" Line="0" Profile="Akai APC Mini"/>
    <Output Plugin="DMX USB" UID="None" Line="0"/>
    <Feedback Plugin="MIDI" UID="None" Line="1"/>

After the fix — same scenario, parameters preserved:

Was:

    <Input Plugin="MIDI" UID="None" Line="0" Profile="Akai APC Mini">
     <PluginParameters MIDISendNoteOff="false" initmessage="APC mini Ableton mode 2"/>
    </Input>
    <Output Plugin="DMX USB" UID="None" Line="0">
     <PluginParameters UniverseChannels="279"/>
    </Output>
    <Feedback Plugin="MIDI" UID="None" Line="1">
     <PluginParameters initmessage="APC mini Ableton mode 2" mode="Note Velocity"/>
    </Feedback>

Became:

    <Input Plugin="MIDI" UID="None" Line="0" Profile="Akai APC Mini">
     <PluginParameters MIDISendNoteOff="false" initmessage="APC mini Ableton mode 2"/>
    </Input>
    <Output Plugin="DMX USB" UID="None" Line="0">
     <PluginParameters UniverseChannels="279"/>
    </Output>
    <Feedback Plugin="MIDI" UID="None" Line="1">
     <PluginParameters initmessage="APC mini Ableton mode 2" mode="Note Velocity"/>
    </Feedback>

@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 34.05% (+0.002%) from 34.048% — mryhel:fix_5_plugin_params into mcallegari:master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants