]> git.sesse.net Git - kdenlive/blobdiff - src/choosecolorwidget.cpp
const'ify
[kdenlive] / src / choosecolorwidget.cpp
index ca4e28154866fee79924e479d88cc1f525a8bb1d..bbf5c29fd6a1c9d78ec81bbcbe57e4f5d7855e45 100644 (file)
@@ -89,7 +89,7 @@ static QString colorToString(QColor color, bool alpha)
     return colorStr;
 }
 
-ChooseColorWidget::ChooseColorWidget(QString text, QString color, bool alphaEnabled, QWidget *parent) :
+ChooseColorWidget::ChooseColorWidget(const QString &text, const QString &color, bool alphaEnabled, QWidget *parent) :
         QWidget(parent)
 {
     QHBoxLayout *layout = new QHBoxLayout(this);
@@ -121,7 +121,7 @@ ChooseColorWidget::ChooseColorWidget(QString text, QString color, bool alphaEnab
     connect(m_button, SIGNAL(changed(QColor)), this, SIGNAL(modified()));
 }
 
-QString ChooseColorWidget::getColor()
+QString ChooseColorWidget::getColor() const
 {
     bool alphaChannel = false;
 #if KDE_IS_VERSION(4,5,0)
@@ -130,7 +130,7 @@ QString ChooseColorWidget::getColor()
     return colorToString(m_button->color(), alphaChannel);
 }
 
-void ChooseColorWidget::setColor(QColor color)
+void ChooseColorWidget::setColor(const QColor& color)
 {
     m_button->setColor(color);
 }