Skip to content

An unending loop when ApplicationSettings::shortcutChanged() signal is emitted. #11

@lokitkhemka

Description

@lokitkhemka

Basically,

I was trying to understand how shortcutChanged signal is perpetuated and I think, it is looping endlessly.

Consider the starting to be connection between ApplicationSettings::shortcutChanged signal and ActionList::changeShortcut in the file main_window.cpp. Eventually ActionList::changeShortcut emits a signal ActionDefinition::shortcutChanged via ActionDefinition::setShortcut method.

In application_settings.cpp, ActionDefinition::shortcutChanged is connected to ApplicationSettings::onShortcutChanged (in the file application_settings.cpp), which in turn emits ApplicationSettings::shortcutChanged signals and the cycle goes around.

I think to break the cycle, we just have to remove the signal emit from ActionDefinition::setShortcut and remove the connection between ActionDefinition::shortcutChanged and ApplicationSettings::onShortcutChanged.

Sorry, if it is too complicated. What do you think about my suggestion? Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions