diff options
author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2019-02-18 22:18:24 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2019-03-01 20:21:06 +0000 |
commit | 9eb50751b859cf46aa69ca5707346bd4a74a5f90 (patch) | |
tree | 7234a467259a8317712edce0cad4e2a38bfc1c4c /tests/auto | |
parent | b33eb938910392e2db45bfdfd3f1e2cb6aced7ef (diff) |
QSpinBox: add new signal textChanged(QString)
Add a new signal textChanged(QString) as a replacement for
valueChanged(QString) so valueChanged(QString) can be removed with Qt6.
This removes the ambiguous valueChanged() signal and also matches the
'text' property naming.
Change-Id: I0676a7112f70add20a3a7ef9381268cd9b8a5851
Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com>
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp index 1d106f94f3..7174c274f9 100644 --- a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp +++ b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp @@ -206,7 +206,7 @@ private slots: void stepModifierPressAndHold_data(); void stepModifierPressAndHold(); public slots: - void valueChangedHelper(const QString &); + void textChangedHelper(const QString &); void valueChangedHelper(int); private: QStringList actualTexts; @@ -474,7 +474,7 @@ void tst_QSpinBox::setPrefixSuffix() QCOMPARE(spin.cleanText(), expectedCleanText); } -void tst_QSpinBox::valueChangedHelper(const QString &text) +void tst_QSpinBox::textChangedHelper(const QString &text) { actualTexts << text; } @@ -552,7 +552,7 @@ void tst_QSpinBox::setTracking() QSpinBox spin(0); spin.setKeyboardTracking(tracking); spin.show(); - connect(&spin, SIGNAL(valueChanged(QString)), this, SLOT(valueChangedHelper(QString))); + connect(&spin, &QSpinBox::textChanged, this, &tst_QSpinBox::textChangedHelper); keys.simulate(&spin); QCOMPARE(actualTexts, texts); |