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

Method rowsAboutToBeInserted

kdevplatform/util/focusedtreeview.cpp:140–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140void FocusedTreeView::rowsAboutToBeInserted(const QModelIndex&, int first, int last)
141{
142 Q_D(FocusedTreeView);
143
144 if (d->insertedBegin == -1) {
145 d->insertedBegin = d->insertedEnd = first;
146
147 d->wasAtEnd = true;
148 QModelIndex last = model()->index(model()->rowCount() - 1, 0);
149 if (last.isValid()) {
150 auto rect = visualRect(last);
151 d->wasAtEnd = rect.isValid() && viewport()->rect().intersects(rect);
152 }
153 }
154 if (first == d->insertedEnd) {
155 d->insertedEnd = last + 1;
156 }
157
158 if (!d->timer.isActive())
159 d->timer.start();
160}
161
162// Removing rows can make longer rows move into the visible region, so we also must trigger a
163// column resize

Callers

nothing calls this directly

Calls 6

modelFunction · 0.85
indexMethod · 0.45
rowCountMethod · 0.45
isValidMethod · 0.45
isActiveMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected