[vlc-commits] gui/qt: rename ExtraMetaPanel::extraMetaTree to extraMeta

Filip Roséen git at videolan.org
Sat Feb 25 15:22:14 CET 2017


vlc | branch: master | Filip Roséen <filip at atch.se> | Sat Feb 25 07:36:15 2017 +0100| [60973aadbb2609fbfb6d8ee360d76360a8a8b8b4] | committer: Jean-Baptiste Kempf

gui/qt: rename ExtraMetaPanel::extraMetaTree to extraMeta

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.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=60973aadbb2609fbfb6d8ee360d76360a8a8b8b4
---

 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 b771eb6..340e524 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 6f984da..d0af544 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();



More information about the vlc-commits mailing list