-
Notifications
You must be signed in to change notification settings - Fork 725
[Qt] Switch to newer connect syntax #1049
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] Switch to newer connect syntax #1049
Conversation
394a695 to
318230b
Compare
eb42566 to
70bd698
Compare
|
Gone are the times where things just wouldn't work because you got the parameters for the SIGNAL wrong (there's no error message at all for that). |
95ec730 to
edd8e00
Compare
|
Rebased and ready for review now that #1351 has been merged |
random-zebra
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.
ACK edd8e0038e31f922e757c348bad0154d8e590cd3
furszy
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.
I'm half through this PR, leaving some comments from what i have seen up until now.
it's simple but at the same time, intensive to check, lot of files touched. it has some syntax changes and some code changes to be able to do the same that was doing with the previous code syntax.
Will keep moving in the next days.
cc13b14 to
609b990
Compare
|
rebased |
furszy
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.
Completed the review, found few more stuff.
6c839a0 to
0199e86
Compare
|
rebased again, lets get this merged |
0199e86 to
4e77c09
Compare
4e77c09 to
24bf733
Compare
random-zebra
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.
This looks good to me, just a question and a non-blocking nit.
One last minor thing (which we could even address in a successive PR) is the following.
Overloaded signals in QComboBox and QSpinBox (e.g. currentIndexChanged and valueChanged) can use a native helper (QOverload<>::of) to connect with pointer syntax more easily.
For example
-
static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged)
becomesQOverload<int>::of(&QComboBox::currentIndexChanged) -
or similarily
static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged)
becomesQOverload<int>::of(&QSpinBox::valueChanged) -
or
static_cast<void (QSignalMapper::*)()>(&QSignalMapper::map)
becomesQOverload<>::of(&QSignalMapper::map)
etc
furszy
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.
Last things that found from my side.
24bf733 to
b1b1330
Compare
b1b1330 to
c54fd9d
Compare
furszy
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.
ACK c54fd9d
random-zebra
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.
ACK c54fd9d and merging...
|
Commenting here regarding This functionality isn't included in Qt versions prior to 5.7. Per #1292, we need to support versions down to 5.5. |
PIVX-Project#1049 missed a few connects that were using the old SIGNAL/SLOT syntax. This updates them to the new syntax.
cb332cc [Qt] Convert leftover connects to Qt5 syntax (Fuzzbawls) Pull request description: #1049 missed a few connects that were using the old SIGNAL/SLOT syntax. This updates them to the new syntax. ACKs for top commit: random-zebra: utACK cb332cc furszy: utACK cb332cc Tree-SHA512: bba240b0d71f6a31677d4e93ba69e462f0438a2ad0199d3b04e0529b401ab383123413e78dede3c63fd643b32f5f5a4b36ecc4e5b2ceacf7e0880635e6c8d4c1
Switch all Qt connections to the newer functor-based syntax.
Marked [WIP] for now until larger PRs can be merged.
Mostly ported from bitcoin#13529
Requires the following PR to be merged first in order to adhere to standards: