From a2c0390468b91a3f8a97a3bbabc2f9c98e0d105a Mon Sep 17 00:00:00 2001 From: Charles Yin Date: Tue, 26 Jul 2011 13:46:54 +1000 Subject: Add notify signals for QIntvalidator, QDoubleValidator, QRegExpValidator Task-number:QTBUG-19956 Change-Id: I5ab5e4494189ece5b0eb1f63e73e49cb2c4e9656 Reviewed-by:Michael Brasser Reviewed-on: http://codereview.qt.nokia.com/2147 Reviewed-by: Qt Sanity Bot Reviewed-by: Michael Brasser --- tests/auto/qregexpvalidator/tst_qregexpvalidator.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/auto/qregexpvalidator/tst_qregexpvalidator.cpp') diff --git a/tests/auto/qregexpvalidator/tst_qregexpvalidator.cpp b/tests/auto/qregexpvalidator/tst_qregexpvalidator.cpp index d8ef92a439..23cd5b1ef1 100644 --- a/tests/auto/qregexpvalidator/tst_qregexpvalidator.cpp +++ b/tests/auto/qregexpvalidator/tst_qregexpvalidator.cpp @@ -115,9 +115,12 @@ void tst_QRegExpValidator::validate() QFETCH( int, state ); QRegExpValidator rv( 0 ); + QSignalSpy spy(&rv, SIGNAL(regExpChanged(const QRegExp&))); + rv.setRegExp( QRegExp( rx ) ); int dummy; QCOMPARE( (int)rv.validate( value, dummy ), state ); + QCOMPARE(spy.count(), 1); } QTEST_MAIN(tst_QRegExpValidator) -- cgit v1.2.3