Qt: Reload widgets using prefs when reloading Lua plugins
Widgets using prefs must be closed because the prefs may have been free'd when reloading Lua plugins. Change-Id: I4b79b7aff18d7923c77a9eb05acadc29b156edbf Reviewed-on: https://code.wireshark.org/review/10108 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
This commit is contained in:
parent
8fcdcb9c95
commit
97f3c1b88e
|
@ -2482,6 +2482,10 @@ void MainWindow::on_actionAnalyzeReloadLuaPlugins_triggered()
|
|||
funnel_statistics_reload_menus();
|
||||
reloadDynamicMenus();
|
||||
|
||||
// Preferences may have been deleted so close all widgets using prefs
|
||||
proto_tree_->closeContextMenu();
|
||||
main_ui_->preferenceEditorFrame->animatedHide();
|
||||
|
||||
char *gdp_path, *dp_path;
|
||||
(void) wsApp->readConfigurationFiles(&gdp_path, &dp_path);
|
||||
|
||||
|
|
|
@ -274,6 +274,11 @@ ProtoTree::ProtoTree(QWidget *parent) :
|
|||
this, SIGNAL(editProtocolPreference(preference*,pref_module*)));
|
||||
}
|
||||
|
||||
void ProtoTree::closeContextMenu()
|
||||
{
|
||||
ctx_menu_.close();
|
||||
}
|
||||
|
||||
void ProtoTree::clear() {
|
||||
updateSelectionStatus(NULL);
|
||||
QTreeWidget::clear();
|
||||
|
|
|
@ -42,6 +42,7 @@ public:
|
|||
void fillProtocolTree(proto_tree *protocol_tree);
|
||||
void emitRelatedFrame(int related_frame, ft_framenum_type_t framenum_type = FT_FRAMENUM_NONE);
|
||||
void goToField(int hf_id);
|
||||
void closeContextMenu();
|
||||
void clear();
|
||||
|
||||
protected:
|
||||
|
|
Loading…
Reference in New Issue