Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable/Disable Menu items based on plugin loaded #45

Merged
merged 2 commits into from
Feb 12, 2024

Commits on Feb 9, 2024

  1. Enable/Disable Menu items based on plugin loaded

    Per @Trinitou suggestions, a plugin specific menu item should only be enabled (available to execute by user)
    
    This fixes the underlying cause of the crashes reported in free-audio#40 and free-audio#42
    
    Therefore this also reverts the now obsolete change in previous merged pull request free-audio#43
    
    Upon load change we update the menu items
    
    Tab indentation set to 3 to be consistent with existing code
    
    Note: Follows the QT memory ownership model, and the QAction pointers lifetime is handled by their parents
    
    Testing:
    Launch with no plugin loaded, see menu items are greyed out (disabled), user cannot select these items (as intended) therefore code is not executed and app doesn't crash
    
    Launch with plugin loaded, see menu items are available and executed when user clicks, and confirm still no crashes
    
    Images taken for testing
    NatureIsFrequency committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    1410bb3 View commit details
    Browse the repository at this point in the history

Commits on Feb 12, 2024

  1. Use signal/slot approach for pluginLoadedChanged

    Per @Trinitou feedback:
    
    1. pluginLoadedChanged is now a signal of PluginHost
    
    2. Connect MainWindow:: updatePluginMenuItems to this signal
    
    3. Rename updateMenuItems to updatePluginMenuItems (so it specifies it's these are plugin related menu items)
    
    4. Remove i_prefix in function parameter to follow code style
    
    5. Use default argument false for updatePluginMenuItems
    NatureIsFrequency committed Feb 12, 2024
    Configuration menu
    Copy the full SHA
    7017523 View commit details
    Browse the repository at this point in the history