Skip to content
Permalink
Browse files

Fix warnings

  • Loading branch information
nyalldawson committed Jan 13, 2019
1 parent 1572abf commit 9b75a82aeb4f7498f9e90985d732a1e86be32a4a
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/gui/qgscompoundcolorwidget.cpp
@@ -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();
@@ -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 ) )
{
@@ -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];

0 comments on commit 9b75a82

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