Changeset View
Changeset View
Standalone View
Standalone View
src/core/commentsmodel.cpp
Show First 20 Lines • Show All 157 Lines • ▼ Show 20 Line(s) | 156 | case DateRole: | |||
---|---|---|---|---|---|
158 | break; | 158 | break; | ||
159 | case ScoreRole: | 159 | case ScoreRole: | ||
160 | value.setValue(comment->score); | 160 | value.setValue(comment->score); | ||
161 | break; | 161 | break; | ||
162 | case ParentIndexRole: | 162 | case ParentIndexRole: | ||
163 | { | 163 | { | ||
164 | int idx{-1}; | 164 | int idx{-1}; | ||
165 | if (comment->parent) { | 165 | if (comment->parent) { | ||
166 | d->comments.indexOf(std::shared_ptr<KNSCore::Comment>(comment->parent)); | 166 | idx = d->comments.indexOf(comment->parent); | ||
167 | } | 167 | } | ||
168 | value.setValue(idx); | 168 | value.setValue(idx); | ||
169 | } | 169 | } | ||
170 | break; | 170 | break; | ||
171 | case DepthRole: | 171 | case DepthRole: | ||
172 | { | 172 | { | ||
173 | int depth{0}; | 173 | int depth{0}; | ||
174 | if (comment->parent) { | 174 | if (comment->parent) { | ||
▲ Show 20 Lines • Show All 51 Lines • Show Last 20 Lines |