Commit f30b2a16 authored by Laurent Montel's avatar Laurent Montel 😁

Consti'fy

parent 0e214d96
......@@ -26,7 +26,7 @@
#include <QPushButton>
#include <QVBoxLayout>
ScoreDlg::ScoreDlg( QWidget *parent, const QString& title, QList<Player *> players )
ScoreDlg::ScoreDlg( QWidget *parent, const QString& title, const QList<Player *> &players )
: QDialog(parent)
{
setObjectName( QLatin1String( "ScoreDlg" ) );
......
......@@ -34,7 +34,7 @@ class ScoreDlg : public QDialog
public:
ScoreDlg( QWidget *parent, const QString& title,
QList<Player *> players );
const QList<Player *> &players );
~ScoreDlg();
private:
......
......@@ -40,7 +40,7 @@ public:
// Getters and Setters for some fundamental properties.
QString name() const { return m_name; }
void setName(QString name) { m_name = name; }
void setName(const QString &name) { m_name = name; }
QString coloredName() const;
QColor& color() { return m_color; }
......
......@@ -42,7 +42,7 @@ StandingsWidget::StandingsWidget(QWidget *parent) :
* @note Use "delegating constructor" once C++11 is required by KDE.
*/
StandingsWidget::StandingsWidget(QWidget *parent, const QList<Player *> players) :
StandingsWidget::StandingsWidget(QWidget *parent, const QList<Player *> &players) :
// StandingsWidget(parent)
QWidget(parent)
{
......@@ -81,7 +81,7 @@ StandingsWidget::sizeHint() const
void
StandingsWidget::update(const QList<Player *> players )
StandingsWidget::update(const QList<Player *> &players )
{
m_standingsTable->setRowCount(players.count());
m_standingsTable->clearContents();
......
......@@ -37,11 +37,11 @@ class StandingsWidget : public QWidget
public:
explicit StandingsWidget(QWidget *parent);
explicit StandingsWidget(QWidget *parent, const QList<Player *> players);
explicit StandingsWidget(QWidget *parent, const QList<Player *> &players);
~StandingsWidget();
QSize sizeHint() const override;
void update(const QList<Player *> players);
void update(const QList<Player *> &players);
private:
void setupTable();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment