Skip to content

Commit

Permalink
Use QColor instead of Qt::GlobalColor in item data
Browse files Browse the repository at this point in the history
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 6ebd9a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/gui/raster/qgsrasterhistogramwidget.cpp
Expand Up @@ -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
{
Expand All @@ -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 );
}
}
}
Expand Down Expand Up @@ -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 )
{
Expand Down

0 comments on commit 6ebd9a8

Please sign in to comment.