From e536682b84eda7444be1c9b85e0d5942596c6914 Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Mon, 21 May 2018 18:09:09 +0200 Subject: desktop-widgets: Change Q_UNUSED to no parameter name C++ permits use of parameters without name, which signals unused Signed-off-by: Jan Iversen --- desktop-widgets/divelogimportdialog.cpp | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) (limited to 'desktop-widgets/divelogimportdialog.cpp') diff --git a/desktop-widgets/divelogimportdialog.cpp b/desktop-widgets/divelogimportdialog.cpp index 5633d50a2..edb93b9fd 100644 --- a/desktop-widgets/divelogimportdialog.cpp +++ b/desktop-widgets/divelogimportdialog.cpp @@ -52,20 +52,16 @@ ColumnNameProvider::ColumnNameProvider(QObject *parent) : QAbstractListModel(par tr("Sample setpoint") << tr("Visibility") << tr("Rating"); } -bool ColumnNameProvider::insertRows(int row, int count, const QModelIndex &parent) +bool ColumnNameProvider::insertRows(int row, int, const QModelIndex&) { - Q_UNUSED(count) - Q_UNUSED(parent) beginInsertRows(QModelIndex(), row, row); columnNames.append(QString()); endInsertRows(); return true; } -bool ColumnNameProvider::removeRows(int row, int count, const QModelIndex &parent) +bool ColumnNameProvider::removeRows(int row, int, const QModelIndex&) { - Q_UNUSED(count) - Q_UNUSED(parent) beginRemoveRows(QModelIndex(), row, row); columnNames.removeAt(row); endRemoveRows(); @@ -91,9 +87,8 @@ QVariant ColumnNameProvider::data(const QModelIndex &index, int role) const return QVariant(columnNames[index.row()]); } -int ColumnNameProvider::rowCount(const QModelIndex &parent) const +int ColumnNameProvider::rowCount(const QModelIndex&) const { - Q_UNUSED(parent) return columnNames.count(); } @@ -114,9 +109,8 @@ int ColumnNameProvider::mymatch(QString value) const -ColumnNameView::ColumnNameView(QWidget *parent) +ColumnNameView::ColumnNameView(QWidget*) { - Q_UNUSED(parent) setAcceptDrops(true); setDragEnabled(true); } @@ -145,9 +139,8 @@ void ColumnNameView::mousePressEvent(QMouseEvent *press) } } -void ColumnNameView::dragLeaveEvent(QDragLeaveEvent *leave) +void ColumnNameView::dragLeaveEvent(QDragLeaveEvent*) { - Q_UNUSED(leave); } void ColumnNameView::dragEnterEvent(QDragEnterEvent *event) @@ -176,15 +169,13 @@ void ColumnNameView::dropEvent(QDropEvent *event) } } -ColumnDropCSVView::ColumnDropCSVView(QWidget *parent) +ColumnDropCSVView::ColumnDropCSVView(QWidget*) { - Q_UNUSED(parent) setAcceptDrops(true); } -void ColumnDropCSVView::dragLeaveEvent(QDragLeaveEvent *leave) +void ColumnDropCSVView::dragLeaveEvent(QDragLeaveEvent*) { - Q_UNUSED(leave); } void ColumnDropCSVView::dragEnterEvent(QDragEnterEvent *event) @@ -272,15 +263,13 @@ QVariant ColumnNameResult::data(const QModelIndex &index, int role) const return QVariant(); } -int ColumnNameResult::rowCount(const QModelIndex &parent) const +int ColumnNameResult::rowCount(const QModelIndex&) const { - Q_UNUSED(parent); return columnValues.count() + 1; // +1 == the header. } -int ColumnNameResult::columnCount(const QModelIndex &parent) const +int ColumnNameResult::columnCount(const QModelIndex&) const { - Q_UNUSED(parent); return columnNames.count(); } -- cgit v1.2.3-70-g09d2