Skip to content

Conversation

@laanwj
Copy link
Member

@laanwj laanwj commented Jul 14, 2015

QT_NO_KEYWORDS prevents Qt from defining the foreach, signals, slots and emit macros.

Avoid overlap between Qt macros and boost - for example #undef hackiness in #6421.

The drawback is that all uses of the macros have to be replace by Q_xxx, but at least this is easy to review.

Cc: @sipa @theuni

@jonasschnelli
Copy link
Contributor

code-review ACK.
Definitively a improvement!

@theuni
Copy link
Member

theuni commented Jul 14, 2015

Quick glance utACK. Nice fix. IMO it's more readable this way anyway, since it makes it more obvious to the casual reader that signals/slots are just sugary macros and not some c++ functionality they're not aware of.

@sipa
Copy link
Member

sipa commented Jul 14, 2015

utACK

QT_NO_KEYWORDS prevents Qt from defining the `foreach`, `signals`,
`slots` and `emit` macros.

Avoid overlap between Qt macros and boost - for example #undef hackiness
in bitcoin#6421.
@laanwj laanwj force-pushed the 2015_07_qt_no_keywords branch from 27fc6c7 to d29ec6c Compare July 15, 2015 05:35
@laanwj
Copy link
Member Author

laanwj commented Jul 15, 2015

Fixed some unmeant changes of emit in sentences to Q_EMIT in comments (but left the ones where it makes sense)

@laanwj laanwj merged commit d29ec6c into bitcoin:master Jul 15, 2015
laanwj added a commit that referenced this pull request Jul 15, 2015
d29ec6c qt: define QT_NO_KEYWORDS (Wladimir J. van der Laan)
@laanwj
Copy link
Member Author

laanwj commented Jul 15, 2015

Should be fairly risk-free to do in older major releases as well in case we want to backport #6421

@laanwj
Copy link
Member Author

laanwj commented Jul 15, 2015

Cherry-picked to 0.11 as e092f22

laanwj added a commit that referenced this pull request Jul 15, 2015
QT_NO_KEYWORDS prevents Qt from defining the `foreach`, `signals`,
`slots` and `emit` macros.

Avoid overlap between Qt macros and boost - for example #undef hackiness
in #6421.

Conflicts:
	src/qt/addressbookpage.cpp
	src/qt/peertablemodel.cpp
	src/qt/receivecoinsdialog.cpp
	src/qt/rpcconsole.cpp

Rebased-From: d29ec6c
Github-Pull: #6433
laanwj added a commit that referenced this pull request Jul 15, 2015
laanwj added a commit that referenced this pull request Jul 15, 2015
maflcko pushed a commit to maflcko/bitcoin-core that referenced this pull request Mar 26, 2016
furszy added a commit to PIVX-Project/PIVX that referenced this pull request Jan 30, 2020
3c7ec95 [Qt] Define QT_NO_KEYWORDS (Fuzzbawls)

Pull request description:

  QT_NO_KEYWORDS prevents Qt from defining the `foreach`, `signals`, `slots` and `emit` macros.

  This avoids overlap between Qt macros and boost, and enforces the standard.

  Marked as [WIP] for the time being so as to not merge and create conflicts with existing open PRs. Can still be reviewed however.

  Ported mostly from bitcoin#6433

ACKs for top commit:
  random-zebra:
    ACK 3c7ec95
  furszy:
    utACK 3c7ec95

Tree-SHA512: 867498a1774ad0d3b1b987e82c5023bead62b2669af8f4343903651e49eab204f3444cbfbc1f9ce54d70546d3d7ea128705d8d46470a8a7bbe01ac82f76cefa9
wqking pushed a commit to wqking-temp/Vitae that referenced this pull request Jul 29, 2020
3c7ec95db569fff8c5933632fce5f7e24f4c29ed [Qt] Define QT_NO_KEYWORDS (Fuzzbawls)

Pull request description:

  QT_NO_KEYWORDS prevents Qt from defining the `foreach`, `signals`, `slots` and `emit` macros.

  This avoids overlap between Qt macros and boost, and enforces the standard.

  Marked as [WIP] for the time being so as to not merge and create conflicts with existing open PRs. Can still be reviewed however.

  Ported mostly from bitcoin/bitcoin#6433

ACKs for top commit:
  random-zebra:
    ACK 3c7ec95db569fff8c5933632fce5f7e24f4c29ed
  furszy:
    utACK 3c7ec95

Tree-SHA512: 867498a1774ad0d3b1b987e82c5023bead62b2669af8f4343903651e49eab204f3444cbfbc1f9ce54d70546d3d7ea128705d8d46470a8a7bbe01ac82f76cefa9

# Conflicts:
#	src/qt/clientmodel.cpp
#	src/qt/paymentserver.cpp
#	src/qt/rpcconsole.cpp
#	src/qt/transactiondesc.cpp
#	src/qt/vitae/masternodeswidget.h
#	src/qt/vitae/masternodewizarddialog.h
#	src/qt/vitae/mnmodel.cpp
#	src/qt/vitae/mnrow.h
#	src/qt/vitae/send.cpp
#	src/qt/vitae/send.h
#	src/qt/vitae/settings/settingswalletrepairwidget.cpp
#	src/qt/vitae/topbar.cpp
#	src/qt/walletmodel.cpp
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 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.

4 participants