aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoinamountfield.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-08-21 10:54:43 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2018-08-21 11:30:13 +0200
commitaf4fa72fac092480a2ae6cdd608e0b982c80f592 (patch)
treecd704fc12c8131d8a378ec53a5b4e616b492c849 /src/qt/bitcoinamountfield.cpp
parent8aa9badf5ea3ea98980f50d924e88e46c4d5ee38 (diff)
parent3567b247f43decb6fc102d5b0989d1746fce0441 (diff)
Merge #13529: Use new Qt5 connect syntax
3567b247f43decb6fc102d5b0989d1746fce0441 test: Add lint to prevent SIGNAL/SLOT connect style (João Barbosa) f78558f1e39198779bdb17e2b0e256fb99ad4b28 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
Diffstat (limited to 'src/qt/bitcoinamountfield.cpp')
-rw-r--r--src/qt/bitcoinamountfield.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qt/bitcoinamountfield.cpp b/src/qt/bitcoinamountfield.cpp
index 6726019a3f..b68f3a439b 100644
--- a/src/qt/bitcoinamountfield.cpp
+++ b/src/qt/bitcoinamountfield.cpp
@@ -29,7 +29,7 @@ public:
{
setAlignment(Qt::AlignRight);
- connect(lineEdit(), SIGNAL(textEdited(QString)), this, SIGNAL(valueChanged()));
+ connect(lineEdit(), &QLineEdit::textEdited, this, &AmountSpinBox::valueChanged);
}
QValidator::State validate(QString &text, int &pos) const
@@ -213,8 +213,8 @@ BitcoinAmountField::BitcoinAmountField(QWidget *parent) :
setFocusProxy(amount);
// If one if the widgets changes, the combined content changes as well
- connect(amount, SIGNAL(valueChanged()), this, SIGNAL(valueChanged()));
- connect(unit, SIGNAL(currentIndexChanged(int)), this, SLOT(unitChanged(int)));
+ connect(amount, &AmountSpinBox::valueChanged, this, &BitcoinAmountField::valueChanged);
+ connect(unit, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &BitcoinAmountField::unitChanged);
// Set default based on configuration
unitChanged(unit->currentIndex());