Skip to content

Commit 9975c6a

Browse files
committed
Fix warnings about unused parameters
1 parent ce34aed commit 9975c6a

11 files changed

+27
-27
lines changed

src/club.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ Club* ClubDB::getItem(const QModelIndex& index) const
274274
return nullptr;
275275
}
276276

277-
int ClubDB::rowCount(const QModelIndex& parent) const
277+
int ClubDB::rowCount(const QModelIndex& /*parent*/) const
278278
{
279279
return clubs.size();
280280
}

src/comboBoxDelegate.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ ComboBoxDelegate::ComboBoxDelegate(QAbstractItemModel* _model, int _model_column
2727
{
2828
}
2929

30-
QWidget* ComboBoxDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
30+
QWidget* ComboBoxDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem& /*option*/, const QModelIndex& /*index*/) const
3131
{
3232
QComboBox* combo = new QComboBox(parent);
3333

@@ -55,7 +55,7 @@ void ComboBoxDelegate::setModelData(QWidget* editor, QAbstractItemModel* model,
5555
model->setData(index, value, Qt::EditRole);
5656
}
5757

58-
void ComboBoxDelegate::updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const
58+
void ComboBoxDelegate::updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& /*index*/) const
5959
{
6060
editor->setGeometry(option.rect);
6161
}

src/layout.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ LayoutDB::LayoutDB()
325325

326326
// TODO: dir watcher
327327
}
328-
Layout* LayoutDB::getOrLoadLayout(const QString& name, QWidget* dialogParent)
328+
Layout* LayoutDB::getOrLoadLayout(const QString& name, QWidget* /*dialogParent*/)
329329
{
330330
Layouts::iterator it = layouts.find(name);
331331
if (it == layouts.end())

src/location.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ size_t Location::getChildNumber()
7676
return 0;
7777
}
7878

79-
bool Location::insertChildren(int position, int count, int columns)
79+
bool Location::insertChildren(int position, int count, int /*columns*/)
8080
{
8181
if (position < 0 || position > static_cast<int>(children.size()))
8282
return false;
@@ -152,7 +152,7 @@ int LocationDB::rowCount(const QModelIndex& parent) const
152152
{
153153
return getItem(parent)->getChildCount();
154154
}
155-
int LocationDB::columnCount(const QModelIndex& parent) const
155+
int LocationDB::columnCount(const QModelIndex& /*parent*/) const
156156
{
157157
return 1;
158158
}
@@ -200,7 +200,7 @@ QVariant LocationDB::data(const QModelIndex& index, int role) const
200200
Location* item = getItem(index);
201201
return item->getName();
202202
}
203-
QVariant LocationDB::headerData(int section, Qt::Orientation orientation, int role) const
203+
QVariant LocationDB::headerData(int /*section*/, Qt::Orientation /*orientation*/, int /*role*/) const
204204
{
205205
//if (orientation == Qt::Horizontal && role == Qt::DisplayRole)
206206
// return QVariant(tr("Country, state or province name"));

src/mainWindow.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ void CalculateScoringTab::removeScoringClicked()
251251
scoringDB.deleteScoring(item->text());
252252
delete item;
253253
}
254-
void CalculateScoringTab::currentScoringChanged(QListWidgetItem* current, QListWidgetItem* previous)
254+
void CalculateScoringTab::currentScoringChanged(QListWidgetItem* current, QListWidgetItem* /*previous*/)
255255
{
256256
bool enable = current != nullptr;
257257
editScoringButton->setEnabled(enable);
@@ -1179,7 +1179,7 @@ void SeriesScoringTab::editClicked()
11791179
seriesDoubleClicked(item);
11801180
}
11811181

1182-
void SeriesScoringTab::currentSeriesChanged(QListWidgetItem* current, QListWidgetItem* previous)
1182+
void SeriesScoringTab::currentSeriesChanged(QListWidgetItem* current, QListWidgetItem* /*previous*/)
11831183
{
11841184
bool enable = current != nullptr;
11851185
editButton->setEnabled(enable);

src/presentScoring.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ void PresentationWidget::wheelEvent(QWheelEvent* event)
175175
}
176176
}
177177

178-
void PresentationWidget::resizeEvent(QResizeEvent* event)
178+
void PresentationWidget::resizeEvent(QResizeEvent* /*event*/)
179179
{
180180
delete current_slide;
181181
delete current_list_img;
@@ -1022,7 +1022,7 @@ void PresentScoringDialog::currentScoringChanged(int index)
10221022

10231023
recalculateCategories();
10241024
}
1025-
void PresentScoringDialog::includeNonScoringRunnersClicked(bool checked)
1025+
void PresentScoringDialog::includeNonScoringRunnersClicked(bool /*checked*/)
10261026
{
10271027
recalculateCategories();
10281028
}

src/problemWidget.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ ActionSelectionDelegate::ActionSelectionDelegate(QObject* parent) : QItemDelegat
156156
{
157157
}
158158

159-
QWidget* ActionSelectionDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
159+
QWidget* ActionSelectionDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &/*option*/, const QModelIndex &index) const
160160
{
161161
QComboBox* combo = new QComboBox(parent);
162162

@@ -186,7 +186,7 @@ void ActionSelectionDelegate::setModelData(QWidget* editor, QAbstractItemModel*
186186
reinterpret_cast<Problem*>(index.data(Qt::UserRole).value<void*>())->setSelection(combo->itemData(combo->currentIndex(), Qt::UserRole).toInt());
187187
}
188188

189-
void ActionSelectionDelegate::updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const
189+
void ActionSelectionDelegate::updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& /*index*/) const
190190
{
191191
editor->setGeometry(option.rect);
192192
}

src/resultList.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ QVariant* ResultList::getItem(const QModelIndex& index) const
606606
return nullptr;
607607
}
608608

609-
int ResultList::rowCount(const QModelIndex& parent) const
609+
int ResultList::rowCount(const QModelIndex& /*parent*/) const
610610
{
611611
if (columns.empty())
612612
return 0;
@@ -907,7 +907,7 @@ void ResultsTree::GroupSortProxyModel::setSourceModel(QAbstractItemModel* source
907907
}
908908
}
909909

910-
QModelIndex ResultsTree::GroupSortProxyModel::mapFromSource(const QModelIndex& sourceIndex) const
910+
QModelIndex ResultsTree::GroupSortProxyModel::mapFromSource(const QModelIndex& /*sourceIndex*/) const
911911
{
912912
return QModelIndex(); // NOTE: unfinished, continue here ...
913913

@@ -933,7 +933,7 @@ QModelIndex ResultsTree::GroupSortProxyModel::index(int row, int column, const Q
933933

934934
return createIndex(row, column, (void*)(&groupItems[row]));
935935
}
936-
QModelIndex ResultsTree::GroupSortProxyModel::parent(const QModelIndex& child) const
936+
QModelIndex ResultsTree::GroupSortProxyModel::parent(const QModelIndex& /*child*/) const
937937
{
938938
return QModelIndex();
939939
}

src/runner.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ void RunnerDB::mergeRunners(Runner* src, Runner* dest)
456456
runnerDB.deleteRunner(src);
457457
}
458458

459-
int RunnerDB::rowCount(const QModelIndex& parent) const
459+
int RunnerDB::rowCount(const QModelIndex& /*parent*/) const
460460
{
461461
return runners.size();
462462
}

src/scoringDialog.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ GeneralPage::GeneralPage(Scoring* _scoring, ScoringDialog* _dialog, QWidget* par
237237
connect(nameEdit, SIGNAL(editingFinished()), this, SLOT(nameChanged()));
238238
connect(decimalPlacesEdit, SIGNAL(editingFinished()), this, SLOT(decimalPlacesChanged()));
239239
}
240-
void GeneralPage::checkToggled(bool checked)
240+
void GeneralPage::checkToggled(bool /*checked*/)
241241
{
242242
if (scoring->getCustomCategories() != customCategoriesCheck->isChecked())
243243
dialog->setCustomCategories(customCategoriesCheck->isChecked());
@@ -608,7 +608,7 @@ void ScoringCalculationPage::handicapRemoveClicked()
608608

609609
updateHandicapWidgets();
610610
}
611-
void ScoringCalculationPage::currentHandicapChanged(QListWidgetItem* current, QListWidgetItem* previous)
611+
void ScoringCalculationPage::currentHandicapChanged(QListWidgetItem* current, QListWidgetItem* /*previous*/)
612612
{
613613
updateHandicapWidgets();
614614

@@ -768,7 +768,7 @@ void ScoringCalculationPage::timePointCellChanged(int row, int column)
768768
item->setText(number.toString());
769769
react_to_changes = true;
770770
}
771-
void ScoringCalculationPage::timePointCurrentCellChanged(int current_row, int current_column, int previous_row, int previous_column)
771+
void ScoringCalculationPage::timePointCurrentCellChanged(int current_row, int /*current_column*/, int /*previous_row*/, int /*previous_column*/)
772772
{
773773
timePointRemove->setEnabled(current_row != 0);
774774
}
@@ -783,7 +783,7 @@ void ScoringCalculationPage::setCustomCategories(bool enable)
783783
rulesetList->setCurrentRow(0);
784784
}
785785
}
786-
void ScoringCalculationPage::rulesetChanged(QListWidgetItem* current, QListWidgetItem* previous)
786+
void ScoringCalculationPage::rulesetChanged(QListWidgetItem* current, QListWidgetItem* /*previous*/)
787787
{
788788
Ruleset* ruleset = static_cast<Ruleset*>(current->data(Qt::UserRole).value<void*>());
789789
react_to_changes = false;
@@ -911,7 +911,7 @@ void ScoringCalculationPage::rulesetRenamed(QListWidgetItem* item)
911911
dialog->rulesetsChanged();
912912
}
913913

914-
void ScoringCalculationPage::ruleTypeChanged(bool checked)
914+
void ScoringCalculationPage::ruleTypeChanged(bool /*checked*/)
915915
{
916916
if (!react_to_changes) return;
917917

@@ -921,7 +921,7 @@ void ScoringCalculationPage::ruleTypeChanged(bool checked)
921921
getCurrentRuleset()->rule_type = static_cast<RuleType>(id);
922922
}
923923

924-
void ScoringCalculationPage::formulaNumberChanged(int i)
924+
void ScoringCalculationPage::formulaNumberChanged(int /*i*/)
925925
{
926926
if (!react_to_changes) return;
927927
getCurrentRuleset()->timeRatioSettings.formulaNumber = ratioButtonGroup->checkedId();
@@ -1250,7 +1250,7 @@ void AdjustCategoriesPage::deleteCategoryClicked()
12501250
scoring->deleteCustomCategory(cat);
12511251
delete categoriesList->currentItem();
12521252
}
1253-
void AdjustCategoriesPage::categoryChanged(QListWidgetItem* current, QListWidgetItem* previous)
1253+
void AdjustCategoriesPage::categoryChanged(QListWidgetItem* /*current*/, QListWidgetItem* /*previous*/)
12541254
{
12551255
react_to_changes = false;
12561256

@@ -1300,7 +1300,7 @@ void AdjustCategoriesPage::sourcesChanged()
13001300
}
13011301
}
13021302
}
1303-
void AdjustCategoriesPage::rulesetChanged(int index)
1303+
void AdjustCategoriesPage::rulesetChanged(int /*index*/)
13041304
{
13051305
if (!react_to_changes) return;
13061306
CustomCategory* cat = getCurrentCategory();

0 commit comments

Comments
 (0)