mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-24 22:09:20 +02:00
Merge bitcoin-core/gui#257: refactor: Use template function qOverload in signal-slot connections
cdbc2bd1f1qt: 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: utACKcdbc2bd1f1. promag: Code review ACKcdbc2bd1f1. Tree-SHA512: 72002aa646b1a79bab62d498825b3f245dc7ebdc189280f8bd3b4076e1bb50be8802c02bc872ff6f70c1ea81faec66d3bec36471119dd98c9e70d87b990396ae
This commit is contained in:
@@ -177,12 +177,12 @@ TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *pa
|
||||
abandonAction = contextMenu->addAction(tr("Abandon transaction"), this, &TransactionView::abandonTx);
|
||||
contextMenu->addAction(tr("Edit address label"), this, &TransactionView::editLabel);
|
||||
|
||||
connect(dateWidget, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated), this, &TransactionView::chooseDate);
|
||||
connect(typeWidget, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated), this, &TransactionView::chooseType);
|
||||
connect(watchOnlyWidget, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated), this, &TransactionView::chooseWatchonly);
|
||||
connect(amountWidget, &QLineEdit::textChanged, amount_typing_delay, static_cast<void (QTimer::*)()>(&QTimer::start));
|
||||
connect(dateWidget, qOverload<int>(&QComboBox::activated), this, &TransactionView::chooseDate);
|
||||
connect(typeWidget, qOverload<int>(&QComboBox::activated), this, &TransactionView::chooseType);
|
||||
connect(watchOnlyWidget, qOverload<int>(&QComboBox::activated), this, &TransactionView::chooseWatchonly);
|
||||
connect(amountWidget, &QLineEdit::textChanged, amount_typing_delay, qOverload<>(&QTimer::start));
|
||||
connect(amount_typing_delay, &QTimer::timeout, this, &TransactionView::changedAmount);
|
||||
connect(search_widget, &QLineEdit::textChanged, prefix_typing_delay, static_cast<void (QTimer::*)()>(&QTimer::start));
|
||||
connect(search_widget, &QLineEdit::textChanged, prefix_typing_delay, qOverload<>(&QTimer::start));
|
||||
connect(prefix_typing_delay, &QTimer::timeout, this, &TransactionView::changedSearch);
|
||||
|
||||
connect(transactionView, &QTableView::doubleClicked, this, &TransactionView::doubleClicked);
|
||||
|
||||
Reference in New Issue
Block a user