diff options
author | jan Iversen <jani@libreoffice.org> | 2018-05-21 18:09:09 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-05-21 12:48:04 -0700 |
commit | e536682b84eda7444be1c9b85e0d5942596c6914 (patch) | |
tree | aebfcb65c29609ddc1442281a30c64a55f518d1b /desktop-widgets/divelogimportdialog.cpp | |
parent | e47f6df07662feb15c30a7f4bd0df3d1c23a022b (diff) | |
download | subsurface-e536682b84eda7444be1c9b85e0d5942596c6914.tar.gz |
desktop-widgets: Change Q_UNUSED to no parameter name
C++ permits use of parameters without name, which signals unused
Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'desktop-widgets/divelogimportdialog.cpp')
-rw-r--r-- | desktop-widgets/divelogimportdialog.cpp | 29 |
1 files changed, 9 insertions, 20 deletions
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(); } |