Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jan 14, 2019
1 parent 1572abf commit 9b75a82
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/gui/qgscompoundcolorwidget.cpp
Expand Up @@ -65,7 +65,7 @@ QgsCompoundColorWidget::QgsCompoundColorWidget( QWidget *parent, const QColor &c
QgsSettings settings;

mSchemeList->header()->hide();
mSchemeList->setColumnWidth( 0, Qgis::UI_SCALE_FACTOR * fontMetrics().width( 'X' ) * 6 );
mSchemeList->setColumnWidth( 0, static_cast< int >( Qgis::UI_SCALE_FACTOR * fontMetrics().width( 'X' ) * 6 ) );

//get schemes with ShowInColorDialog set
refreshSchemeComboBox();
Expand Down Expand Up @@ -613,7 +613,8 @@ void QgsCompoundColorWidget::mActionShowInButtons_toggled( bool state )

QScreen *QgsCompoundColorWidget::findScreenAt( QPoint pos )
{
for ( QScreen *screen : QGuiApplication::screens() )
const QList< QScreen * > screens = QGuiApplication::screens();
for ( QScreen *screen : screens )
{
if ( screen->geometry().contains( pos ) )
{
Expand Down Expand Up @@ -753,7 +754,7 @@ QColor QgsCompoundColorWidget::averageColor( const QImage &image ) const
//scan through image and sum rgb components
for ( int heightIndex = 0; heightIndex < image.height(); ++heightIndex )
{
QRgb *scanLine = ( QRgb * )image.constScanLine( heightIndex );
const QRgb *scanLine = reinterpret_cast< const QRgb * >( image.constScanLine( heightIndex ) );
for ( int widthIndex = 0; widthIndex < image.width(); ++widthIndex )
{
tmpRgb = scanLine[widthIndex];
Expand Down

0 comments on commit 9b75a82

Please sign in to comment.