Skip to content

Conversation

@hebasto
Copy link
Member

@hebasto hebasto commented Aug 24, 2019

The QSignalMapper class has been deprecated since Qt 5.10.

This PR replaces it by lambdas and does not change behavior.

The QSignalMapper class is obsolete since Qt 5.10.
@DrahtBot
Copy link
Contributor

DrahtBot commented Aug 24, 2019

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

No conflicts as of last run.

@fanquake
Copy link
Member

QSignalMapper has actually been un-deprecated, see QSignalMapper deprecation and Un-deprecate QSignalMapper.

However Concept ACK assuming there's no change in behaviour and the new code is still compatible with Qt 5.5.1.

@hebasto
Copy link
Member Author

hebasto commented Aug 24, 2019

@fanquake

QSignalMapper has actually been un-deprecated, see QSignalMapper deprecation and Un-deprecate QSignalMapper.

I didn't know about that. Thank you.

From Un-deprecate QSignalMapper:

... Note that in most cases you can use lambdas for passing custom parameters to slots. This is less costly and will simplify the code.

FWIW, this PR is a part of my work on warnings raised during compiling on Bionic against Qt 5.13.

@practicalswift
Copy link
Contributor

Concept ACK -- more readable and less code

Copy link
Contributor

@promag promag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK.

Are the style changes really necessary? I'd prefer just dropping QSignalMapper.

The QSignalMapper class is obsolete since Qt 5.10.
@hebasto hebasto force-pushed the 20190824-obsolete-qsignalmapper branch from c4e40a4 to 0912134 Compare August 25, 2019 06:13
@hebasto
Copy link
Member Author

hebasto commented Aug 25, 2019

@promag

Are the style changes really necessary? I'd prefer just dropping QSignalMapper.

Done.

@jonasschnelli
Copy link
Contributor

Concept ACK

@DrahtBot
Copy link
Contributor

Gitian builds for commit db67101 (master):

Gitian builds for commit e05543dbcf87fb9c057d9c652835d85c25a2cb3e (master and this pull):

Copy link
Contributor

@jonasschnelli jonasschnelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 0912134

laanwj added a commit that referenced this pull request Aug 29, 2019
0912134 qt: Remove QSignalMapper from TransactionView (Hennadii Stepanov)
9e0c1d6 qt: Remove QSignalMapper from RPCConsole (Hennadii Stepanov)

Pull request description:

  The [`QSignalMapper`](https://doc.qt.io/qt-5/qsignalmapper.html) class has been [deprecated](https://doc-snapshots.qt.io/qt5-5.10/obsoleteclasses.html) since Qt 5.10.

  This PR replaces it by lambdas and does not change behavior.

ACKs for top commit:
  jonasschnelli:
    utACK 0912134

Tree-SHA512: 0c102d5cab4adc8b6252f72e07123ac87c65434c88cada3e72816ecea8fc4803f15b9c050fb5e1c7e8a96f709265521fd6813ab1890dbf5634032f7ee0d50675
@laanwj laanwj merged commit 0912134 into bitcoin:master Aug 29, 2019
@hebasto hebasto deleted the 20190824-obsolete-qsignalmapper branch August 29, 2019 14:52
@Sjors
Copy link
Member

Sjors commented Aug 29, 2019

Post merge ACK. This totally gets rid of the flood of warnings on macOs with QT 5.13 from homebrew. It's also shorter and more readable. Tested that external explorer links still work, as well as banning peers.

Building with depends (QT 5.9.7) also works, though this still throws trillions of (unrelated) warnings.

sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Aug 29, 2019
…xpressions

0912134 qt: Remove QSignalMapper from TransactionView (Hennadii Stepanov)
9e0c1d6 qt: Remove QSignalMapper from RPCConsole (Hennadii Stepanov)

Pull request description:

  The [`QSignalMapper`](https://doc.qt.io/qt-5/qsignalmapper.html) class has been [deprecated](https://doc-snapshots.qt.io/qt5-5.10/obsoleteclasses.html) since Qt 5.10.

  This PR replaces it by lambdas and does not change behavior.

ACKs for top commit:
  jonasschnelli:
    utACK 0912134

Tree-SHA512: 0c102d5cab4adc8b6252f72e07123ac87c65434c88cada3e72816ecea8fc4803f15b9c050fb5e1c7e8a96f709265521fd6813ab1890dbf5634032f7ee0d50675
jasonbcox pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Oct 12, 2020
Summary:
```
The QSignalMapper class has been deprecated since Qt 5.10.
This PR replaces it by lambdas and does not change behavior.
```

Backport of core [[bitcoin/bitcoin#16706 | PR16706]].

Test Plan:
With Qt >= 5.10 and <= 5.13
  ninja all check
Check the warnings are gone

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D7887
barton2526 added a commit to barton2526/Gridcoin-Research that referenced this pull request Jun 24, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Nov 4, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Nov 11, 2021
pravblockc pushed a commit to pravblockc/dash that referenced this pull request Nov 18, 2021
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants