Skip to content
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

Use new Qt5 connect syntax #13529

Merged
merged 2 commits into from Aug 21, 2018
Merged

Conversation

@promag
Copy link
Member

@promag promag commented Jun 24, 2018

Pros&cons in https://wiki.qt.io/New_Signal_Slot_Syntax.

Note that connecting to/from overloaded slot/signal is ugly before qt 5.7 (see https://stackoverflow.com/a/16795664).

@MarcoFalke
Copy link
Member

@MarcoFalke MarcoFalke commented Jun 24, 2018

Concept ACK. The new syntax has compile time checks, removing the need to debug impossible to find syntax errors during run time.

@laanwj
Copy link
Member

@laanwj laanwj commented Jun 24, 2018

Concept ACK (because of @MarcoFalke's reasoning)
Would make sense to change all of these at once.

@promag
Copy link
Member Author

@promag promag commented Jun 24, 2018

Thanks, I'll complete it then.

@promag
Copy link
Member Author

@promag promag commented Jun 24, 2018

@MarcoFalke @laanwj see new lint script, it can be improved later with other checks related to Qt. I don't know of a Qt way to prevent the old syntax.

@jonasschnelli
Copy link
Member

@jonasschnelli jonasschnelli commented Jun 26, 2018

Concept ACK

1 similar comment
@fanquake
Copy link
Member

@fanquake fanquake commented Jul 1, 2018

Concept ACK

@laanwj
Copy link
Member

@laanwj laanwj commented Jul 5, 2018

see new lint script, it can be improved later with other checks related to Qt

LGTM

@laanwj
Copy link
Member

@laanwj laanwj commented Jul 10, 2018

  • found a connection to a private slot that doesn't work with the new syntax.
  • connection to/from overloaded slot/signal is ugly before qt 5.7 (see https://stackoverflow.com/a/16795664)

does this mean it's better to postpone this to a (far) future in which we can drop pre-5.7 support?

@promag
Copy link
Member Author

@promag promag commented Jul 10, 2018

does this mean it's better to postpone this to a (far) future in which we can drop pre-5.7 support?

Not really, until now just a couple of these where I have to cast the slot.

@laanwj
Copy link
Member

@laanwj laanwj commented Jul 10, 2018

oh if it can be worked around and is just a couple of cases, I agree it's not a big issue, just need to be careful to test all behavior afterwards.

@fanquake
Copy link
Member

@fanquake fanquake commented Jul 21, 2018

@promag What's the status of this? Would it be good to get into 0.17.0?

@promag promag force-pushed the 2018-06-use-qt5-connect-syntax branch 5 times, most recently from 42f59ce to 4d54e33 Jul 22, 2018
@promag promag changed the title wip: Use new Qt5 connect syntax Use new Qt5 connect syntax Jul 22, 2018
@promag
Copy link
Member Author

@promag promag commented Jul 22, 2018

@fanquake ready to review.

@promag
Copy link
Member Author

@promag promag commented Jul 22, 2018

oh if it can be worked around and is just a couple of cases

@laanwj at the moment I count 25 cases.

@DrahtBot
Copy link
Contributor

@DrahtBot DrahtBot commented Jul 22, 2018

Note to reviewers: This pull request conflicts with the following ones:
  • #13966 (gui: When private key is disabled, only show watch-only balance by ken2812221)
  • #13848 (gui: don't disable the sync overlay when wallet is disabled by fanquake)
  • #13818 (More intuitive GUI settings behavior when -proxy is set by Sjors)
  • #13280 ([qt] Removed "Pay only the required fee" checkbox by GreatSock)
  • #13248 ([gui] Make proxy icon from statusbar clickable by mess110)
  • #13100 (gui: Add dynamic wallets support by promag)
  • #12818 ([qt] TransactionView: highlight replacement tx after fee bump by Sjors)
  • #9502 ([Qt] Add option to pause/resume block downloads by jonasschnelli)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@promag promag force-pushed the 2018-06-use-qt5-connect-syntax branch 2 times, most recently from 9443c85 to 9813bf1 Jul 23, 2018
@laanwj laanwj added this to the 0.18.0 milestone Jul 23, 2018
@promag
Copy link
Member Author

@promag promag commented Aug 16, 2018

@Sjors thanks for the review, I'll rebase and address your comments!

@laanwj laanwj added this to Blockers in High-priority for review Aug 16, 2018
@promag promag force-pushed the 2018-06-use-qt5-connect-syntax branch 2 times, most recently from de93a06 to ac8661e Aug 20, 2018
@promag
Copy link
Member Author

@promag promag commented Aug 20, 2018

all console window commands cause a segfault, so much for compile time checks :-(

@Sjors fixed in 5261ab0.

application hides when I navigate to a new tab (e.g. from Overview to Transactions); maybe some event needs to be not propagated?

Fixed in ac8661e.

@Sjors
Copy link
Member

@Sjors Sjors commented Aug 20, 2018

Can confirm these issues are fixed in ac8661e.

@promag promag force-pushed the 2018-06-use-qt5-connect-syntax branch from ac8661e to 01b5c26 Aug 20, 2018
@promag
Copy link
Member Author

@promag promag commented Aug 20, 2018

Squashed and rebased. Thanks @Sjors!

@DrahtBot
Copy link
Contributor

@DrahtBot DrahtBot commented Aug 20, 2018

Needs rebase

@laanwj
Copy link
Member

@laanwj laanwj commented Aug 21, 2018

ehm... sorry, needs rebase again, if the remaining issues are solved we should merge this

@promag promag force-pushed the 2018-06-use-qt5-connect-syntax branch from 01b5c26 to 3567b24 Aug 21, 2018
@laanwj laanwj merged commit 3567b24 into bitcoin:master Aug 21, 2018
2 checks passed
laanwj added a commit that referenced this issue Aug 21, 2018
3567b24 test: Add lint to prevent SIGNAL/SLOT connect style (João Barbosa)
f78558f qt: Use new Qt5 connect syntax (João Barbosa)

Pull request description:

  Pros&cons in https://wiki.qt.io/New_Signal_Slot_Syntax.

  Note that connecting to/from overloaded slot/signal is ugly before qt 5.7 (see https://stackoverflow.com/a/16795664).

Tree-SHA512: ab81f035099fecd34be546f7091bc29595349f2fd0fea26f6414242702955fca27faa4fe19ebfe105c01217908b51db762cb5a9f6ce25bc5e8e6f64c77428c22
@promag promag deleted the 2018-06-use-qt5-connect-syntax branch Aug 21, 2018
@laanwj laanwj removed this from Blockers in High-priority for review Aug 23, 2018
random-zebra added a commit to PIVX-Project/PIVX that referenced this issue Mar 23, 2020
c54fd9d [Qt] Switch to newer connect syntax (Fuzzbawls)

Pull request description:

  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:
  - [x] #1351

ACKs for top commit:
  furszy:
    ACK c54fd9d
  random-zebra:
    ACK c54fd9d and merging...

Tree-SHA512: d5222264566a8920ab97e8c586f134156d9d0514d014b430bdd47a34b0620ab94a1c6d341b6a57322f1131a8fad91a5e1af907f3bd7112d0ab5e04c4cc9f5ae5
wqking added a commit to wqking/Vitae that referenced this issue Aug 24, 2020
c54fd9dfded28f2b4ff86914422fb592bd86f320 [Qt] Switch to newer connect syntax (Fuzzbawls)

Pull request description:

  Switch all Qt connections to the newer functor-based syntax.

  Marked [WIP] for now until larger PRs can be merged.

  Mostly ported from bitcoin/bitcoin#13529

  Requires the following PR to be merged first in order to adhere to standards:
  - [x] #1351

ACKs for top commit:
  furszy:
    ACK c54fd9d
  random-zebra:
    ACK c54fd9dfded28f2b4ff86914422fb592bd86f320 and merging...

Tree-SHA512: d5222264566a8920ab97e8c586f134156d9d0514d014b430bdd47a34b0620ab94a1c6d341b6a57322f1131a8fad91a5e1af907f3bd7112d0ab5e04c4cc9f5ae5

# Conflicts:
#	.travis/lint_06_script.sh
#	src/qt/optionsdialog.cpp
#	src/qt/rpcconsole.cpp
#	src/qt/vitae.cpp
#	src/qt/vitae/navmenuwidget.cpp
#	src/qt/vitae/privacywidget.cpp
#	src/qt/vitae/send.cpp
linuxsh2 added a commit to linuxsh2/dash that referenced this issue Aug 17, 2021
3567b24 test: Add lint to prevent SIGNAL/SLOT connect style (João Barbosa)
f78558f qt: Use new Qt5 connect syntax (João Barbosa)

Pull request description:

  Pros&cons in https://wiki.qt.io/New_Signal_Slot_Syntax.

  Note that connecting to/from overloaded slot/signal is ugly before qt 5.7 (see https://stackoverflow.com/a/16795664).

Tree-SHA512: ab81f035099fecd34be546f7091bc29595349f2fd0fea26f6414242702955fca27faa4fe19ebfe105c01217908b51db762cb5a9f6ce25bc5e8e6f64c77428c22
linuxsh2 added a commit to linuxsh2/dash that referenced this issue Aug 23, 2021
3567b24 test: Add lint to prevent SIGNAL/SLOT connect style (João Barbosa)
f78558f qt: Use new Qt5 connect syntax (João Barbosa)

Pull request description:

  Pros&cons in https://wiki.qt.io/New_Signal_Slot_Syntax.

  Note that connecting to/from overloaded slot/signal is ugly before qt 5.7 (see https://stackoverflow.com/a/16795664).

Tree-SHA512: ab81f035099fecd34be546f7091bc29595349f2fd0fea26f6414242702955fca27faa4fe19ebfe105c01217908b51db762cb5a9f6ce25bc5e8e6f64c77428c22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

7 participants