-
Notifications
You must be signed in to change notification settings - Fork 38.7k
qt: Replace deprecated QSignalMapper by lambda expressions #16706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
qt: Replace deprecated QSignalMapper by lambda expressions #16706
Conversation
The QSignalMapper class is obsolete since Qt 5.10.
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
|
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 |
I didn't know about that. Thank you. From Un-deprecate QSignalMapper:
FWIW, this PR is a part of my work on warnings raised during compiling on Bionic against Qt 5.13. |
|
Concept ACK -- more readable and less code |
promag
left a comment
There was a problem hiding this 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.
c4e40a4 to
0912134
Compare
Done. |
|
Concept ACK |
|
Gitian builds for commit db67101 (master):
Gitian builds for commit e05543dbcf87fb9c057d9c652835d85c25a2cb3e (master and this pull):
|
jonasschnelli
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK 0912134
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
|
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. |
…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
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
The
QSignalMapperclass has been deprecated since Qt 5.10.This PR replaces it by lambdas and does not change behavior.