Skip to content
Permalink
Browse files

replace old-style cast with static_cast

  • Loading branch information
3nids committed Sep 19, 2018
1 parent b2df392 commit 16e6cb64195c49094ea5ea9fe685eaade7cede07
Showing with 241 additions and 241 deletions.
  1. +1 −1 src/3d/terrain/qgsdemterraintilegeometry_p.cpp
  2. +45 −45 src/analysis/interpolation/DualEdgeTriangulation.cpp
  3. +2 −2 src/app/layout/qgslayoutattributetablewidget.cpp
  4. +2 −2 src/app/layout/qgslayoutpicturewidget.cpp
  5. +1 −1 src/app/qgslabelengineconfigdialog.cpp
  6. +3 −3 src/app/qgslabelinggui.cpp
  7. +5 −5 src/app/qgsmapsavedialog.cpp
  8. +2 −2 src/app/qgsmaptoolannotation.cpp
  9. +1 −1 src/app/qgsmaptoolrotatepointsymbols.cpp
  10. +3 −3 src/app/qgsoptions.cpp
  11. +1 −1 src/app/qgsrasterlayerproperties.cpp
  12. +1 −1 src/app/qgswelcomepageitemsmodel.cpp
  13. +1 −1 src/core/auth/qgsauthcertutils.cpp
  14. +1 −1 src/core/qgsdataitem.cpp
  15. +6 −6 src/core/qgsgml.cpp
  16. +5 −5 src/core/qgssnappingconfig.cpp
  17. +1 −1 src/core/raster/qgscolorrampshader.cpp
  18. +3 −3 src/core/raster/qgsmultibandcolorrenderer.cpp
  19. +1 −1 src/core/raster/qgspalettedrasterrenderer.cpp
  20. +8 −8 src/gui/auth/qgsauthauthoritieseditor.cpp
  21. +6 −6 src/gui/auth/qgsauthcertificateinfo.cpp
  22. +3 −3 src/gui/auth/qgsauthcerttrustpolicycombobox.cpp
  23. +1 −1 src/gui/auth/qgsauthconfigeditor.cpp
  24. +1 −1 src/gui/auth/qgsautheditorwidgets.cpp
  25. +4 −4 src/gui/auth/qgsauthidentitieseditor.cpp
  26. +4 −4 src/gui/auth/qgsauthserverseditor.cpp
  27. +14 −14 src/gui/auth/qgsauthsslconfigwidget.cpp
  28. +4 −4 src/gui/auth/qgsauthtrustedcasdialog.cpp
  29. +1 −1 src/gui/editorwidgets/qgsexternalresourceconfigdlg.cpp
  30. +1 −1 src/gui/qgsbrowserdockwidget.cpp
  31. +1 −1 src/gui/qgscolorswatchgrid.cpp
  32. +6 −6 src/gui/qgscolorwidgets.cpp
  33. +3 −3 src/gui/qgscompoundcolorwidget.cpp
  34. +2 −2 src/gui/qgsmaptoolzoom.cpp
  35. +27 −27 src/gui/qgstextformatwidget.cpp
  36. +2 −2 src/gui/raster/qgshillshaderendererwidget.cpp
  37. +3 −3 src/gui/raster/qgsrasterhistogramwidget.cpp
  38. +1 −1 src/gui/raster/qgsrendererrasterpropertieswidget.cpp
  39. +2 −2 src/gui/symbology/qgsbrushstylecombobox.cpp
  40. +1 −1 src/gui/symbology/qgscptcitycolorrampdialog.cpp
  41. +1 −1 src/plugins/compass/qgscompassplugingui.cpp
  42. +4 −4 src/plugins/evis/eventbrowser/evisgenericeventbrowsergui.cpp
  43. +10 −10 src/plugins/evis/eventbrowser/evisimagedisplaywidget.cpp
  44. +6 −6 src/plugins/georeferencer/qgsgeorefplugingui.cpp
  45. +1 −1 src/plugins/georeferencer/qgsresidualplotitem.cpp
  46. +7 −7 src/plugins/georeferencer/qgstransformsettingsdialog.cpp
  47. +1 −1 src/plugins/grass/qgsgrassmoduleparam.cpp
  48. +2 −2 src/plugins/grass/qgsgrassnewmapset.cpp
  49. +3 −3 src/plugins/grass/qtermwidget/ColorScheme.cpp
  50. +2 −2 src/plugins/grass/qtermwidget/History.cpp
  51. +1 −1 src/plugins/grass/qtermwidget/TerminalDisplay.cpp
  52. +1 −1 src/plugins/grass/qtermwidget/Vt102Emulation.cpp
  53. +2 −2 src/plugins/grass/qtermwidget/kprocess.cpp
  54. +2 −2 src/plugins/grass/qtermwidget/kptydevice.cpp
  55. +7 −7 src/providers/gdal/qgsgdalprovider.cpp
  56. +2 −2 src/providers/grass/qgis.v.in.cpp
  57. +1 −1 src/providers/grass/qgsgrassdatafile.cpp
  58. +1 −1 src/providers/grass/qgsgrassgislib.cpp
  59. +2 −2 src/providers/grass/qgsgrassvectormaplayer.cpp
  60. +2 −2 src/providers/ogr/qgsogrprovider.cpp
  61. +1 −1 src/providers/oracle/ocispatial/qsql_ocispatial.cpp
  62. +1 −1 src/providers/wfs/qgswfsutils.cpp
  63. +1 −1 src/server/services/wms/qgsmediancut.cpp
@@ -30,7 +30,7 @@ using namespace Qt3DRender;
static QByteArray createPlaneVertexData( int res, float skirtHeight, const QByteArray &heights )
{
Q_ASSERT( res >= 2 );
Q_ASSERT( heights.count() == res * res * ( int )sizeof( float ) );
Q_ASSERT( heights.count() == res * res * static_cast<int>( sizeof( float ) ) );

const float *zData = ( const float * ) heights.constData();
const float *zBits = zData;
@@ -123,9 +123,9 @@ int DualEdgeTriangulation::addPoint( const QgsPoint &p )
if ( mPointVector.count() == 1 )//insert the first point into the triangulation
{
unsigned int zedge = insertEdge( -10, -10, -1, false, false );//edge pointing from p to the virtual point
unsigned int fedge = insertEdge( ( int )zedge, ( int )zedge, 0, false, false ); //edge pointing from the virtual point to p
( mHalfEdge.at( zedge ) )->setDual( ( int )fedge );
( mHalfEdge.at( zedge ) )->setNext( ( int )fedge );
unsigned int fedge = insertEdge( static_cast<int>( zedge ), static_cast<int>( zedge ), 0, false, false ); //edge pointing from the virtual point to p
( mHalfEdge.at( zedge ) )->setDual( static_cast<int>( fedge ) );
( mHalfEdge.at( zedge ) )->setNext( static_cast<int>( fedge ) );

}

@@ -142,15 +142,15 @@ int DualEdgeTriangulation::addPoint( const QgsPoint &p )
}

unsigned int sedge = insertEdge( -10, -10, 1, false, false );//edge pointing from point 0 to point 1
unsigned int tedge = insertEdge( ( int )sedge, 0, 0, false, false ); //edge pointing from point 1 to point 0
unsigned int tedge = insertEdge( static_cast<int>( sedge ), 0, 0, false, false ); //edge pointing from point 1 to point 0
unsigned int foedge = insertEdge( -10, 4, 1, false, false );//edge pointing from the virtual point to point 1
unsigned int fiedge = insertEdge( ( int )foedge, 1, -1, false, false ); //edge pointing from point 2 to the virtual point
mHalfEdge.at( sedge )->setDual( ( int )tedge );
mHalfEdge.at( sedge )->setNext( ( int )fiedge );
mHalfEdge.at( foedge )->setDual( ( int )fiedge );
mHalfEdge.at( foedge )->setNext( ( int )tedge );
mHalfEdge.at( 0 )->setNext( ( int )foedge );
mHalfEdge.at( 1 )->setNext( ( int )sedge );
unsigned int fiedge = insertEdge( static_cast<int>( foedge ), 1, -1, false, false ); //edge pointing from point 2 to the virtual point
mHalfEdge.at( sedge )->setDual( static_cast<int>( tedge ) );
mHalfEdge.at( sedge )->setNext( static_cast<int>( fiedge ) );
mHalfEdge.at( foedge )->setDual( static_cast<int>( fiedge ) );
mHalfEdge.at( foedge )->setNext( static_cast<int>( tedge ) );
mHalfEdge.at( 0 )->setNext( static_cast<int>( foedge ) );
mHalfEdge.at( 1 )->setNext( static_cast<int>( sedge ) );

mEdgeInside = 3;
}
@@ -163,38 +163,38 @@ int DualEdgeTriangulation::addPoint( const QgsPoint &p )
{
//insert six new edges
unsigned int edgea = insertEdge( -10, -10, 2, false, false );//edge pointing from point1 to point2
unsigned int edgeb = insertEdge( ( int )edgea, 5, 1, false, false ); //edge pointing from point2 to point1
unsigned int edgec = insertEdge( -10, ( int )edgeb, 2, false, false );//edge pointing from the virtual point to p2
unsigned int edgeb = insertEdge( static_cast<int>( edgea ), 5, 1, false, false ); //edge pointing from point2 to point1
unsigned int edgec = insertEdge( -10, static_cast<int>( edgeb ), 2, false, false ); //edge pointing from the virtual point to p2
unsigned int edged = insertEdge( -10, 2, 0, false, false );//edge pointing from point2 to point0
unsigned int edgee = insertEdge( ( int )edged, -10, 2, false, false ); //edge pointing from point0 to point2
unsigned int edgef = insertEdge( ( int )edgec, 1, -1, false, false ); //edge pointing from point2 to the virtual point
mHalfEdge.at( edgea )->setDual( ( int )edgeb );
mHalfEdge.at( edgea )->setNext( ( int )edged );
mHalfEdge.at( edgec )->setDual( ( int )edgef );
mHalfEdge.at( edged )->setDual( ( int )edgee );
mHalfEdge.at( edgee )->setNext( ( int )edgef );
mHalfEdge.at( 5 )->setNext( ( int )edgec );
mHalfEdge.at( 1 )->setNext( ( int )edgee );
mHalfEdge.at( 2 )->setNext( ( int )edgea );
unsigned int edgee = insertEdge( static_cast<int>( edged ), -10, 2, false, false ); //edge pointing from point0 to point2
unsigned int edgef = insertEdge( static_cast<int>( edgec ), 1, -1, false, false ); //edge pointing from point2 to the virtual point
mHalfEdge.at( edgea )->setDual( static_cast<int>( edgeb ) );
mHalfEdge.at( edgea )->setNext( static_cast<int>( edged ) );
mHalfEdge.at( edgec )->setDual( static_cast<int>( edgef ) );
mHalfEdge.at( edged )->setDual( static_cast<int>( edgee ) );
mHalfEdge.at( edgee )->setNext( static_cast<int>( edgef ) );
mHalfEdge.at( 5 )->setNext( static_cast<int>( edgec ) );
mHalfEdge.at( 1 )->setNext( static_cast<int>( edgee ) );
mHalfEdge.at( 2 )->setNext( static_cast<int>( edgea ) );
}

else if ( number > leftOfTresh )//p is on the right side
{
//insert six new edges
unsigned int edgea = insertEdge( -10, -10, 2, false, false );//edge pointing from p0 to p2
unsigned int edgeb = insertEdge( ( int )edgea, 0, 0, false, false ); //edge pointing from p2 to p0
unsigned int edgec = insertEdge( -10, ( int )edgeb, 2, false, false );//edge pointing from the virtual point to p2
unsigned int edgeb = insertEdge( static_cast<int>( edgea ), 0, 0, false, false ); //edge pointing from p2 to p0
unsigned int edgec = insertEdge( -10, static_cast<int>( edgeb ), 2, false, false ); //edge pointing from the virtual point to p2
unsigned int edged = insertEdge( -10, 3, 1, false, false );//edge pointing from p2 to p1
unsigned int edgee = insertEdge( ( int )edged, -10, 2, false, false ); //edge pointing from p1 to p2
unsigned int edgef = insertEdge( ( int )edgec, 4, -1, false, false ); //edge pointing from p2 to the virtual point
mHalfEdge.at( edgea )->setDual( ( int )edgeb );
mHalfEdge.at( edgea )->setNext( ( int )edged );
mHalfEdge.at( edgec )->setDual( ( int )edgef );
mHalfEdge.at( edged )->setDual( ( int )edgee );
mHalfEdge.at( edgee )->setNext( ( int )edgef );
mHalfEdge.at( 0 )->setNext( ( int )edgec );
mHalfEdge.at( 4 )->setNext( ( int )edgee );
mHalfEdge.at( 3 )->setNext( ( int )edgea );
unsigned int edgee = insertEdge( static_cast<int>( edged ), -10, 2, false, false ); //edge pointing from p1 to p2
unsigned int edgef = insertEdge( static_cast<int>( edgec ), 4, -1, false, false ); //edge pointing from p2 to the virtual point
mHalfEdge.at( edgea )->setDual( static_cast<int>( edgeb ) );
mHalfEdge.at( edgea )->setNext( static_cast<int>( edged ) );
mHalfEdge.at( edgec )->setDual( static_cast<int>( edgef ) );
mHalfEdge.at( edged )->setDual( static_cast<int>( edgee ) );
mHalfEdge.at( edgee )->setNext( static_cast<int>( edgef ) );
mHalfEdge.at( 0 )->setNext( static_cast<int>( edgec ) );
mHalfEdge.at( 4 )->setNext( static_cast<int>( edgee ) );
mHalfEdge.at( 3 )->setNext( static_cast<int>( edgea ) );
}

else//p is in a line with p0 and p1
@@ -288,20 +288,20 @@ int DualEdgeTriangulation::addPoint( const QgsPoint &p )

//insert 6 new HalfEdges for the connections to the vertices of the triangle
unsigned int edge1 = insertEdge( -10, nextnumber, mHalfEdge[number]->getPoint(), false, false );
unsigned int edge2 = insertEdge( ( int )edge1, -10, mPointVector.count() - 1, false, false );
unsigned int edge2 = insertEdge( static_cast<int>( edge1 ), -10, mPointVector.count() - 1, false, false );
unsigned int edge3 = insertEdge( -10, nextnextnumber, mHalfEdge[nextnumber]->getPoint(), false, false );
unsigned int edge4 = insertEdge( ( int )edge3, ( int )edge1, mPointVector.count() - 1, false, false );
unsigned int edge4 = insertEdge( static_cast<int>( edge3 ), static_cast<int>( edge1 ), mPointVector.count() - 1, false, false );
unsigned int edge5 = insertEdge( -10, number, mHalfEdge[nextnextnumber]->getPoint(), false, false );
unsigned int edge6 = insertEdge( ( int )edge5, ( int )edge3, mPointVector.count() - 1, false, false );
unsigned int edge6 = insertEdge( static_cast<int>( edge5 ), static_cast<int>( edge3 ), mPointVector.count() - 1, false, false );


mHalfEdge.at( edge1 )->setDual( ( int )edge2 );
mHalfEdge.at( edge2 )->setNext( ( int )edge5 );
mHalfEdge.at( edge3 )->setDual( ( int )edge4 );
mHalfEdge.at( edge5 )->setDual( ( int )edge6 );
mHalfEdge.at( number )->setNext( ( int )edge2 );
mHalfEdge.at( nextnumber )->setNext( ( int )edge4 );
mHalfEdge.at( nextnextnumber )->setNext( ( int )edge6 );
mHalfEdge.at( edge1 )->setDual( static_cast<int>( edge2 ) );
mHalfEdge.at( edge2 )->setNext( static_cast<int>( edge5 ) );
mHalfEdge.at( edge3 )->setDual( static_cast<int>( edge4 ) );
mHalfEdge.at( edge5 )->setDual( static_cast<int>( edge6 ) );
mHalfEdge.at( number )->setNext( static_cast<int>( edge2 ) );
mHalfEdge.at( nextnumber )->setNext( static_cast<int>( edge4 ) );
mHalfEdge.at( nextnextnumber )->setNext( static_cast<int>( edge6 ) );

//check, if there are swaps necessary
checkSwap( number, 0 );
@@ -466,8 +466,8 @@ void QgsLayoutAttributeTableWidget::updateGuiElements()
mFeatureFilterEdit->setEnabled( mTable->filterFeatures() );
mFeatureFilterButton->setEnabled( mTable->filterFeatures() );

mHeaderHAlignmentComboBox->setCurrentIndex( ( int )mTable->headerHAlignment() );
mHeaderModeComboBox->setCurrentIndex( ( int )mTable->headerMode() );
mHeaderHAlignmentComboBox->setCurrentIndex( static_cast<int>( mTable->headerHAlignment() ) );
mHeaderModeComboBox->setCurrentIndex( static_cast<int>( mTable->headerMode() ) );

mEmptyModeComboBox->setCurrentIndex( mEmptyModeComboBox->findData( mTable->emptyTableBehavior() ) );
mEmptyMessageLineEdit->setText( mTable->emptyTableMessage() );
@@ -407,12 +407,12 @@ void QgsLayoutPictureWidget::setGuiElementValues()
mNorthTypeComboBox->setCurrentIndex( mNorthTypeComboBox->findData( mPicture->northMode() ) );
mPictureRotationOffsetSpinBox->setValue( mPicture->northOffset() );

mResizeModeComboBox->setCurrentIndex( ( int )mPicture->resizeMode() );
mResizeModeComboBox->setCurrentIndex( static_cast<int>( mPicture->resizeMode() ) );
//disable picture rotation for non-zoom modes
mRotationGroupBox->setEnabled( mPicture->resizeMode() == QgsLayoutItemPicture::Zoom ||
mPicture->resizeMode() == QgsLayoutItemPicture::ZoomResizeFrame );

mAnchorPointComboBox->setCurrentIndex( ( int )mPicture->pictureAnchor() );
mAnchorPointComboBox->setCurrentIndex( static_cast<int>( mPicture->pictureAnchor() ) );
//disable anchor point control for certain zoom modes
if ( mPicture->resizeMode() == QgsLayoutItemPicture::Zoom ||
mPicture->resizeMode() == QgsLayoutItemPicture::Clip )
@@ -73,7 +73,7 @@ void QgsLabelEngineConfigDialog::onOK()
void QgsLabelEngineConfigDialog::setDefaults()
{
pal::Pal p;
cboSearchMethod->setCurrentIndex( ( int )p.getSearch() );
cboSearchMethod->setCurrentIndex( static_cast<int>( p.getSearch() ) );
spinCandPoint->setValue( p.getPointP() );
spinCandLine->setValue( p.getLineP() );
spinCandPolygon->setValue( p.getPolyP() );
@@ -170,7 +170,7 @@ void QgsLabelingGui::setLayer( QgsMapLayer *mapLayer )
mLineDistanceUnitWidget->setUnit( lyr.distUnits );
mLineDistanceUnitWidget->setMapUnitScale( lyr.distMapUnitScale );
mOffsetTypeComboBox->setCurrentIndex( mOffsetTypeComboBox->findData( lyr.offsetType ) );
mQuadrantBtnGrp->button( ( int )lyr.quadOffset )->setChecked( true );
mQuadrantBtnGrp->button( static_cast<int>( lyr.quadOffset ) )->setChecked( true );
mPointOffsetXSpinBox->setValue( lyr.xOffset );
mPointOffsetYSpinBox->setValue( lyr.yOffset );
mPointOffsetUnitWidget->setUnit( lyr.offsetUnits );
@@ -238,8 +238,8 @@ void QgsLabelingGui::setLayer( QgsMapLayer *mapLayer )
mDirectSymbRightLineEdit->setText( lyr.rightDirectionSymbol );
mDirectSymbRevChkBx->setChecked( lyr.reverseDirectionSymbol );

mDirectSymbBtnGrp->button( ( int )lyr.placeDirectionSymbol )->setChecked( true );
mUpsidedownBtnGrp->button( ( int )lyr.upsidedownLabels )->setChecked( true );
mDirectSymbBtnGrp->button( static_cast<int>( lyr.placeDirectionSymbol ) )->setChecked( true );
mUpsidedownBtnGrp->button( static_cast<int>( lyr.upsidedownLabels ) )->setChecked( true );

// curved label max character angles
mMaxCharAngleInDSpinBox->setValue( lyr.maxCurvedCharAngleIn );
@@ -124,15 +124,15 @@ QgsMapSaveDialog::QgsMapSaveDialog( QWidget *parent, QgsMapCanvas *mapCanvas, co

void QgsMapSaveDialog::updateDpi( int dpi )
{
mSize *= ( double )dpi / mDpi;
mSize *= static_cast<double>( dpi ) / mDpi;
mDpi = dpi;

updateOutputSize();
}

void QgsMapSaveDialog::updateOutputWidth( int width )
{
double scale = ( double )width / mSize.width();
double scale = static_cast<double>( width ) / mSize.width();
double adjustment = ( ( mExtent.width() * scale ) - mExtent.width() ) / 2;

mSize.setWidth( width );
@@ -143,7 +143,7 @@ void QgsMapSaveDialog::updateOutputWidth( int width )
if ( mLockAspectRatio->locked() )
{
int height = width * mExtentGroupBox->ratio().height() / mExtentGroupBox->ratio().width();
double scale = ( double )height / mSize.height();
double scale = static_cast<double>( height ) / mSize.height();
double adjustment = ( ( mExtent.height() * scale ) - mExtent.height() ) / 2;

whileBlocking( mOutputHeightSpinBox )->setValue( height );
@@ -158,7 +158,7 @@ void QgsMapSaveDialog::updateOutputWidth( int width )

void QgsMapSaveDialog::updateOutputHeight( int height )
{
double scale = ( double )height / mSize.height();
double scale = static_cast<double>( height ) / mSize.height();
double adjustment = ( ( mExtent.height() * scale ) - mExtent.height() ) / 2;

mSize.setHeight( height );
@@ -169,7 +169,7 @@ void QgsMapSaveDialog::updateOutputHeight( int height )
if ( mLockAspectRatio->locked() )
{
int width = height * mExtentGroupBox->ratio().width() / mExtentGroupBox->ratio().height();
double scale = ( double )width / mSize.width();
double scale = static_cast<double>( width ) / mSize.width();
double adjustment = ( ( mExtent.width() * scale ) - mExtent.width() ) / 2;

whileBlocking( mOutputWidthSpinBox )->setValue( width );
@@ -226,14 +226,14 @@ void QgsMapToolAnnotation::canvasMoveEvent( QgsMapMouseEvent *e )
mCurrentMoveAction == QgsMapCanvasAnnotationItem::ResizeFrameLeftUp )
{
xmin += e->pos().x() - mLastMousePosition.x();
relPosX = ( relPosX * mCanvas->width() + e->pos().x() - mLastMousePosition.x() ) / ( double )mCanvas->width();
relPosX = ( relPosX * mCanvas->width() + e->pos().x() - mLastMousePosition.x() ) / static_cast<double>( mCanvas->width() );
}
if ( mCurrentMoveAction == QgsMapCanvasAnnotationItem::ResizeFrameUp ||
mCurrentMoveAction == QgsMapCanvasAnnotationItem::ResizeFrameLeftUp ||
mCurrentMoveAction == QgsMapCanvasAnnotationItem::ResizeFrameRightUp )
{
ymin += e->pos().y() - mLastMousePosition.y();
relPosY = ( relPosY * mCanvas->height() + e->pos().y() - mLastMousePosition.y() ) / ( double )mCanvas->height();
relPosY = ( relPosY * mCanvas->height() + e->pos().y() - mLastMousePosition.y() ) / static_cast<double>( mCanvas->height() );
}
if ( mCurrentMoveAction == QgsMapCanvasAnnotationItem::ResizeFrameDown ||
mCurrentMoveAction == QgsMapCanvasAnnotationItem::ResizeFrameLeftDown ||
@@ -171,7 +171,7 @@ void QgsMapToolRotatePointSymbols::canvasReleaseEvent( QgsMapMouseEvent *e )
}
else
{
rotation = ( int )mCurrentRotationFeature;
rotation = static_cast<int>( mCurrentRotationFeature );
}

QSet<int>::const_iterator it = mCurrentRotationAttributes.constBegin();
@@ -619,9 +619,9 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
doubleSpinBoxMagnifierDefault->setValue( magnifierVal );

// Default local simplification algorithm
mSimplifyAlgorithmComboBox->addItem( tr( "Distance" ), ( int )QgsVectorSimplifyMethod::Distance );
mSimplifyAlgorithmComboBox->addItem( tr( "SnapToGrid" ), ( int )QgsVectorSimplifyMethod::SnapToGrid );
mSimplifyAlgorithmComboBox->addItem( tr( "Visvalingam" ), ( int )QgsVectorSimplifyMethod::Visvalingam );
mSimplifyAlgorithmComboBox->addItem( tr( "Distance" ), static_cast<int>( QgsVectorSimplifyMethod::Distance ) );
mSimplifyAlgorithmComboBox->addItem( tr( "SnapToGrid" ), static_cast<int>( QgsVectorSimplifyMethod::SnapToGrid ) );
mSimplifyAlgorithmComboBox->addItem( tr( "Visvalingam" ), static_cast<int>( QgsVectorSimplifyMethod::Visvalingam ) );
mSimplifyAlgorithmComboBox->setCurrentIndex( mSimplifyAlgorithmComboBox->findData( mSettings->enumValue( QStringLiteral( "/qgis/simplifyAlgorithm" ), QgsVectorSimplifyMethod::NoSimplification ) ) );

// Slightly awkard here at the settings value is true to use QImage,
@@ -341,7 +341,7 @@ QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer *lyr, QgsMapCanv
comboGrayscale->setCurrentIndex( ( int ) hueSaturationFilter->grayscaleMode() );

// Set initial state of saturation controls based on grayscale mode choice
toggleSaturationControls( ( int )hueSaturationFilter->grayscaleMode() );
toggleSaturationControls( static_cast<int>( hueSaturationFilter->grayscaleMode() ) );

// Set initial state of colorize controls
mColorizeCheck->setChecked( hueSaturationFilter->colorizeOn() );
@@ -122,7 +122,7 @@ QSize QgsWelcomePageItemDelegate::sizeHint( const QStyleOptionViewItem &option,
index.data( QgsWelcomePageItemsModel::CrsRole ).toString() ) );
doc.setTextWidth( width - ( !icon.isNull() ? icon.width() + 35 : 35 ) );

return QSize( width, std::max( ( double ) doc.size().height() + 10, ( double )icon.height() ) + 20 );
return QSize( width, std::max( ( double ) doc.size().height() + 10, static_cast<double>( icon.height() ) ) + 20 );
}

QgsWelcomePageItemsModel::QgsWelcomePageItemsModel( QObject *parent )
@@ -991,7 +991,7 @@ QList<QgsAuthCertUtils::CertUsageType> QgsAuthCertUtils::certificateUsageTypes(
// always seems to return QCA::ErrorInvalidPurpose (enum #5)
QCA::Validity v_tlsclient;
v_tlsclient = qcacert.validate( trustedCAs, untrustedCAs, QCA::UsageTLSClient, QCA::ValidateAll );
//QgsDebugMsg( QString( "QCA::UsageTLSClient validity: %1" ).arg( ( int )v_tlsclient ) );
//QgsDebugMsg( QString( "QCA::UsageTLSClient validity: %1" ).arg( static_cast<int>(v_tlsclient) ) );
if ( v_tlsclient == QCA::ValidityGood )
{
usages << QgsAuthCertUtils::TlsClientUsage;
@@ -704,7 +704,7 @@ QgsDataCollectionItem::~QgsDataCollectionItem()
#if 0
Q_FOREACH ( QgsDataItem *i, mChildren )
{
QgsDebugMsgLevel( QString( "delete child = 0x%0" ).arg( ( qlonglong )i, 8, 16, QLatin1Char( '0' ) ), 2 );
QgsDebugMsgLevel( QString( "delete child = 0x%0" ).arg( static_cast<qlonglong>( i ), 8, 16, QLatin1Char( '0' ) ), 2 );
delete i;
}
#endif

0 comments on commit 16e6cb6

Please sign in to comment.
You can’t perform that action at this time.