| 114 | } |
| 115 | |
| 116 | void 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 | |
| 140 | void FocusedTreeView::rowsAboutToBeInserted(const QModelIndex&, int first, int last) |
| 141 | { |
nothing calls this directly
no test coverage detected