Skip to content

Remove QSignalMapper and replace by direct lambda calls #1324

@codeling

Description

@codeling

QSignalMapper has undergone changes from Qt 5 to Qt 6; and actually it is not required anymore, because lambdas can be used (since Qt5) instead to directly do the mapping.

Therefore, I'm proposing to consistently use lambdas instead of QSignalMappers; this would simplify code because:

  • It would reduce lines of code because we only need a single signal/slot connection instead of :
    • link a signal to the QSignalMapper
    • the actual slot to the QSignalMapper's mapped(String/Int/...) signals connection
    • the insertion of the mapping
  • It would make it unnecessary to distinguish between Qt5 and Qt6 via #if 's

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