Wireshark-commits: [Wireshark-commits] master ad71a91: Qt: expose CaptureEvent definition for MOC
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Wed, 18 Apr 2018 12:06:31 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=ad71a9154040bce496bb959c7c7b73f63aed97ef
Submitter: Anders Broman (a.broman58@xxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

ad71a91 by Peter Wu (peter@xxxxxxxxxxxxx):

    Qt: expose CaptureEvent definition for MOC
    
    All WiresharkDialog instances have a "captureEvent(CaptureEvent)" method
    that requires the definition of "CaptureEvent" from capture_file.h.
    By luck, this definition is available for CMake builds due to the
    generated MOC headers being included in the right order, but this cannot
    be relied on. On an autotools build with less luck:
    
        main_status_bar.moc.cpp: In static member function ‘static void MainStatusBar::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)’:
        main_status_bar.moc.cpp:241:86: error: invalid use of incomplete type ‘class CaptureEvent’
                 case 28: _t->captureEventHandler((*reinterpret_cast< CaptureEvent(*)>(_a[1]))); break;
    
    Create a new header file to limit exposure of the CaptureFile class.
    
    Change-Id: I4ab609f13b9438797e39e7b98f367da35536979b
    Fixes: v2.9.0rc0-186-g57bf7e4347 ("Qt: Fix memory leak for CaptureEvent")
    Reviewed-on: https://code.wireshark.org/review/27003
    Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
    Reviewed-by: Roland Knall <rknall@xxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    

Actions performed:

    from  8740ac8   release-notes: add autotools removal.
    adds  ad71a91   Qt: expose CaptureEvent definition for MOC


Summary of changes:
 ui/qt/capture_event.h         | 81 +++++++++++++++++++++++++++++++++++++++++++
 ui/qt/capture_file.h          | 56 +-----------------------------
 ui/qt/wireshark_application.h |  4 +--
 3 files changed, 84 insertions(+), 57 deletions(-)
 create mode 100644 ui/qt/capture_event.h