Commit b1d93541 authored by Francois Cartegnie's avatar Francois Cartegnie

Qt: prefsItemData: rename ambigous var

parent a05072b5
...@@ -270,7 +270,7 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) : ...@@ -270,7 +270,7 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) :
PrefsItemData *module_data = new PrefsItemData(); PrefsItemData *module_data = new PrefsItemData();
module_data->i_type = PrefsItemData::TYPE_MODULE; module_data->i_type = PrefsItemData::TYPE_MODULE;
module_data->psz_name = strdup( module_get_object( p_module ) ); module_data->psz_shortcut = strdup( module_get_object( p_module ) );
module_data->name = qtr( module_get_name( p_module, false ) ); module_data->name = qtr( module_get_name( p_module, false ) );
module_data->help.clear(); module_data->help.clear();
const char *psz_help = module_get_help( p_module ); const char *psz_help = module_get_help( p_module );
...@@ -436,7 +436,7 @@ void PrefsTree::updateLoadedStatus( QTreeWidgetItem *item = NULL, ...@@ -436,7 +436,7 @@ void PrefsTree::updateLoadedStatus( QTreeWidgetItem *item = NULL,
{ {
PrefsItemData *data = item->data( 0, Qt::UserRole ) PrefsItemData *data = item->data( 0, Qt::UserRole )
.value<PrefsItemData *>(); .value<PrefsItemData *>();
data->b_loaded = loaded->contains( QString( data->psz_name ) ); data->b_loaded = loaded->contains( QString( data->psz_shortcut ) );
for( int i = 0; i < item->childCount(); i++ ) for( int i = 0; i < item->childCount(); i++ )
updateLoadedStatus( item->child( i ), loaded ); updateLoadedStatus( item->child( i ), loaded );
...@@ -483,7 +483,7 @@ PrefsItemData::PrefsItemData() ...@@ -483,7 +483,7 @@ PrefsItemData::PrefsItemData()
panel = NULL; panel = NULL;
i_object_id = 0; i_object_id = 0;
i_subcat_id = -1; i_subcat_id = -1;
psz_name = NULL; psz_shortcut = NULL;
b_loaded = false; b_loaded = false;
} }
...@@ -496,7 +496,7 @@ bool PrefsItemData::contains( const QString &text, Qt::CaseSensitivity cs ) ...@@ -496,7 +496,7 @@ bool PrefsItemData::contains( const QString &text, Qt::CaseSensitivity cs )
if( this->i_type == TYPE_CATEGORY ) if( this->i_type == TYPE_CATEGORY )
return false; return false;
else if( this->i_type == TYPE_MODULE ) else if( this->i_type == TYPE_MODULE )
p_module = module_find( this->psz_name ); p_module = module_find( this->psz_shortcut );
else else
{ {
p_module = module_get_main(); p_module = module_get_main();
...@@ -584,7 +584,7 @@ AdvPrefsPanel::AdvPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, ...@@ -584,7 +584,7 @@ AdvPrefsPanel::AdvPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
if( data->i_type == PrefsItemData::TYPE_CATEGORY ) if( data->i_type == PrefsItemData::TYPE_CATEGORY )
return; return;
else if( data->i_type == PrefsItemData::TYPE_MODULE ) else if( data->i_type == PrefsItemData::TYPE_MODULE )
p_module = module_find( data->psz_name ); p_module = module_find( data->psz_shortcut );
else else
{ {
p_module = module_get_main(); p_module = module_get_main();
......
...@@ -43,7 +43,7 @@ class PrefsItemData : public QObject ...@@ -43,7 +43,7 @@ class PrefsItemData : public QObject
Q_OBJECT Q_OBJECT
public: public:
PrefsItemData(); PrefsItemData();
virtual ~PrefsItemData() { free( psz_name ); }; virtual ~PrefsItemData() { free( psz_shortcut ); };
bool contains( const QString &text, Qt::CaseSensitivity cs ); bool contains( const QString &text, Qt::CaseSensitivity cs );
AdvPrefsPanel *panel; AdvPrefsPanel *panel;
int i_object_id; int i_object_id;
...@@ -56,7 +56,7 @@ public: ...@@ -56,7 +56,7 @@ public:
TYPE_MODULE TYPE_MODULE
}; };
prefsType i_type; prefsType i_type;
char *psz_name; char *psz_shortcut;
bool b_loaded; bool b_loaded;
QString name; QString name;
QString help; QString help;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment