[vlc-devel] [PATCH 1/3] gui/qt: rename ExtraMetaPanel::extraMetaTree to extraMeta

Filip Roséen filip at atch.se
Sat Feb 25 07:36:15 CET 2017


If the name of a data-member's type is present in its name,
changing the type of said data-member makes it so that the patch is
hard to follow.

These changes simply removes the unnecessary type-indication from the
data-members name, mostly to make future refactoring easier to follow.
---
 modules/gui/qt/components/info_panels.cpp | 24 ++++++++++++------------
 modules/gui/qt/components/info_panels.hpp |  2 +-
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/modules/gui/qt/components/info_panels.cpp b/modules/gui/qt/components/info_panels.cpp
index b771eb6994..340e524d9f 100644
--- a/modules/gui/qt/components/info_panels.cpp
+++ b/modules/gui/qt/components/info_panels.cpp
@@ -396,12 +396,12 @@ ExtraMetaPanel::ExtraMetaPanel( QWidget *parent ) : QWidget( parent )
      topLabel->setWordWrap( true );
      layout->addWidget( topLabel, 0, 0 );
 
-     extraMetaTree = new QTreeWidget( this );
-     extraMetaTree->setAlternatingRowColors( true );
-     extraMetaTree->setColumnCount( 2 );
-     extraMetaTree->resizeColumnToContents( 0 );
-     extraMetaTree->setHeaderHidden( true );
-     layout->addWidget( extraMetaTree, 1, 0 );
+     extraMeta = new QTreeWidget( this );
+     extraMeta->setAlternatingRowColors( true );
+     extraMeta->setColumnCount( 2 );
+     extraMeta->resizeColumnToContents( 0 );
+     extraMeta->setHeaderHidden( true );
+     layout->addWidget( extraMeta, 1, 0 );
 }
 
 /**
@@ -417,7 +417,7 @@ void ExtraMetaPanel::update( input_item_t *p_item )
 
     QList<QTreeWidgetItem *> items;
 
-    extraMetaTree->clear();
+    extraMeta->clear();
 
     vlc_mutex_lock( &p_item->lock );
     vlc_meta_t *p_meta = p_item->p_meta;
@@ -433,7 +433,7 @@ void ExtraMetaPanel::update( input_item_t *p_item )
         QStringList tempItem;
         tempItem.append( VLC_META_DISCNUMBER );
         tempItem.append( qfu( psz_disc_number ) );
-        items.append( new QTreeWidgetItem ( extraMetaTree, tempItem ) );
+        items.append( new QTreeWidgetItem ( extraMeta, tempItem ) );
     }
 
     char ** ppsz_allkey = vlc_meta_CopyExtraNames( p_meta);
@@ -444,14 +444,14 @@ void ExtraMetaPanel::update( input_item_t *p_item )
         QStringList tempItem;
         tempItem.append( qfu( ppsz_allkey[i] ) + " : ");
         tempItem.append( qfu( psz_value ) );
-        items.append( new QTreeWidgetItem ( extraMetaTree, tempItem ) );
+        items.append( new QTreeWidgetItem ( extraMeta, tempItem ) );
         free( ppsz_allkey[i] );
     }
     vlc_mutex_unlock( &p_item->lock );
     free( ppsz_allkey );
 
-    extraMetaTree->addTopLevelItems( items );
-    extraMetaTree->resizeColumnToContents( 0 );
+    extraMeta->addTopLevelItems( items );
+    extraMeta->resizeColumnToContents( 0 );
 }
 
 /**
@@ -459,7 +459,7 @@ void ExtraMetaPanel::update( input_item_t *p_item )
  **/
 void ExtraMetaPanel::clear()
 {
-    extraMetaTree->clear();
+    extraMeta->clear();
 }
 
 /**
diff --git a/modules/gui/qt/components/info_panels.hpp b/modules/gui/qt/components/info_panels.hpp
index 6f984daf3a..d0af544de4 100644
--- a/modules/gui/qt/components/info_panels.hpp
+++ b/modules/gui/qt/components/info_panels.hpp
@@ -103,7 +103,7 @@ class ExtraMetaPanel: public QWidget
 public:
     ExtraMetaPanel( QWidget * );
 private:
-    QTreeWidget *extraMetaTree;
+    QTreeWidget *extraMeta;
 public slots:
     void update( input_item_t * );
     void clear();
-- 
2.11.1



More information about the vlc-devel mailing list