[vlc-commits] [Git][videolan/vlc][master] 2 commits: qt: fix saving advanced preferences
Rémi Denis-Courmont (@Courmisch)
gitlab at videolan.org
Sun Jan 23 10:37:35 UTC 2022
Rémi Denis-Courmont pushed to branch master at VideoLAN / VLC
Commits:
0b651364 by Lyndon Brown at 2022-01-23T09:24:53+00:00
qt: fix saving advanced preferences
fixes #26510.
- - - - -
99f37214 by Lyndon Brown at 2022-01-23T09:24:53+00:00
qt: avoid unnecessary main module lookups
overlooked in dcebb25bbd61dee26ab6baf842ba79ecd675c3ed.
- - - - -
1 changed file:
- modules/gui/qt/dialogs/preferences/complete_preferences.cpp
Changes:
=====================================
modules/gui/qt/dialogs/preferences/complete_preferences.cpp
=====================================
@@ -71,7 +71,7 @@ PrefsTree::PrefsTree( qt_intf_t *_p_intf, QWidget *_parent,
/* Create base cat/subcat tree from core config set */
unsigned confsize;
- module_t *p_module = module_get_main();
+ module_t *p_module = main_module;
module_config_t *const p_config = module_config_get (p_module, &confsize);
for( size_t i = 0; i < confsize; i++ )
{
@@ -295,11 +295,14 @@ void PrefsTree::applyAll()
i_module++ )
{
PrefsTreeItem *mod_item = subcat_item->child( i_module );
- mod_item->panel->apply();
+ if( mod_item->panel )
+ mod_item->panel->apply();
}
- subcat_item->panel->apply();
+ if( subcat_item->panel )
+ subcat_item->panel->apply();
}
- cat_item->panel->apply();
+ if( cat_item->panel )
+ cat_item->panel->apply();
}
}
@@ -462,16 +465,7 @@ bool PrefsTreeItem::contains( const QString &text, Qt::CaseSensitivity cs )
{
bool is_core = this->node_type != PrefsTreeItem::PLUGIN_NODE;
enum vlc_config_subcat id = this->subcat_id;
-
- /* find our module */
- module_t *p_module;
- if( !is_core )
- p_module = this->p_module;
- else
- {
- p_module = module_get_main();
- assert( p_module );
- }
+ module_t *p_module = this->p_module;
/* check the node itself (its name/longname/helptext) */
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/93a05605e1f40df745702ac7eb3a31c758d5f71c...99f37214269e1737429ced10be92ec5cdf74ea64
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/93a05605e1f40df745702ac7eb3a31c758d5f71c...99f37214269e1737429ced10be92ec5cdf74ea64
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list