Skip to content

Commit

Permalink
Tidy Up 1.4 (#1739)
Browse files Browse the repository at this point in the history
  • Loading branch information
trisyoungs authored Nov 30, 2023
1 parent 61dc298 commit ede498e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/gui/models/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ set(models_MOC_HDRS
configurationModel.h
dataManagerSimulationModel.h
dissolveModel.h
dissolveModelImageProvider.h
enumOptionsModel.h
forcefieldModel.h
isotopologueSetModel.h
Expand Down Expand Up @@ -64,6 +63,7 @@ set(models_SRCS
dataManagerSimulationModel.cpp
dissolveModel.cpp
dissolveModelImageProvider.cpp
dissolveModelImageProvider.h
enumOptionsModel.cpp
expressionVariableVectorModel.cpp
externalPotentialModel.cpp
Expand All @@ -86,6 +86,7 @@ set(models_SRCS
pairPotentialModel.cpp
procedureModel.cpp
procedureModelMimeData.cpp
procedureModelMimeData.h
procedureNodeModel.cpp
rangeVectorModel.cpp
renderableGroupManagerModel.cpp
Expand Down Expand Up @@ -121,7 +122,6 @@ qt6_wrap_cpp(
forcefieldModel.h
isotopologueSetModel.h
pairPotentialModel.h
procedureModelMimeData.h
rangeVectorModel.h
speciesAngleModel.h
speciesAtomModel.h
Expand Down
10 changes: 2 additions & 8 deletions src/gui/models/forcefieldModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ QVariant ForcefieldModel::data(const QModelIndex &index, int role) const
return QString::fromStdString(std::string(forcefields_[index.row()]->description()));
case RawRole:
return QVariant::fromValue(forcefields_[index.row()].get());
default:
return {};
}
}

Expand All @@ -36,11 +38,3 @@ QHash<int, QByteArray> ForcefieldModel::roleNames() const
roles[RawRole] = "raw";
return roles;
}

// QVariant ForcefieldModel::headerData(int section, Qt::Orientation orientation, int role) const {
// return {};
// }

// Qt::ItemFlags ForcefieldModel::flags(const QModelIndex &index) const {
// return Qt::ItemIsSelectable | Qt::ItemIsEnabled;
// }
2 changes: 1 addition & 1 deletion src/keywords/enumOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,5 @@ template <class E> class EnumOptionsKeyword : public EnumOptionsBaseKeyword
// Express as a serialisable value
SerialisedValue serialise() const override { return optionData_.keyword(data_); }
// Read values from a serialisable value
void deserialise(const SerialisedValue &node, const CoreData &coreData) { data_ = optionData_.deserialise(node); }
void deserialise(const SerialisedValue &node, const CoreData &coreData) override { data_ = optionData_.deserialise(node); }
};

0 comments on commit ede498e

Please sign in to comment.