Wireshark-commits: [Wireshark-commits] master 28bfb32: Qt: Defer proto tree column content resizing

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Fri, 11 Mar 2016 20:42:31 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=28bfb3210537ce60895e10526f0a3e8cdfbd279d
Submitter: Gerald Combs (gerald@xxxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

28bfb32 by Gerald Combs (gerald@xxxxxxxxxxxxx):

    Qt: Defer proto tree column content resizing.
    
    Try to avoid the following call graph:
    
    ProtoTree::expandAll
      ...
        ProtoTree::expand
          ...
            QTreeView::resizeColumnToContents
    
    QTreeView::resizeColumnToContents calls sizeHintForColumn, which
    iterates over a number of items (default 1000). Calling it from
    ProtoTree::expand can lead to excessive wheel-spinning.
    
    Add a single-shot timer for resizeColumnToContents. This is similar to
    what QTreeView does internally when columns are resized.
    
    Bug: 12228
    Change-Id: I7b50c1486b3a25817efae58efbb8c9e961dbdab0
    Reviewed-on: https://code.wireshark.org/review/14411
    Petri-Dish: Gerald Combs <gerald@xxxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot <buildbot-no-reply@xxxxxxxxxxxxx>
    Reviewed-by: Gerald Combs <gerald@xxxxxxxxxxxxx>
    

Actions performed:

    from  6ed543d   Remove the last remnants of U3 support.
    adds  28bfb32   Qt: Defer proto tree column content resizing.


Summary of changes:
 ui/qt/proto_tree.cpp |   59 +++++++++++++++++++++++++++++++++++++++++++-------
 ui/qt/proto_tree.h   |    8 ++++++-
 2 files changed, 58 insertions(+), 9 deletions(-)