Fix compiler warnings
authorSakari Poussa <spoussa@gmail.com>
Thu, 11 Mar 2010 13:35:14 +0000 (15:35 +0200)
committerSakari Poussa <spoussa@gmail.com>
Thu, 11 Mar 2010 13:35:14 +0000 (15:35 +0200)
src/course-dialog.cpp
src/data.cpp
src/score-dialog.cpp
src/stat-model.cpp
src/table-model.cpp
src/table-model.h

index fff235e..9f2f3f7 100644 (file)
@@ -111,6 +111,7 @@ void CourseDialog::createLayout(QWidget *parent)
 
 void CourseDialog::createButton(QWidget *parent)
 {
+  Q_UNUSED(parent);
   pushButtonUp = new QPushButton(tr("+"));
   connect(pushButtonUp, SIGNAL(clicked()), this, SLOT(up()));
 
index 270e04b..19be40a 100644 (file)
@@ -252,6 +252,7 @@ int Course::update(QVector<QString> &par,
                   QVector<QString> &hcp,
                   QVector<QString> &len)
 {
+  Q_UNUSED(len);
   for (int i = 0; i < par.size(); i++) {
     Hole *hole = holeList.at(i);
     if (hole->getPar() != par[i])
index e02294c..958e7ce 100644 (file)
@@ -177,6 +177,7 @@ void ScoreDialog::createTable(QWidget *parent)
 
 void ScoreDialog::createButton(QWidget *parent)
 {
+  Q_UNUSED(parent);
   pushButtonUp = new QPushButton(tr("+"));
   connect(pushButtonUp, SIGNAL(clicked()), this, SLOT(up()));
 
index f9b7f41..605fc8d 100644 (file)
@@ -17,11 +17,13 @@ StatModel::StatModel(QList<Club *> &cList, QList<Score *> &sList) : clubList(cLi
 
 int StatModel::rowCount(const QModelIndex & parent) const
 {
+  Q_UNUSED(parent);
   return ROWS;
 }
 
 int StatModel::columnCount(const QModelIndex & parent) const
 {
+  Q_UNUSED(parent);
   return COLS;
 }
 
index 3bcf1b3..a77be1f 100644 (file)
@@ -185,8 +185,6 @@ QModelIndex ScoreTableModel::index(int row, int column, const QModelIndex &paren
 
 QVariant ScoreTableModel::data(const QModelIndex &index, int role) const
 {
-  // TODO: move away from the stack
-
   if (!index.isValid())
     return QVariant();
 
@@ -211,6 +209,7 @@ QVariant ScoreTableModel::data(const QModelIndex &index, int role) const
     // the empty cell.
     if ((row == ROW_HOLE && col != 10) || row == ROW_HOLE_2) {
       QBrush brush(ScoreColor::holeBg());
+      //QBrush brush(Qt::red);
       return brush;
     }
     if (score && course && (row == ROW_SCORE || row == ROW_SCORE_2)) {
index 9c07f25..62bfdd2 100644 (file)
@@ -14,7 +14,6 @@
 #define ROW_COUNT  3
 #define COL_COUNT  9
 
-// TODO: change name to ScoreTableModel
 class ScoreTableModel : public QAbstractTableModel
 {