Skip to content

Commit

Permalink
Remove unreachable return statement, and no need to reset model when …
Browse files Browse the repository at this point in the history
…modifying data.
  • Loading branch information
trisyoungs committed May 14, 2024
1 parent 1c2000c commit 2040c29
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/gui/models/masterBondModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ QVariant MasterBondModel::getTermData(int row, MasterTermModelData::DataType dat
default:
return {};
}

return {};
}

bool MasterBondModel::setTermData(int row, MasterTermModelData::DataType dataType, const QVariant &value)
Expand All @@ -47,7 +45,6 @@ bool MasterBondModel::setTermData(int row, MasterTermModelData::DataType dataTyp

auto &t = sourceData_[row];

beginResetModel();
switch (dataType)
{
case (MasterTermModelData::DataType::Name):
Expand All @@ -71,7 +68,8 @@ bool MasterBondModel::setTermData(int row, MasterTermModelData::DataType dataTyp
default:
return false;
}
endResetModel();

Q_EMIT(dataChanged({}, {}));

return true;
}
Expand Down

0 comments on commit 2040c29

Please sign in to comment.