Qt: Fix overloaded CPU
QTreeView also use timerEvent() to do something... so call its overloaded method and make CPU happy again. Bug: 11035 Change-Id: I405c8c2763ae0b96c0483aedcb314a5f259e76a1 Reviewed-on: https://code.wireshark.org/review/7696 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
This commit is contained in:
parent
7696991dc8
commit
80939682f9
|
@ -534,6 +534,8 @@ void PacketList::contextMenuEvent(QContextMenuEvent *event)
|
|||
// scrollToBottom() from rowsInserted().
|
||||
void PacketList::timerEvent(QTimerEvent *event)
|
||||
{
|
||||
QTreeView::timerEvent(event);
|
||||
|
||||
if (rows_inserted_
|
||||
&& event->timerId() == tail_timer_id_
|
||||
&& capture_in_progress_
|
||||
|
@ -692,8 +694,8 @@ void PacketList::setAutoScroll(bool enabled)
|
|||
tail_at_end_ = enabled;
|
||||
if (enabled && capture_in_progress_) {
|
||||
scrollToBottom();
|
||||
if (tail_timer_id_ < 1) tail_timer_id_ = startTimer(tail_update_interval_);
|
||||
} else if (tail_timer_id_ > 0) {
|
||||
if (tail_timer_id_ == 0) tail_timer_id_ = startTimer(tail_update_interval_);
|
||||
} else if (tail_timer_id_ != 0) {
|
||||
killTimer(tail_timer_id_);
|
||||
tail_timer_id_ = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue