Skip to content

Commit

Permalink
Replace dynamic_cast with qobject_cast
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Mar 1, 2018
1 parent 8873464 commit 752dc7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/editorwidgets/qgsrangewidgetwrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ void QgsRangeWidgetWrapper::initWidget( QWidget *editor )

mDoubleSpinBox->setDecimals( precisionval );

QgsDoubleSpinBox *qgsWidget = dynamic_cast<QgsDoubleSpinBox *>( mDoubleSpinBox );
QgsDoubleSpinBox *qgsWidget = qobject_cast<QgsDoubleSpinBox *>( mDoubleSpinBox );


if ( qgsWidget )
Expand Down Expand Up @@ -132,7 +132,7 @@ void QgsRangeWidgetWrapper::initWidget( QWidget *editor )
}
else if ( mIntSpinBox )
{
QgsSpinBox *qgsWidget = dynamic_cast<QgsSpinBox *>( mIntSpinBox );
QgsSpinBox *qgsWidget = qobject_cast<QgsSpinBox *>( mIntSpinBox );
if ( qgsWidget )
qgsWidget->setShowClearButton( allowNull );
if ( allowNull )
Expand Down

0 comments on commit 752dc7d

Please sign in to comment.