diff options
author | Gerald Combs <gerald@zing.org> | 2014-11-01 09:53:07 -0700 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2014-11-01 16:57:24 +0000 |
commit | cfdd20750884c4f20ad9ef59f0685dbcffbf7462 (patch) | |
tree | a4c3c47f36dc9b8f895aec780e95d0807bfe671a /ui/qt/follow_stream_dialog.h | |
parent | 74e8613fe17a7588040aedc2d806d3bace75e6ee (diff) | |
download | wireshark-cfdd20750884c4f20ad9ef59f0685dbcffbf7462.tar.gz |
Qt: Limit the amount of Follow Stream text.
QTextEdit + QTextDocument don't handle large amounts of data very well.
Truncate our displayed text after 2 MB.
Change-Id: I0b549a0b05a490272bc0d34af0f2c6661c548d0f
Reviewed-on: https://code.wireshark.org/review/5042
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/qt/follow_stream_dialog.h')
-rw-r--r-- | ui/qt/follow_stream_dialog.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/ui/qt/follow_stream_dialog.h b/ui/qt/follow_stream_dialog.h index 6ffeb7274b..1e5969b3c3 100644 --- a/ui/qt/follow_stream_dialog.h +++ b/ui/qt/follow_stream_dialog.h @@ -104,17 +104,16 @@ private: void resetStream(void); void updateWidgets(bool enable = true); frs_return_t - follow_show(char *buffer, size_t nchars, gboolean is_from_server, + showBuffer(char *buffer, size_t nchars, gboolean is_from_server, guint32 packet_num, guint32 *global_pos); - frs_return_t follow_read_stream(); - frs_return_t follow_read_tcp_stream(); - frs_return_t follow_read_udp_stream(); - frs_return_t follow_read_ssl_stream(); + frs_return_t readStream(); + frs_return_t readTcpStream(); + frs_return_t readUdpStream(); + frs_return_t readSslStream(); - void follow_stream(); - - void add_text(QString text, gboolean is_from_server, guint32 packet_num); + void followStream(); + void addText(QString text, gboolean is_from_server, guint32 packet_num); Ui::FollowStreamDialog *ui; @@ -127,6 +126,8 @@ private: follow_type_t follow_type_; follow_info_t follow_info_; QString data_out_filename_; + static const int max_document_length_; + bool truncated_; QString filter_out_filter_; int client_buffer_count_; int server_buffer_count_; |