From 56c6e4b772bfaf2b1f4c74f68e1d2a61379e0e64 Mon Sep 17 00:00:00 2001 From: stv Date: Thu, 15 Dec 2005 07:35:35 +0000 Subject: [PATCH] Added checking of the validator pointer. --- src/Qtx/QtxDblSpinBox.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Qtx/QtxDblSpinBox.cxx b/src/Qtx/QtxDblSpinBox.cxx index 235218ff3..5b4903fc5 100755 --- a/src/Qtx/QtxDblSpinBox.cxx +++ b/src/Qtx/QtxDblSpinBox.cxx @@ -360,8 +360,9 @@ void QtxDblSpinBox::rangeChange() double max = QMAX( myMin, myMax ); myMin = min; myMax = max; - if ( validator()->inherits( "QDoubleValidator" ) ) - ((QDoubleValidator*)validator())->setRange( myMin, myMax ); + QDoubleValidator* v = ::qt_cast( validator() ); + if ( v ) + v->setRange( myMin, myMax ); if ( myMin == myMax ) QSpinBox::setRange( 0, 0 ); -- 2.39.2