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.
This commit is contained in:
Carl Simonson 2014-04-01 20:50:44 -05:00
parent d3985601b3
commit 6ebd9a8b10

View File

@ -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 )
{