diff options
author | Gerald Combs <gerald@wireshark.org> | 2015-01-29 13:55:18 -0800 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2015-01-29 22:51:43 +0000 |
commit | 67b069e544da2078cf5c9ba0c95ca9af8ba00b03 (patch) | |
tree | dda3edf650e2a08f86825bbf3d537a7ab33051f2 /ui/qt/tcp_stream_dialog.cpp | |
parent | 2edf8bbd33e4820c19a52a435ddb2cc8e3e32fdb (diff) |
Qt: Add address conversion convenience routines
Add address_to_qstring and address_to_display_qstring, which wrap
address_to_string and address_to_display respectively and return
QStrings. Convert most of the instances in ui/qt to the new routines.
Fix a some memory leaks in the process.
Change-Id: Icda80bbfe0b2df723d54c8da84355255f819af89
Reviewed-on: https://code.wireshark.org/review/6848
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/qt/tcp_stream_dialog.cpp')
-rw-r--r-- | ui/qt/tcp_stream_dialog.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/ui/qt/tcp_stream_dialog.cpp b/ui/qt/tcp_stream_dialog.cpp index 2f66f3f937..85236d8a87 100644 --- a/ui/qt/tcp_stream_dialog.cpp +++ b/ui/qt/tcp_stream_dialog.cpp @@ -725,16 +725,12 @@ void TCPStreamDialog::fillWindowScale() QString TCPStreamDialog::streamDescription() { - char* src_addr = (char*)address_to_str(NULL, &graph_.src_address); - char* dst_addr = (char*)address_to_str(NULL, &graph_.dst_address); QString description(tr(" for %1:%2 %3 %4:%5") - .arg(src_addr) + .arg(address_to_qstring(&graph_.src_address)) .arg(graph_.src_port) .arg(UTF8_RIGHTWARDS_ARROW) - .arg(dst_addr) + .arg(address_to_qstring(&graph_.dst_address)) .arg(graph_.dst_port)); - wmem_free(NULL, src_addr); - wmem_free(NULL, dst_addr); return description; } |