@@ -136,7 +136,7 @@ QgsUnitSelectionWidget::QgsUnitSelectionWidget( QWidget *parent )
136
136
setFocusProxy ( mUnitCombo );
137
137
138
138
connect ( mUnitCombo , static_cast < void ( QComboBox::* )( int ) > ( &QComboBox::currentIndexChanged ), this , &QgsUnitSelectionWidget::toggleUnitRangeButton );
139
- connect ( mMapScaleButton , &QPushButton ::clicked, this , &QgsUnitSelectionWidget::showDialog );
139
+ connect ( mMapScaleButton , &QToolButton ::clicked, this , &QgsUnitSelectionWidget::showDialog );
140
140
connect ( mUnitCombo , static_cast < void ( QComboBox::* )( int ) > ( &QComboBox::currentIndexChanged ), this , &QgsUnitSelectionWidget::changed );
141
141
}
142
142
@@ -196,7 +196,7 @@ QgsUnitTypes::RenderUnit QgsUnitSelectionWidget::unit() const
196
196
QVariant currentData = mUnitCombo ->currentData ();
197
197
if ( currentData.isValid () )
198
198
{
199
- return ( QgsUnitTypes::RenderUnit ) currentData.toInt ();
199
+ return static_cast < QgsUnitTypes::RenderUnit >( currentData.toInt () );
200
200
}
201
201
// unknown
202
202
return QgsUnitTypes::RenderUnknownUnit;
@@ -211,7 +211,7 @@ void QgsUnitSelectionWidget::setUnit( int unitIndex )
211
211
212
212
void QgsUnitSelectionWidget::setUnit ( QgsUnitTypes::RenderUnit unit )
213
213
{
214
- int idx = mUnitCombo ->findData ( QVariant ( ( int ) unit ) );
214
+ int idx = mUnitCombo ->findData ( QVariant ( static_cast < int >( unit ) ) );
215
215
mUnitCombo ->setCurrentIndex ( idx == -1 ? 0 : idx );
216
216
}
217
217
0 commit comments