[3rdparty] Constness for waitingspinner

The accessors can be (should be!) const.
This commit is contained in:
Adriaan de Groot 2022-04-15 22:01:43 +02:00
parent 171a597355
commit 15dc47555a
2 changed files with 25 additions and 25 deletions

View File

@ -175,52 +175,52 @@ void WaitingSpinnerWidget::setInnerRadius(int radius) {
updateSize(); updateSize();
} }
void WaitingSpinnerWidget::setText(QString text) { void WaitingSpinnerWidget::setText(const QString& text) {
_text = text; _text = text;
updateSize(); updateSize();
} }
QColor WaitingSpinnerWidget::color() { QColor WaitingSpinnerWidget::color() const {
return _color; return _color;
} }
QColor WaitingSpinnerWidget::textColor() { QColor WaitingSpinnerWidget::textColor() const {
return _textColor; return _textColor;
} }
QString WaitingSpinnerWidget::text() { QString WaitingSpinnerWidget::text() const {
return _text; return _text;
} }
qreal WaitingSpinnerWidget::roundness() { qreal WaitingSpinnerWidget::roundness() const {
return _roundness; return _roundness;
} }
qreal WaitingSpinnerWidget::minimumTrailOpacity() { qreal WaitingSpinnerWidget::minimumTrailOpacity() const {
return _minimumTrailOpacity; return _minimumTrailOpacity;
} }
qreal WaitingSpinnerWidget::trailFadePercentage() { qreal WaitingSpinnerWidget::trailFadePercentage() const {
return _trailFadePercentage; return _trailFadePercentage;
} }
qreal WaitingSpinnerWidget::revolutionsPersSecond() { qreal WaitingSpinnerWidget::revolutionsPersSecond() const {
return _revolutionsPerSecond; return _revolutionsPerSecond;
} }
int WaitingSpinnerWidget::numberOfLines() { int WaitingSpinnerWidget::numberOfLines() const {
return _numberOfLines; return _numberOfLines;
} }
int WaitingSpinnerWidget::lineLength() { int WaitingSpinnerWidget::lineLength() const {
return _lineLength; return _lineLength;
} }
int WaitingSpinnerWidget::lineWidth() { int WaitingSpinnerWidget::lineWidth() const {
return _lineWidth; return _lineWidth;
} }
int WaitingSpinnerWidget::innerRadius() { int WaitingSpinnerWidget::innerRadius() const {
return _innerRadius; return _innerRadius;
} }

View File

@ -69,19 +69,19 @@ public:
void setLineLength(int length); void setLineLength(int length);
void setLineWidth(int width); void setLineWidth(int width);
void setInnerRadius(int radius); void setInnerRadius(int radius);
void setText(QString text); void setText(const QString& text);
QColor color(); QColor color() const;
QColor textColor(); QColor textColor() const;
QString text(); QString text() const;
qreal roundness(); qreal roundness() const;
qreal minimumTrailOpacity(); qreal minimumTrailOpacity() const;
qreal trailFadePercentage(); qreal trailFadePercentage() const;
qreal revolutionsPersSecond(); qreal revolutionsPersSecond() const;
int numberOfLines(); int numberOfLines() const;
int lineLength(); int lineLength() const;
int lineWidth(); int lineWidth() const;
int innerRadius(); int innerRadius() const;
bool isSpinning() const; bool isSpinning() const;