Skip to content

Script repository dialog doesn't open from script settings #3607

@pbek

Description

@pbek

Bug Report

Description:
Opening the script repository dialog from the script settings page (via the "Add script" button drop-down → "Search script repository") does not work. It only works when triggered from the main menu (Scripting → Script repository).

Root Cause:
In scriptingsettingswidget.cpp, the action was connected using the old-style SIGNAL/SLOT macro syntax:

connect(searchScriptAction, SIGNAL(triggered()), this, SLOT(searchScriptInRepository()));

However, searchScriptInRepository() is declared in the public: section of the class, not in public slots:. The old-style SIGNAL/SLOT macro requires the receiver to be declared in a slots: section, so the connection silently fails at runtime.

Fix:
Replace with a new-style lambda connection that does not require a slot declaration:

connect(searchScriptAction, &QAction::triggered, this,
        [this]() { searchScriptInRepository(); });

Steps to Reproduce:

  1. Open Settings → Scripting
  2. Click the "Add script..." button drop-down arrow
  3. Select "Search script repository"
  4. Nothing happens

Expected:
The script repository dialog should open.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions