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

Method delayedAutoScrollAndResize

kdevplatform/util/focusedtreeview.cpp:116–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114}
115
116void FocusedTreeView::delayedAutoScrollAndResize()
117{
118 Q_D(FocusedTreeView);
119
120 if (!model()) {
121 // might happen on shutdown
122 return;
123 }
124
125 if (d->autoScrollAtEnd && d->insertedBegin != -1 && d->wasAtEnd && d->insertedEnd == model()->rowCount()) {
126 scrollToBottom();
127 }
128
129 for (int a = 0; a < model()->columnCount(); ++a)
130 resizeColumnToContents(a);
131
132 d->insertedBegin = -1;
133
134 // Timer is single-shot, but the code above may have recursively restarted the timer
135 // (e.g. via the connection from the scroll-bar signal), so explicitly prevent a redundant
136 // call here.
137 d->timer.stop();
138}
139
140void FocusedTreeView::rowsAboutToBeInserted(const QModelIndex&, int first, int last)
141{

Callers

nothing calls this directly

Calls 4

modelFunction · 0.85
stopMethod · 0.80
rowCountMethod · 0.45
columnCountMethod · 0.45

Tested by

no test coverage detected