pointless reset operations removed
This commit is contained in:
parent
70f4d28285
commit
31577cab9b
@ -28,21 +28,11 @@ void QskGradientStop::setPosition( qreal position ) noexcept
|
|||||||
m_position = position;
|
m_position = position;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QskGradientStop::resetPosition() noexcept
|
|
||||||
{
|
|
||||||
m_position = -1.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void QskGradientStop::setColor( const QColor& color ) noexcept
|
void QskGradientStop::setColor( const QColor& color ) noexcept
|
||||||
{
|
{
|
||||||
m_color = color;
|
m_color = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QskGradientStop::resetColor() noexcept
|
|
||||||
{
|
|
||||||
m_color = QColor();
|
|
||||||
}
|
|
||||||
|
|
||||||
void QskGradientStop::setRgb( QRgb rgb ) noexcept
|
void QskGradientStop::setRgb( QRgb rgb ) noexcept
|
||||||
{
|
{
|
||||||
m_color = QColor::fromRgba( rgb );
|
m_color = QColor::fromRgba( rgb );
|
||||||
|
@ -18,8 +18,8 @@ class QSK_EXPORT QskGradientStop
|
|||||||
{
|
{
|
||||||
Q_GADGET
|
Q_GADGET
|
||||||
|
|
||||||
Q_PROPERTY( qreal position READ position WRITE setPosition RESET resetPosition )
|
Q_PROPERTY( qreal position READ position WRITE setPosition )
|
||||||
Q_PROPERTY( QColor color READ color WRITE setColor RESET resetColor )
|
Q_PROPERTY( QColor color READ color WRITE setColor )
|
||||||
|
|
||||||
public:
|
public:
|
||||||
constexpr QskGradientStop() noexcept = default;
|
constexpr QskGradientStop() noexcept = default;
|
||||||
@ -38,11 +38,9 @@ class QSK_EXPORT QskGradientStop
|
|||||||
|
|
||||||
constexpr qreal position() const noexcept;
|
constexpr qreal position() const noexcept;
|
||||||
void setPosition( qreal position ) noexcept;
|
void setPosition( qreal position ) noexcept;
|
||||||
void resetPosition() noexcept;
|
|
||||||
|
|
||||||
constexpr const QColor& color() const noexcept;
|
constexpr const QColor& color() const noexcept;
|
||||||
void setColor( const QColor& ) noexcept;
|
void setColor( const QColor& ) noexcept;
|
||||||
void resetColor() noexcept;
|
|
||||||
|
|
||||||
void setRgb( QRgb ) noexcept;
|
void setRgb( QRgb ) noexcept;
|
||||||
QRgb rgb() const noexcept;
|
QRgb rgb() const noexcept;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user