MCPcopy Create free account
hub / github.com/KDE/kdevelop / setHasMore

Method setHasMore

kdevplatform/debugger/util/treeitem.cpp:197–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195};
196
197void TreeItem::setHasMore(bool more)
198{
199 /* FIXME: this will crash if used in ctor of root item,
200 where the model is not associated with item or something. */
201 QModelIndex index = model_->indexForItem(this, 0);
202
203 if (more && !more_)
204 {
205 model_->beginInsertRows(index, childItems.size(), childItems.size());
206 ellipsis_ = new EllipsisItem (model(), this);
207 more_ = more;
208 model_->endInsertRows();
209 }
210 else if (!more && more_)
211 {
212 model_->beginRemoveRows(index, childItems.size(), childItems.size());
213 delete ellipsis_;
214 ellipsis_ = nullptr;
215 more_ = more;
216 model_->endRemoveRows();
217 }
218}
219
220void TreeItem::emitAllChildrenFetched()
221{

Callers 4

stateChangedMethod · 0.80
handleEventMethod · 0.80
handleMethod · 0.80
handleMethod · 0.80

Calls 3

modelFunction · 0.85
indexForItemMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected