clean up code

This commit is contained in:
Roy Qu 2022-10-22 22:38:31 +08:00
parent 74b250c9d2
commit f0bdfed9b4
1 changed files with 4 additions and 4 deletions

View File

@ -259,7 +259,7 @@ Qt::DropActions OJProblemSetModel::supportedDropActions() const
return Qt::DropAction::MoveAction; return Qt::DropAction::MoveAction;
} }
bool OJProblemSetModel::moveRows(const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild) bool OJProblemSetModel::moveRows(const QModelIndex &/*sourceParent*/, int sourceRow, int count, const QModelIndex &/*destinationParent*/, int destinationChild)
{ {
if (sourceRow < 0 if (sourceRow < 0
|| sourceRow + count - 1 >= mProblemSet.problems.count() || sourceRow + count - 1 >= mProblemSet.problems.count()
@ -507,7 +507,7 @@ Qt::DropActions OJProblemModel::supportedDropActions() const
return Qt::DropAction::MoveAction; return Qt::DropAction::MoveAction;
} }
bool OJProblemModel::dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) bool OJProblemModel::dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int /* column */, const QModelIndex &parent)
{ {
mMoveTargetRow=row; mMoveTargetRow=row;
if (mMoveTargetRow==-1) if (mMoveTargetRow==-1)
@ -515,12 +515,12 @@ bool OJProblemModel::dropMimeData(const QMimeData *data, Qt::DropAction action,
return QAbstractTableModel::dropMimeData(data,action,row,0,parent); return QAbstractTableModel::dropMimeData(data,action,row,0,parent);
} }
bool OJProblemModel::insertRows(int row, int count, const QModelIndex &parent) bool OJProblemModel::insertRows(int /* row */, int /*count*/, const QModelIndex &/*parent*/)
{ {
return true; return true;
} }
bool OJProblemModel::removeRows(int row, int count, const QModelIndex &parent) bool OJProblemModel::removeRows(int row, int count, const QModelIndex &/*parent*/)
{ {
int sourceRow = row; int sourceRow = row;
int destinationChild = mMoveTargetRow; int destinationChild = mMoveTargetRow;