Bug 405755 - Problem when we change to new connect api when sender and receiver has default value
Summary: Problem when we change to new connect api when sender and receiver has defaul...
Status: REPORTED
Alias: None
Product: clazy
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Sergio Martins
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-22 14:52 UTC by Laurent Montel
Modified: 2019-03-22 16:10 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Montel 2019-03-22 14:52:35 UTC
Bug when converting to new connect api.


As reported by Albert and you can see phabricator review for this bug (in sddm) https://phabricator.kde.org/D19959


in sddm-kcm clazy converted:

-    connect(configUi->autoLogin, SIGNAL(clicked()), SIGNAL(changed()));
+    connect(configUi->autoLogin, &QGroupBox::clicked, this, &AdvanceConfig::changed);

but signal AdvanceConfig::changed had a default value
Q_SIGNALS:
    void changed(bool changed=true);

and QGroupBox::clicked has default value == false

=> when we use new connect api it will emit:
QGroupBox::clicked(value == false) => emit AdvanceConfig::changed(false)
as we send value from clicked to changed

=> Prevously when we clicked on QGroupBox it emitted changed(true) as we didn't send "sender value" on reveiver.

For me we mustn't change connect api when old api doesn't use argument and sender and receiver has a default argument.

I don't know if we can detect it but it will