mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
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:
parent
d3985601b3
commit
6ebd9a8b10
@ -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 )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user