Skip to content
Permalink
Browse files
Use QColor instead of Qt::GlobalColor in item data
The QVariant constructor that takes a Qt::GlobalColor is removed in Qt 5.
It is actually a kind of special case in Qt 4 anyway. Fix the uses of this
by constructing a QColor and using that instead.
  • Loading branch information
simonsonc committed Apr 2, 2014
1 parent d398560 commit 6ebd9a8b1043b14e6b6c756b519fbaec7ca29d27
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/gui/raster/qgsrasterhistogramwidget.cpp
@@ -353,7 +353,7 @@ void QgsRasterHistogramWidget::refreshHistogram()
if ( i == myGrayBand )
{
mHistoColors << Qt::darkGray;
cboHistoBand->setItemData( i - 1, Qt::darkGray, Qt::ForegroundRole );
cboHistoBand->setItemData( i - 1, QColor( Qt::darkGray ), Qt::ForegroundRole );
}
else
{
@@ -366,7 +366,7 @@ void QgsRasterHistogramWidget::refreshHistogram()
{
mHistoColors << Qt::black;
}
cboHistoBand->setItemData( i - 1, Qt::black, Qt::ForegroundRole );
cboHistoBand->setItemData( i - 1, QColor( Qt::black ), Qt::ForegroundRole );
}
}
}
@@ -399,7 +399,7 @@ void QgsRasterHistogramWidget::refreshHistogram()
{
myColor = Qt::black;
}
cboHistoBand->setItemData( i - 1, Qt::black, Qt::ForegroundRole );
cboHistoBand->setItemData( i - 1, QColor( Qt::black ), Qt::ForegroundRole );
}
if ( i == myRedBand || i == myGreenBand || i == myBlueBand )
{

0 comments on commit 6ebd9a8

Please sign in to comment.