src/modelobject.cpp

Sat, 24 Aug 2019 14:44:42 +0300

author
Teemu Piippo <teemu@hecknology.net>
date
Sat, 24 Aug 2019 14:44:42 +0300
changeset 2
2bdc3ac5e77c
permissions
-rw-r--r--

things

2
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
1 #include "modelobject.h"
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
2
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
3 static Uuid &getUuidForNewObject()
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
4 {
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
5 static Uuid running_uuid {0, 0};
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
6 incrementUuid(running_uuid);
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
7 return running_uuid;
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
8 }
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
9
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
10 ModelObject::ModelObject() :
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
11 id {getUuidForNewObject()}
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
12 {
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
13 }
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
14
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
15 ModelObject::~ModelObject()
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
16 {
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
17 }
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
18
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
19
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
20 Comment::Comment(QStringView text) :
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
21 ModelObject{},
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
22 storedText{text} {}

mercurial