summaryrefslogtreecommitdiff
path: root/doc/README.qt
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2015-01-29 13:55:18 -0800
committerGerald Combs <gerald@wireshark.org>2015-01-29 22:51:43 +0000
commit67b069e544da2078cf5c9ba0c95ca9af8ba00b03 (patch)
treedda3edf650e2a08f86825bbf3d537a7ab33051f2 /doc/README.qt
parent2edf8bbd33e4820c19a52a435ddb2cc8e3e32fdb (diff)
downloadwireshark-67b069e544da2078cf5c9ba0c95ca9af8ba00b03.tar.gz
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 'doc/README.qt')
-rw-r--r--doc/README.qt6
1 files changed, 5 insertions, 1 deletions
diff --git a/doc/README.qt b/doc/README.qt
index 754a8ea60d..02ed43abe6 100644
--- a/doc/README.qt
+++ b/doc/README.qt
@@ -196,11 +196,15 @@ QEvent::LanguageChange.
If you're using GLib string functions or plain old C character array idioms in
Qt-only code you're probably doing something wrong. QStrings are generally
-*much* safer and easier to use. They also make translations eaiser.
+*much* safer and easier to use. They also make translations easier.
If you need to pass strings between Qt and GLib you can use qstring_strdup
gchar_free_to_qstring, which are defined in ui/qt/qt_ui_utils.h.
+If you're calling a function that returns wmem-allocated memory it might make
+more sense to add a wrapper function to qt_ui_utils than to call wmem_free in
+your code.
+
2.1.4 Mixing C and C++
Sometimes we have to call C++ functions from one of Wireshark's C callbacks and