src/model.cpp

changeset 309
d862721d19a3
parent 264
76a025db4948
child 326
65dbfcb859a7
--- a/src/model.cpp	Wed Jun 29 16:21:44 2022 +0300
+++ b/src/model.cpp	Wed Jun 29 16:33:49 2022 +0300
@@ -173,10 +173,10 @@
 {
 }
 
-ModelId Model::append(const ModelElement &value)
+ElementId Model::append(const ModelElement &value)
 {
 	const std::size_t position = this->size();
-	const ModelId id = this->runningId;
+	const ElementId id = this->runningId;
 	this->runningId.value += 1;
 	const int row = narrow<int>(signed_cast(this->size()));
 	Q_EMIT this->beginInsertRows({}, row, row);
@@ -191,7 +191,7 @@
 	return this->body[position].data;
 }
 
-ModelId Model::idAt(std::size_t position) const
+ElementId Model::idAt(std::size_t position) const
 {
 	return this->body[position].id;
 }
@@ -203,7 +203,7 @@
 	Q_EMIT this->dataChanged(index, index);
 }
 
-std::optional<std::size_t> Model::find(ModelId id) const
+std::optional<std::size_t> Model::find(ElementId id) const
 {
 	return pointerToOptional(findInMap(this->positions, id));
 }

mercurial