Skip to content

Commit

Permalink
GUI: Add UNUSED where needed
Browse files Browse the repository at this point in the history
  • Loading branch information
fdde authored and DrMcCoy committed Dec 29, 2017
1 parent 0ffd88c commit c759513
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/gui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "src/aurora/util.h"
#include "src/common/filepath.h"
#include "src/common/strutil.h"
#include "src/common/system.h"
#include "src/common/writefile.h"
#include "src/gui/mainwindow.h"
#include "src/gui/panelpreviewempty.h"
Expand Down Expand Up @@ -193,7 +194,7 @@ void MainWindow::showPreviewPanel() {
}
}

void MainWindow::resourceSelect(const QItemSelection &selected, const QItemSelection &deselected) {
void MainWindow::resourceSelect(const QItemSelection &selected, const QItemSelection &UNUSED(deselected)) {
const QModelIndex index = selected.indexes().at(0);
_currentItem = _treeModel->getItem(index);
_resInfo->update(_currentItem);
Expand Down
3 changes: 2 additions & 1 deletion src/gui/panelpreviewempty.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#include "verdigris/wobjectimpl.h"

#include "src/common/system.h"
#include "src/gui/panelpreviewempty.h"

namespace GUI {

W_OBJECT_IMPL(PanelPreviewEmpty)

PanelPreviewEmpty::PanelPreviewEmpty(QWidget *parent)
PanelPreviewEmpty::PanelPreviewEmpty(QWidget *UNUSED(parent))
{
_ui.setupUi(this);
}
Expand Down
3 changes: 2 additions & 1 deletion src/gui/panelpreviewimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include "verdigris/wobjectimpl.h"

#include "src/common/system.h"
#include "src/gui/panel.h"
#include "src/gui/panelpreviewimage.h"
#include "src/gui/resourcetreeitem.h"
Expand All @@ -10,7 +11,7 @@ namespace GUI {

W_OBJECT_IMPL(PanelPreviewImage)

PanelPreviewImage::PanelPreviewImage(QWidget *parent)
PanelPreviewImage::PanelPreviewImage(QWidget *UNUSED(parent))
: _imageLabel(new QLabel(this))
, _scaleFactor(1)
{
Expand Down
3 changes: 2 additions & 1 deletion src/gui/panelpreviewsound.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "verdigris/wobjectimpl.h"

#include "src/common/system.h"
#include "src/common/util.h"
#include "src/gui/panelpreviewsound.h"
#include "src/gui/resourcetreeitem.h"
Expand All @@ -8,7 +9,7 @@ namespace GUI {

W_OBJECT_IMPL(PanelPreviewSound)

PanelPreviewSound::PanelPreviewSound(QWidget *parent)
PanelPreviewSound::PanelPreviewSound(QWidget *UNUSED(parent))
{
_ui.setupUi(this);
_ui.volSlider->setMaximum(100);
Expand Down
3 changes: 2 additions & 1 deletion src/gui/panelpreviewtext.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#include "verdigris/wobjectimpl.h"

#include "src/common/system.h"
#include "src/gui/panelpreviewtext.h"
#include "src/gui/resourcetreeitem.h"

namespace GUI {

W_OBJECT_IMPL(PanelPreviewText)

PanelPreviewText::PanelPreviewText(QWidget *parent)
PanelPreviewText::PanelPreviewText(QWidget *UNUSED(parent))
{
_ui.setupUi(this);
}
Expand Down
5 changes: 3 additions & 2 deletions src/gui/resourcetree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "src/aurora/zipfile.h"
#include "src/common/filepath.h"
#include "src/common/readfile.h"
#include "src/common/system.h"
#include "src/gui/mainwindow.h"
#include "src/gui/statusbar.h"
#include "src/gui/resourcetree.h"
Expand Down Expand Up @@ -160,7 +161,7 @@ int ResourceTree::rowCount(const QModelIndex &parent) const {
return getItem(parent)->childCount();
}

int ResourceTree::columnCount(const QModelIndex &parent) const {
int ResourceTree::columnCount(const QModelIndex &UNUSED(parent)) const {
return 1;
}

Expand All @@ -181,7 +182,7 @@ QModelIndex ResourceTree::index(int row, int column, const QModelIndex &parent)
return createIndex(row, column, child);
}

QVariant ResourceTree::headerData(int section, Qt::Orientation orientation, int role) const {
QVariant ResourceTree::headerData(int UNUSED(section), Qt::Orientation orientation, int role) const {
if (orientation == Qt::Horizontal && role == Qt::DisplayRole)
return _root->getName();

Expand Down

0 comments on commit c759513

Please sign in to comment.