bad hash value calculation of QskBoxNode fixed
This commit is contained in:
parent
b03ee5b11d
commit
1866ecb2f3
@ -39,14 +39,16 @@ static inline uint qskColorsHash( const QskBoxOptions& options )
|
||||
const auto& colors = options.colors;
|
||||
|
||||
QRgb rgb[8];
|
||||
for ( int i = 0; i < 4; i++ )
|
||||
{
|
||||
const QColor c1 = colors.borderColor( static_cast< Qt::Edge >( i ) );
|
||||
rgb[i] = c1.isValid() ? c1.rgba() : 0;
|
||||
|
||||
const QColor c2 = colors.fillColor( static_cast< Qt::Corner >( i ) );
|
||||
rgb[2*i] = c2.isValid() ? c2.rgba() : 0;
|
||||
}
|
||||
rgb[0] = colors.borderColor( Qt::TopEdge ).rgba();
|
||||
rgb[1] = colors.borderColor( Qt::LeftEdge ).rgba();
|
||||
rgb[2] = colors.borderColor( Qt::RightEdge ).rgba();
|
||||
rgb[3] = colors.borderColor( Qt::BottomEdge ).rgba();
|
||||
|
||||
rgb[4] = colors.fillColor( Qt::TopLeftCorner ).rgba();
|
||||
rgb[5] = colors.fillColor( Qt::TopRightCorner ).rgba();
|
||||
rgb[6] = colors.fillColor( Qt::BottomLeftCorner ).rgba();
|
||||
rgb[7] = colors.fillColor( Qt::BottomRightCorner ).rgba();
|
||||
|
||||
return qHashBits( rgb, sizeof( rgb ), 17000 );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user