Skip to content

Refactor out usages of sender() #13444

Description

@Warchamp7

Qt's sender() function is an older pattern from before Signals and Slots supported lambdas.

Example:

void ImporterEntryPathItemDelegate::updateText()
{
QLineEdit *lineEdit = dynamic_cast<QLineEdit *>(sender());
QWidget *editor = lineEdit->parentWidget();
emit commitData(editor);
}

They're a legacy approach that are extremely brittle due to violating type safety and encapsulation.

Anywhere that we are using sender() should be refactored in some manner.

This does not need to be fixed in a signal PR or commit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/cleanupNon-breaking change which makes code smaller or more readablekind/tech-debt

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions