summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-10-31 19:31:08 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-10-31 19:31:08 +0000
commit60e7fc8eb418c5dbbbd2788c4e7987c475268e69 (patch)
tree2f88c9bb313f5254a213079f41fefa913b2d8a4c
parent518d85ab591723da2c5a1a0e01a04dcf0e75c5c4 (diff)
downloadsigen-60e7fc8eb418c5dbbbd2788c4e7987c475268e69.tar.gz
sigen-60e7fc8eb418c5dbbbd2788c4e7987c475268e69.tar.xz
sigen-60e7fc8eb418c5dbbbd2788c4e7987c475268e69.zip
[FIX] Using Q_UNUSED instead of commenting out parameter names
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@287 6ecfd1a5-f3ed-3746-8530-beee90d26b22
-rw-r--r--Changelog7
-rw-r--r--sigmodr/SigmodTreeModel.cpp12
-rw-r--r--sigmodr/SigmodTreeModel.h6
-rw-r--r--sigmodr/SoundUI.cpp3
-rw-r--r--sigmodr/SoundUI.h2
-rw-r--r--sigmodr/TilemapModel.cpp9
-rw-r--r--sigmodr/TilemapModel.h6
-rw-r--r--sigmodr/TypechartModel.cpp9
-rw-r--r--sigmodr/TypechartModel.h6
-rw-r--r--sigmodr/models/BaseModel.h2
-rw-r--r--sigmodr/models/BaseObjectModel.cpp3
-rw-r--r--sigmodr/models/BaseObjectModel.h2
-rw-r--r--sigmodr/models/MapModel.cpp6
-rw-r--r--sigmodr/models/MapModel.h4
-rw-r--r--sigmodr/models/ObjectModel.cpp3
-rw-r--r--sigmodr/models/ObjectModel.h2
-rw-r--r--sigmodr/models/RootModel.cpp10
-rw-r--r--sigmodr/models/RootModel.h6
-rw-r--r--sigmodr/models/SigmodModel.cpp6
-rw-r--r--sigmodr/models/SigmodModel.h4
-rw-r--r--sigmodr/models/SpeciesModel.cpp6
-rw-r--r--sigmodr/models/SpeciesModel.h4
22 files changed, 75 insertions, 43 deletions
diff --git a/Changelog b/Changelog
index aa21c380..563e9e2b 100644
--- a/Changelog
+++ b/Changelog
@@ -1,4 +1,11 @@
-----------------
+Rev: 287
+Date: 31 October 2008
+User: MathStuf
+-----------------
+[FIX] Using Q_UNUSED instead of commenting out parameter names
+
+-----------------
Rev: 286
Date: 31 October 2008
User: MathStuf
diff --git a/sigmodr/SigmodTreeModel.cpp b/sigmodr/SigmodTreeModel.cpp
index cc5d3179..b9f957e8 100644
--- a/sigmodr/SigmodTreeModel.cpp
+++ b/sigmodr/SigmodTreeModel.cpp
@@ -50,8 +50,11 @@ QVariant Sigmodr::SigmodTreeModel::data(const QModelIndex& index, int role) cons
return object->data(role);
}
-QVariant Sigmodr::SigmodTreeModel::headerData(int /*section*/, Qt::Orientation /*orientation*/, int /*role = Qt::DisplayRole*/) const
+QVariant Sigmodr::SigmodTreeModel::headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const
{
+ Q_UNUSED(section)
+ Q_UNUSED(orientation)
+ Q_UNUSED(role)
return QVariant();
}
@@ -84,8 +87,9 @@ int Sigmodr::SigmodTreeModel::rowCount(const QModelIndex& parent) const
return object->rowCount();
}
-int Sigmodr::SigmodTreeModel::columnCount(const QModelIndex& /*parent*/) const
+int Sigmodr::SigmodTreeModel::columnCount(const QModelIndex& parent) const
{
+ Q_UNUSED(parent)
return 1;
}
@@ -141,8 +145,10 @@ QMimeData* Sigmodr::SigmodTreeModel::mimeData(const QModelIndexList& indexes) co
return mimeData;
}
-bool Sigmodr::SigmodTreeModel::dropMimeData(const QMimeData* data, Qt::DropAction action, int /*row*/, int /*column*/, const QModelIndex& parent)
+bool Sigmodr::SigmodTreeModel::dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent)
{
+ Q_UNUSED(row)
+ Q_UNUSED(column)
if (action == Qt::IgnoreAction)
return true;
QString format;
diff --git a/sigmodr/SigmodTreeModel.h b/sigmodr/SigmodTreeModel.h
index a170b3ce..58fa82c5 100644
--- a/sigmodr/SigmodTreeModel.h
+++ b/sigmodr/SigmodTreeModel.h
@@ -39,13 +39,13 @@ class SigmodTreeModel : public QAbstractItemModel
~SigmodTreeModel();
QVariant data(const QModelIndex& index, int role) const;
- QVariant headerData(int /*section*/, Qt::Orientation /*orientation*/, int /*role = Qt::DisplayRole*/) const;
+ QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
QModelIndex index(int row, int column, const QModelIndex& parent) const;
QModelIndex parent(const QModelIndex& index) const;
int rowCount(const QModelIndex& parent = QModelIndex()) const;
- int columnCount(const QModelIndex& /*parent = QModelIndex()*/) const;
+ int columnCount(const QModelIndex& parent = QModelIndex()) const;
Qt::ItemFlags flags(const QModelIndex& index) const;
@@ -53,7 +53,7 @@ class SigmodTreeModel : public QAbstractItemModel
QStringList mimeTypes() const;
QMimeData* mimeData(const QModelIndexList& indexes) const;
- bool dropMimeData(const QMimeData* data, Qt::DropAction action, int /*row*/, int /*column*/, const QModelIndex& parent);
+ bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent);
void addSigmod(Sigmod::Sigmod* sigmod);
void deleteSigmod(const Sigmod::Sigmod* sigmod);
diff --git a/sigmodr/SoundUI.cpp b/sigmodr/SoundUI.cpp
index 43d9b777..eac2a4e7 100644
--- a/sigmodr/SoundUI.cpp
+++ b/sigmodr/SoundUI.cpp
@@ -110,8 +110,9 @@ void Sigmodr::SoundUI::on_buttonBrowse_clicked()
}
}
-void Sigmodr::SoundUI::stateChanged(Phonon::State newState, Phonon::State /*oldState*/)
+void Sigmodr::SoundUI::stateChanged(Phonon::State newState, Phonon::State oldState)
{
+ Q_UNUSED(oldState)
switch (newState)
{
case Phonon::ErrorState:
diff --git a/sigmodr/SoundUI.h b/sigmodr/SoundUI.h
index a6efffa7..80df9069 100644
--- a/sigmodr/SoundUI.h
+++ b/sigmodr/SoundUI.h
@@ -52,7 +52,7 @@ class SoundUI : public ObjectUI, private Ui::formSound
void on_varName_textChanged(const QString& name);
void on_buttonBrowse_clicked();
- void stateChanged(Phonon::State newState, Phonon::State /*oldState*/);
+ void stateChanged(Phonon::State newState, Phonon::State oldState);
void resetAudioData();
void tick(qint64 time);
private:
diff --git a/sigmodr/TilemapModel.cpp b/sigmodr/TilemapModel.cpp
index 82cbf5d9..093b2389 100644
--- a/sigmodr/TilemapModel.cpp
+++ b/sigmodr/TilemapModel.cpp
@@ -58,20 +58,23 @@ QVariant Sigmodr::TilemapModel::data(const QModelIndex& index, int role) const
return QVariant();
}
-QVariant Sigmodr::TilemapModel::headerData(int section, Qt::Orientation /*orientation*/, int role) const
+QVariant Sigmodr::TilemapModel::headerData(int section, Qt::Orientation orientation, int role) const
{
+ Q_UNUSED(orientation)
if (role == Qt::DisplayRole)
return section;
return QVariant();
}
-int Sigmodr::TilemapModel::rowCount(const QModelIndex& /*parent*/) const
+int Sigmodr::TilemapModel::rowCount(const QModelIndex& parent) const
{
+ Q_UNUSED(parent)
return m_tilemap.height();
}
-int Sigmodr::TilemapModel::columnCount(const QModelIndex& /*parent*/) const
+int Sigmodr::TilemapModel::columnCount(const QModelIndex& parent) const
{
+ Q_UNUSED(parent)
return m_tilemap.width();
}
diff --git a/sigmodr/TilemapModel.h b/sigmodr/TilemapModel.h
index 88e891ae..a63a43da 100644
--- a/sigmodr/TilemapModel.h
+++ b/sigmodr/TilemapModel.h
@@ -41,10 +41,10 @@ class TilemapModel : public QAbstractTableModel
TilemapModel(Sigcore::Matrix<int>* tilemap, const Sigmod::Sigmod* sigmod);
QVariant data(const QModelIndex& index, int role) const;
- QVariant headerData(int section, Qt::Orientation /*orientation*/, int role = Qt::DisplayRole) const;
+ QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
- int rowCount(const QModelIndex& /*parent*/) const;
- int columnCount(const QModelIndex& /*parent*/) const;
+ int rowCount(const QModelIndex& parent) const;
+ int columnCount(const QModelIndex& parent) const;
bool insertRows(int row, int count, const QModelIndex& parent = QModelIndex());
bool insertColumns(int column, int count, const QModelIndex& parent = QModelIndex());
diff --git a/sigmodr/TypechartModel.cpp b/sigmodr/TypechartModel.cpp
index bc71d24e..b2f09fab 100644
--- a/sigmodr/TypechartModel.cpp
+++ b/sigmodr/TypechartModel.cpp
@@ -49,20 +49,23 @@ QVariant Sigmodr::TypechartModel::data(const QModelIndex& index, int role) const
return QVariant();
}
-QVariant Sigmodr::TypechartModel::headerData(int section, Qt::Orientation /*orientation*/, int role) const
+QVariant Sigmodr::TypechartModel::headerData(int section, Qt::Orientation orientation, int role) const
{
+ Q_UNUSED(orientation)
if (role == Qt::DisplayRole)
return m_types.at(section);
return QVariant();
}
-int Sigmodr::TypechartModel::rowCount(const QModelIndex& /*parent*/) const
+int Sigmodr::TypechartModel::rowCount(const QModelIndex& parent) const
{
+ Q_UNUSED(parent)
return m_typechart.height();
}
-int Sigmodr::TypechartModel::columnCount(const QModelIndex& /*parent*/) const
+int Sigmodr::TypechartModel::columnCount(const QModelIndex& parent) const
{
+ Q_UNUSED(parent)
return m_typechart.width();
}
diff --git a/sigmodr/TypechartModel.h b/sigmodr/TypechartModel.h
index 905b2f2c..b0ecb9a5 100644
--- a/sigmodr/TypechartModel.h
+++ b/sigmodr/TypechartModel.h
@@ -37,10 +37,10 @@ class TypechartModel : public QAbstractTableModel
TypechartModel(Sigcore::Matrix<Sigcore::Fraction>* typechart, const QStringList& types);
QVariant data(const QModelIndex& index, int role) const;
- QVariant headerData(int section, Qt::Orientation /*orientation*/, int role = Qt::DisplayRole) const;
+ QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
- int rowCount(const QModelIndex& /*parent*/) const;
- int columnCount(const QModelIndex& /*parent*/) const;
+ int rowCount(const QModelIndex& parent) const;
+ int columnCount(const QModelIndex& parent) const;
Qt::ItemFlags flags(const QModelIndex& index) const;
diff --git a/sigmodr/models/BaseModel.h b/sigmodr/models/BaseModel.h
index ba98d6b0..567c370c 100644
--- a/sigmodr/models/BaseModel.h
+++ b/sigmodr/models/BaseModel.h
@@ -71,7 +71,7 @@ class BaseModel : public QObject
void rowChanged(const int row);
void rowsChanged(const QList<int>& rows);
protected:
- virtual int findChild(BaseModel* /*model*/) const = 0;
+ virtual int findChild(BaseModel* model) const = 0;
BaseModel* m_parent;
Sigmod::Object* m_object;
diff --git a/sigmodr/models/BaseObjectModel.cpp b/sigmodr/models/BaseObjectModel.cpp
index a67d5c1e..f0dbed3a 100644
--- a/sigmodr/models/BaseObjectModel.cpp
+++ b/sigmodr/models/BaseObjectModel.cpp
@@ -55,7 +55,8 @@ QString Sigmodr::BaseObjectModel::type() const
return m_object->className();
}
-int Sigmodr::BaseObjectModel::findChild(BaseModel* /*model*/) const
+int Sigmodr::BaseObjectModel::findChild(BaseModel* model) const
{
+ Q_UNUSED(model)
return -1;
}
diff --git a/sigmodr/models/BaseObjectModel.h b/sigmodr/models/BaseObjectModel.h
index 6bffbaf0..64e224d7 100644
--- a/sigmodr/models/BaseObjectModel.h
+++ b/sigmodr/models/BaseObjectModel.h
@@ -45,7 +45,7 @@ class BaseObjectModel : public BaseModel
QString type() const;
virtual QString types() const = 0;
protected:
- virtual int findChild(BaseModel* /*model*/) const;
+ virtual int findChild(BaseModel* model) const;
};
}
diff --git a/sigmodr/models/MapModel.cpp b/sigmodr/models/MapModel.cpp
index fc8883a9..8a3b51f2 100644
--- a/sigmodr/models/MapModel.cpp
+++ b/sigmodr/models/MapModel.cpp
@@ -102,12 +102,14 @@ QString Sigmodr::MapModel::types() const
return type().append(";MapEffect;MapTrainer;MapWarp;MapWildList");
}
-void Sigmodr::MapModel::addObject(Sigmod::Object* /*object*/)
+void Sigmodr::MapModel::addObject(Sigmod::Object* object)
{
+ Q_UNUSED(object)
}
-void Sigmodr::MapModel::deleteObject(BaseModel* /*model*/)
+void Sigmodr::MapModel::deleteObject(BaseModel* model)
{
+ Q_UNUSED(model)
}
void Sigmodr::MapModel::deleteSelf()
diff --git a/sigmodr/models/MapModel.h b/sigmodr/models/MapModel.h
index 9320ac1a..e967ca7b 100644
--- a/sigmodr/models/MapModel.h
+++ b/sigmodr/models/MapModel.h
@@ -43,8 +43,8 @@ class MapModel : public GroupObjectModel
QString types() const;
public slots:
- void addObject(Sigmod::Object* /*object = NULL*/);
- void deleteObject(BaseModel* /*model*/);
+ void addObject(Sigmod::Object* object = NULL);
+ void deleteObject(BaseModel* model);
void deleteSelf();
protected:
diff --git a/sigmodr/models/ObjectModel.cpp b/sigmodr/models/ObjectModel.cpp
index 89c704f3..c4e0d36e 100644
--- a/sigmodr/models/ObjectModel.cpp
+++ b/sigmodr/models/ObjectModel.cpp
@@ -61,8 +61,9 @@ bool Sigmodr::ObjectModel::setData(const QVariant& value, int role)
return false;
}
-Sigmodr::BaseModel* Sigmodr::ObjectModel::childItem(const int /*row*/)
+Sigmodr::BaseModel* Sigmodr::ObjectModel::childItem(const int row)
{
+ Q_UNUSED(row)
return NULL;
}
diff --git a/sigmodr/models/ObjectModel.h b/sigmodr/models/ObjectModel.h
index 793c29d8..2988ca86 100644
--- a/sigmodr/models/ObjectModel.h
+++ b/sigmodr/models/ObjectModel.h
@@ -36,7 +36,7 @@ class ObjectModel : public BaseObjectModel
bool setData(const QVariant& value, int role = Qt::EditRole);
- BaseModel* childItem(const int /*row*/);
+ BaseModel* childItem(const int row);
QString types() const;
public slots:
diff --git a/sigmodr/models/RootModel.cpp b/sigmodr/models/RootModel.cpp
index 7c794052..ae7697a8 100644
--- a/sigmodr/models/RootModel.cpp
+++ b/sigmodr/models/RootModel.cpp
@@ -33,8 +33,10 @@ Sigmodr::RootModel::~RootModel()
{
}
-bool Sigmodr::RootModel::setData(const QVariant& /*value*/, int /*role = Qt::EditRole*/)
+bool Sigmodr::RootModel::setData(const QVariant& value, int role)
{
+ Q_UNUSED(value)
+ Q_UNUSED(role)
return false;
}
@@ -62,10 +64,12 @@ QString Sigmodr::RootModel::types() const
return "Sigmod";
}
-void Sigmodr::RootModel::addObject(Sigmod::Object* /*object*/)
+void Sigmodr::RootModel::addObject(Sigmod::Object* object)
{
+ Q_UNUSED(object)
}
-void Sigmodr::RootModel::deleteObject(BaseModel* /*model*/)
+void Sigmodr::RootModel::deleteObject(BaseModel* model)
{
+ Q_UNUSED(model)
}
diff --git a/sigmodr/models/RootModel.h b/sigmodr/models/RootModel.h
index 581319c3..f3595007 100644
--- a/sigmodr/models/RootModel.h
+++ b/sigmodr/models/RootModel.h
@@ -35,15 +35,15 @@ class RootModel : public GroupModel
RootModel();
~RootModel();
- bool setData(const QVariant& /*value*/, int /*role = Qt::EditRole*/);
+ bool setData(const QVariant& value, int role = Qt::EditRole);
void addSigmod(Sigmod::Sigmod* sigmod);
void deleteSigmod(const Sigmod::Sigmod* sigmod);
QString types() const;
public slots:
- void addObject(Sigmod::Object* /*object = NULL*/);
- void deleteObject(BaseModel* /*model*/);
+ void addObject(Sigmod::Object* object = NULL);
+ void deleteObject(BaseModel* model);
};
}
diff --git a/sigmodr/models/SigmodModel.cpp b/sigmodr/models/SigmodModel.cpp
index d8f1e444..26631744 100644
--- a/sigmodr/models/SigmodModel.cpp
+++ b/sigmodr/models/SigmodModel.cpp
@@ -120,12 +120,14 @@ QString Sigmodr::SigmodModel::types() const
return type().append(";Rules;Ability;Author;Badge;CoinList;EggGroup;GlobalScript;Item;ItemType;Map;Move;Nature;Skin;Sound;Species;Sprite;Status;Store;Tile;Time;Trainer;Type;Weather");
}
-void Sigmodr::SigmodModel::addObject(Sigmod::Object* /*object*/)
+void Sigmodr::SigmodModel::addObject(Sigmod::Object* object)
{
+ Q_UNUSED(object)
}
-void Sigmodr::SigmodModel::deleteObject(BaseModel* /*model*/)
+void Sigmodr::SigmodModel::deleteObject(BaseModel* model)
{
+ Q_UNUSED(model)
}
void Sigmodr::SigmodModel::deleteSelf()
diff --git a/sigmodr/models/SigmodModel.h b/sigmodr/models/SigmodModel.h
index 1e5bfba4..024604de 100644
--- a/sigmodr/models/SigmodModel.h
+++ b/sigmodr/models/SigmodModel.h
@@ -43,8 +43,8 @@ class SigmodModel : public GroupObjectModel
QString types() const;
public slots:
- void addObject(Sigmod::Object* /*object = NULL*/);
- void deleteObject(BaseModel* /*model*/);
+ void addObject(Sigmod::Object* object = NULL);
+ void deleteObject(BaseModel* model);
void deleteSelf();
protected:
diff --git a/sigmodr/models/SpeciesModel.cpp b/sigmodr/models/SpeciesModel.cpp
index fec696a9..4147e597 100644
--- a/sigmodr/models/SpeciesModel.cpp
+++ b/sigmodr/models/SpeciesModel.cpp
@@ -102,12 +102,14 @@ QString Sigmodr::SpeciesModel::types() const
return type().append(";SpeciesAbility;SpeciesItem;SpeciesMove");
}
-void Sigmodr::SpeciesModel::addObject(Sigmod::Object* /*object*/)
+void Sigmodr::SpeciesModel::addObject(Sigmod::Object* object)
{
+ Q_UNUSED(object)
}
-void Sigmodr::SpeciesModel::deleteObject(BaseModel* /*model*/)
+void Sigmodr::SpeciesModel::deleteObject(BaseModel* model)
{
+ Q_UNUSED(model)
}
void Sigmodr::SpeciesModel::deleteSelf()
diff --git a/sigmodr/models/SpeciesModel.h b/sigmodr/models/SpeciesModel.h
index 54750b95..cc47255d 100644
--- a/sigmodr/models/SpeciesModel.h
+++ b/sigmodr/models/SpeciesModel.h
@@ -43,8 +43,8 @@ class SpeciesModel : public GroupObjectModel
QString types() const;
public slots:
- void addObject(Sigmod::Object* /*object = NULL*/);
- void deleteObject(BaseModel* /*model*/);
+ void addObject(Sigmod::Object* object = NULL);
+ void deleteObject(BaseModel* model);
void deleteSelf();
protected: