Wireshark-commits: [Wireshark-commits] master 370f3b3: Qt: add cache proxy model for Voip Calls dia

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Fri, 24 Mar 2017 23:04:17 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=370f3b358cd9ee7dcd2b7274f7ee6c90d5906c7a
Submitter: Peter Wu (peter@xxxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

370f3b3 by Peter Wu (peter@xxxxxxxxxxxxx):

    Qt: add cache proxy model for Voip Calls dialog
    
    When a capture file is reloaded, the information stored in
    VoipCallsInfoModel is invalidated. Add another cache layer to fix this:
    
        VoipCallsInfoModel          wraps around raw data (invalid on close)
        CacheProxyModel             NEW: use prev. data or cache on close
        VoipCallsInfoSortedModel    provided sorting, etc.
        VoipCallsDialog             actual user of model (callTreeView)
    
    This also fixes a UAF after a file was closed, and when a call is
    selected (that got worse with the last model/view patch and is "fixed"
    in this patch with the caching layer. Note that the Flow sequence and
    Play Streams dialog are not that useful when the file is closed).
    
    Change-Id: Ib4daff9dc01a54863fe1d943bdbdb876418924ee
    Reviewed-on: https://code.wireshark.org/review/20574
    Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot <buildbot-no-reply@xxxxxxxxxxxxx>
    Reviewed-by: Peter Wu <peter@xxxxxxxxxxxxx>
    

Actions performed:

    from  b4bc6c7   Qt: refactor Voip Calls Dialog into Model/View
    adds  370f3b3   Qt: add cache proxy model for Voip Calls dialog


Summary of changes:
 ui/qt/CMakeLists.txt                       |    2 +
 ui/qt/Makefile.am                          |    2 +
 ui/qt/cache_proxy_model.cpp                |  112 ++++++++++++++++++++++++++++
 ui/qt/{uat_model.h => cache_proxy_model.h} |   51 ++++++-------
 ui/qt/voip_calls_dialog.cpp                |    8 +-
 ui/qt/voip_calls_dialog.h                  |    2 +
 6 files changed, 147 insertions(+), 30 deletions(-)
 create mode 100644 ui/qt/cache_proxy_model.cpp
 copy ui/qt/{uat_model.h => cache_proxy_model.h} (56%)