aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/preferences_dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ui/qt/preferences_dialog.cpp')
-rw-r--r--ui/qt/preferences_dialog.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/ui/qt/preferences_dialog.cpp b/ui/qt/preferences_dialog.cpp
index 789053c12a..816945903c 100644
--- a/ui/qt/preferences_dialog.cpp
+++ b/ui/qt/preferences_dialog.cpp
@@ -20,6 +20,8 @@
#include <ui/recent.h>
#include <main_window.h>
+#include <ui/qt/utils/qt_ui_utils.h>
+
#include "wireshark_application.h"
extern "C" {
@@ -28,14 +30,14 @@ extern "C" {
static guint
module_prefs_unstash(module_t *module, gpointer data)
{
- gboolean *must_redissect_p = (gboolean *)data;
+ gboolean *must_redissect_p = static_cast<gboolean *>(data);
pref_unstash_data_t unstashed_data;
unstashed_data.handle_decode_as = TRUE;
module->prefs_changed_flags = 0; /* assume none of them changed */
- for (GList *pref_l = module->prefs; pref_l && pref_l->data; pref_l = g_list_next(pref_l)) {
- pref_t *pref = (pref_t *) pref_l->data;
+ for (GList *pref_l = module->prefs; pref_l && pref_l->data; pref_l = gxx_list_next(pref_l)) {
+ pref_t *pref = gxx_list_data(pref_t *, pref_l);
if (prefs_get_type(pref) == PREF_OBSOLETE || prefs_get_type(pref) == PREF_STATIC_TEXT) continue;
@@ -57,16 +59,16 @@ module_prefs_unstash(module_t *module, gpointer data)
static guint
module_prefs_clean_stash(module_t *module, gpointer)
{
- for (GList *pref_l = module->prefs; pref_l && pref_l->data; pref_l = g_list_next(pref_l)) {
- pref_t *pref = (pref_t *) pref_l->data;
+ for (GList *pref_l = module->prefs; pref_l && pref_l->data; pref_l = gxx_list_next(pref_l)) {
+ pref_t *pref = gxx_list_data(pref_t *, pref_l);
if (prefs_get_type(pref) == PREF_OBSOLETE || prefs_get_type(pref) == PREF_STATIC_TEXT) continue;
- pref_clean_stash(pref, NULL);
+ pref_clean_stash(pref, Q_NULLPTR);
}
if(prefs_module_has_submodules(module))
- return prefs_modules_foreach_submodules(module, module_prefs_clean_stash, NULL);
+ return prefs_modules_foreach_submodules(module, module_prefs_clean_stash, Q_NULLPTR);
return 0; /* Keep cleaning modules */
}