prefs,ui: properly migrate old filter expressions
authorPeter Wu <peter@lekensteyn.nl>
Sat, 8 Sep 2018 09:49:22 +0000 (11:49 +0200)
committerPeter Wu <peter@lekensteyn.nl>
Mon, 10 Sep 2018 09:27:34 +0000 (09:27 +0000)
commitad0de0ffbc9ed9e397d09e1398555d06d29439d2
tree18acdf02c960d2de3cff6b8134be1cae43367a18
parent7573f7dab49043bc6401b97a10439d9b9b6a291a
prefs,ui: properly migrate old filter expressions

When legacy filter expressions preferences are present, be sure to
(1) save the dfilter_buttons file when updating the preferences file and
(2) save the preferences file after updating the dfilter_buttons file.

Without doing (1), the old buttons will be lost. Without (2), restarting
Wireshark will result in duplicate buttons. Only write the files if the
user actually made other changes to avoid breaking profiles by just
opening Wireshark.

Bug: 15114
Bug: 15121
Change-Id: I5b9417c34146c4450526781a20308c9c98fb44a1
Reviewed-on: https://code.wireshark.org/review/29488
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
epan/prefs.c
epan/prefs.h
ui/preference_utils.c
ui/preference_utils.h
ui/qt/filter_expression_frame.cpp
ui/qt/widgets/filter_expression_toolbar.cpp