mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
More old qt compatibility
This commit is contained in:
parent
1b26ee1382
commit
09fb955ae6
@ -93,7 +93,12 @@ void QgsColorUtils::writeXml( const QColor &color, const QString &identifier, QD
|
||||
qreal m = 1;
|
||||
qreal y = 1;
|
||||
qreal k = 1;
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||
color.getCmykF( &c, &y, &m, &k );
|
||||
#else
|
||||
QColor nonconstColor = color;
|
||||
nonconstColor.getCmykF( &c, &y, &m, &k );
|
||||
#endif
|
||||
colorElement.setAttribute( QStringLiteral( "c" ), qgsDoubleToString( c ) );
|
||||
colorElement.setAttribute( QStringLiteral( "m" ), qgsDoubleToString( m ) );
|
||||
colorElement.setAttribute( QStringLiteral( "y" ), qgsDoubleToString( y ) );
|
||||
@ -225,7 +230,12 @@ QString QgsColorUtils::colorToString( const QColor &color )
|
||||
qreal y = 1;
|
||||
qreal k = 1;
|
||||
qreal alpha = 1;
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||
color.getCmykF( &c, &y, &m, &k, &alpha );
|
||||
#else
|
||||
QColor nonconstColor = color;
|
||||
nonconstColor.getCmykF( &c, &y, &m, &k, &alpha );
|
||||
#endif
|
||||
return compatString + QStringLiteral( "cmyk:%1,%2,%3,%4,%5" ).arg( qgsDoubleToString( c ),
|
||||
qgsDoubleToString( m ),
|
||||
qgsDoubleToString( y ),
|
||||
|
Loading…
x
Reference in New Issue
Block a user