Skip to content

Conversation

@Fuzzbawls
Copy link
Collaborator

@Fuzzbawls Fuzzbawls commented Oct 20, 2019

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:

@Fuzzbawls Fuzzbawls added this to the 4.0.0 milestone Oct 20, 2019
@Fuzzbawls Fuzzbawls self-assigned this Oct 20, 2019
@Fuzzbawls Fuzzbawls force-pushed the 2019_qt-new-connect-syntax branch 2 times, most recently from 394a695 to 318230b Compare October 21, 2019 04:33
@Fuzzbawls Fuzzbawls modified the milestones: 4.0.0, 4.1.0 Oct 24, 2019
@Fuzzbawls Fuzzbawls force-pushed the 2019_qt-new-connect-syntax branch 2 times, most recently from eb42566 to 70bd698 Compare January 19, 2020 06:35
@Mrs-X
Copy link

Mrs-X commented Jan 19, 2020

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).
❤️ this PR 👍

@Fuzzbawls Fuzzbawls force-pushed the 2019_qt-new-connect-syntax branch 2 times, most recently from 95ec730 to edd8e00 Compare February 25, 2020 08:53
@Fuzzbawls Fuzzbawls changed the title [WIP][Qt] Switch to newer connect syntax [Qt] Switch to newer connect syntax Feb 25, 2020
@Fuzzbawls
Copy link
Collaborator Author

Rebased and ready for review now that #1351 has been merged

random-zebra
random-zebra previously approved these changes Mar 4, 2020
Copy link

@random-zebra random-zebra left a comment

Choose a reason for hiding this comment

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

ACK edd8e0038e31f922e757c348bad0154d8e590cd3

Copy link

@furszy furszy left a 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.

@Fuzzbawls Fuzzbawls force-pushed the 2019_qt-new-connect-syntax branch 2 times, most recently from cc13b14 to 609b990 Compare March 18, 2020 22:50
@Fuzzbawls
Copy link
Collaborator Author

rebased

Copy link

@furszy furszy left a 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.

@Fuzzbawls Fuzzbawls force-pushed the 2019_qt-new-connect-syntax branch 2 times, most recently from 6c839a0 to 0199e86 Compare March 23, 2020 01:03
@Fuzzbawls
Copy link
Collaborator Author

rebased again, lets get this merged

@Fuzzbawls Fuzzbawls force-pushed the 2019_qt-new-connect-syntax branch from 0199e86 to 4e77c09 Compare March 23, 2020 10:43
@Fuzzbawls Fuzzbawls force-pushed the 2019_qt-new-connect-syntax branch from 4e77c09 to 24bf733 Compare March 23, 2020 10:53
Copy link

@random-zebra random-zebra left a 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)
    becomes QOverload<int>::of(&QComboBox::currentIndexChanged)

  • or similarily static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged)
    becomes QOverload<int>::of(&QSpinBox::valueChanged)

  • or static_cast<void (QSignalMapper::*)()>(&QSignalMapper::map)
    becomes QOverload<>::of(&QSignalMapper::map)

etc

Copy link

@furszy furszy left a 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.

@Fuzzbawls Fuzzbawls force-pushed the 2019_qt-new-connect-syntax branch from 24bf733 to b1b1330 Compare March 23, 2020 22:40
@Fuzzbawls Fuzzbawls force-pushed the 2019_qt-new-connect-syntax branch from b1b1330 to c54fd9d Compare March 23, 2020 22:46
Copy link

@furszy furszy left a comment

Choose a reason for hiding this comment

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

ACK c54fd9d

Copy link

@random-zebra random-zebra left a 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...

@Fuzzbawls
Copy link
Collaborator Author

Commenting here regarding qOverload:

This functionality isn't included in Qt versions prior to 5.7. Per #1292, we need to support versions down to 5.5.

@random-zebra random-zebra merged commit 521d13b into PIVX-Project:master Mar 23, 2020
Fuzzbawls added a commit to Fuzzbawls/PIVX that referenced this pull request Apr 4, 2020
PIVX-Project#1049 missed a few connects that were using the old SIGNAL/SLOT syntax.
This updates them to the new syntax.
furszy added a commit that referenced this pull request Apr 8, 2020
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants