HomePhabricator

test: Add lint to prevent SIGNAL/SLOT connect style

Description

test: Add lint to prevent SIGNAL/SLOT connect style

Summary:
Added new linter that enforces Qt5 SIGNAL/SLOT connection style.

Partial backport of Core PR13529 (adjusted to work with arcanist)
https://github.com/bitcoin/bitcoin/pull/13529/commits/3567b247f43decb6fc102d5b0989d1746fce0441

Test Plan:

arc lint --everything

No Qt5 code violations should appear.

Change line 43 in qt/clientmodel.cpp from
connect(pollTimer, SIGNAL(timeout()), this, SLOT(updateTimer()));
to
connect(pollTimer, &QTimer::timeout, this, &ClientModel::updateTimer);

arc lint

Verify that two Qt5 SIGNAL/SLOT violation errors are reported, one for the SIGNAL and one for the SLOT.

Reviewers: deadalnix, Fabien, jasonbcox, O1 Bitcoin ABC, #bitcoin_abc

Reviewed By: Fabien, O1 Bitcoin ABC, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D4306

Details

Provenance
João Barbosa <joao.paulo.barbosa@gmail.com>Authored on Jun 24 2018, 17:12
nakihitoCommitted on Nov 2 2019, 20:16
nakihitoPushed on Nov 2 2019, 20:16
Reviewer
Restricted Owners Package
Differential Revision
D4306: test: Add lint to prevent SIGNAL/SLOT connect style
Parents
rABC5263b1d033cb: [contrib] Support ARM symbol check
Branches
Unknown
Tags
Unknown