diff options
author | Roland Knall <rknall@gmail.com> | 2018-03-28 10:04:50 +0200 |
---|---|---|
committer | Roland Knall <rknall@gmail.com> | 2018-04-17 13:16:46 +0000 |
commit | 57bf7e43470f9dc4129a21395a67b5a9b6c959ca (patch) | |
tree | 18b26038621137bf918f9466f5adaffa96d08134 /ui/qt/capture_file.h | |
parent | febaa4f119458c3754580d9c847da13c458345be (diff) |
Qt: Fix memory leak for CaptureEvent
Make the argument to the events a non-memory object
Change-Id: I46d8c24415aa2bc48b2a2d3b1fccffa6956d08b5
Reviewed-on: https://code.wireshark.org/review/26671
Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'ui/qt/capture_file.h')
-rw-r--r-- | ui/qt/capture_file.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ui/qt/capture_file.h b/ui/qt/capture_file.h index a6a75f69c8..cf5e367edb 100644 --- a/ui/qt/capture_file.h +++ b/ui/qt/capture_file.h @@ -22,9 +22,9 @@ typedef struct _capture_session capture_session; struct _packet_info; -class CaptureEvent : public QObject +class CaptureEvent { - Q_OBJECT + public: enum Context { #ifdef HAVE_LIBPCAP @@ -58,6 +58,8 @@ public: CaptureEvent(Context ctx, EventType evt, QString file); CaptureEvent(Context ctx, EventType evt, capture_session * session); + CaptureEvent(const CaptureEvent &ce); + Context captureContext() const; EventType eventType() const; QString filePath() const; @@ -129,7 +131,7 @@ public: gpointer window(); signals: - void captureEvent(CaptureEvent *); + void captureEvent(CaptureEvent); public slots: /** Retap the capture file. Convenience wrapper for cf_retap_packets. |