diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-05-10 23:39:09 +0300 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-05-10 23:42:05 +0300 |
commit | 8d7125f80e2bc9d1b36d6c5e8ef96ff7a57d00fb (patch) | |
tree | dfbe74cd2e6f3889d0f53bb9225422603f975970 /src/qt/bitcoingui.cpp | |
parent | d8ae29ec8f08ad62abd3d831f02d4ddff6aef953 (diff) | |
parent | cdbc2bd1f1c171848c1fef7f217afe140e1afb06 (diff) | |
download | bitcoin-8d7125f80e2bc9d1b36d6c5e8ef96ff7a57d00fb.tar.xz |
Merge bitcoin-core/gui#257: refactor: Use template function qOverload in signal-slot connections
cdbc2bd1f1c171848c1fef7f217afe140e1afb06 qt: Use template function qOverload in signal-slot connections (Hennadii Stepanov)
Pull request description:
A nice template function [`qOverload`](https://doc.qt.io/qt-5/qtglobal.html#qOverload) is available for us now (https://github.com/bitcoin/bitcoin/pull/20413, https://github.com/bitcoin/bitcoin/pull/21286).
Its usage makes code much more readable.
This PR does not change behavior.
ACKs for top commit:
Talkless:
utACK cdbc2bd1f1c171848c1fef7f217afe140e1afb06.
promag:
Code review ACK cdbc2bd1f1c171848c1fef7f217afe140e1afb06.
Tree-SHA512: 72002aa646b1a79bab62d498825b3f245dc7ebdc189280f8bd3b4076e1bb50be8802c02bc872ff6f70c1ea81faec66d3bec36471119dd98c9e70d87b990396ae
Diffstat (limited to 'src/qt/bitcoingui.cpp')
-rw-r--r-- | src/qt/bitcoingui.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 4ce09325a3..17fffe2087 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -561,7 +561,7 @@ void BitcoinGUI::createToolBars() m_wallet_selector = new QComboBox(); m_wallet_selector->setSizeAdjustPolicy(QComboBox::AdjustToContents); - connect(m_wallet_selector, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &BitcoinGUI::setCurrentWalletBySelectorIndex); + connect(m_wallet_selector, qOverload<int>(&QComboBox::currentIndexChanged), this, &BitcoinGUI::setCurrentWalletBySelectorIndex); m_wallet_selector_label = new QLabel(); m_wallet_selector_label->setText(tr("Wallet:") + " "); |