[vlc-commits] commit: i18n: Factorise qtr() and fix nodes i18n (Christophe Mutricy )

git at videolan.org git at videolan.org
Fri Apr 30 01:25:46 CEST 2010


vlc/vlc-1.1 | branch: master | Christophe Mutricy <xtophe at videolan.org> | Tue Apr 27 23:06:55 2010 +0100| [c26046b063630625235d52e42e47870d52bfa9a0] | committer: Christophe Mutricy 

i18n: Factorise qtr() and fix nodes i18n
(cherry picked from commit b5617204caa9c886924025f5467e25798d432393)

Signed-off-by: Christophe Mutricy <xtophe at videolan.org>

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

 modules/gui/qt4/components/playlist/selector.cpp |   20 ++++++++++----------
 modules/gui/qt4/components/playlist/selector.hpp |    2 +-
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/modules/gui/qt4/components/playlist/selector.cpp b/modules/gui/qt4/components/playlist/selector.cpp
index 25e92aa..68e0d6b 100644
--- a/modules/gui/qt4/components/playlist/selector.cpp
+++ b/modules/gui/qt4/components/playlist/selector.cpp
@@ -211,12 +211,12 @@ void PLSelector::setSource( QTreeWidgetItem *item )
 }
 
 PLSelItem * PLSelector::addItem (
-  SelectorItemType type, const QString& str, bool drop,
+  SelectorItemType type, const char* str, bool drop,
   QTreeWidgetItem* parentItem )
 {
   QTreeWidgetItem *item = parentItem ?
       new QTreeWidgetItem( parentItem ) : new QTreeWidgetItem( this );
-  PLSelItem *selItem = new PLSelItem( item, str );
+  PLSelItem *selItem = new PLSelItem( item, qtr( str ) );
   setItemWidget( item, 0, selItem );
   item->setData( 0, TYPE_ROLE, (int)type );
   if( !drop ) item->setFlags( item->flags() & ~Qt::ItemIsDropEnabled );
@@ -244,7 +244,7 @@ PLSelItem *PLSelector::addPodcastItem( playlist_item_t *p_item )
     vlc_gc_incref( p_item->p_input );
     char *psz_name = input_item_GetName( p_item->p_input );
     PLSelItem *item = addItem(
-            PL_ITEM_TYPE, qfu( psz_name ), false, podcastsParent );
+            PL_ITEM_TYPE,  psz_name, false, podcastsParent );
     item->addAction( RM_ACTION, qtr( "Remove this podcast subscription" ) );
     item->treeItem()->setData( 0, PL_ITEM_ROLE, QVariant::fromValue( p_item ) );
     item->treeItem()->setData( 0, PL_ITEM_ID_ROLE, QVariant(p_item->i_id) );
@@ -256,21 +256,21 @@ PLSelItem *PLSelector::addPodcastItem( playlist_item_t *p_item )
 
 void PLSelector::createItems()
 {
-    PLSelItem *pl = putPLData( addItem( PL_ITEM_TYPE, qtr( "Playlist" ), true ),
+    PLSelItem *pl = putPLData( addItem( PL_ITEM_TYPE, "Playlist", true ),
                               THEPL->p_playing );
     pl->treeItem()->setData( 0, SPECIAL_ROLE, QVariant( IS_PL ) );
 
-    PLSelItem *ml = putPLData( addItem( PL_ITEM_TYPE, qtr( "Media Library" ), true ),
+    PLSelItem *ml = putPLData( addItem( PL_ITEM_TYPE, "Media Library", true ),
                               THEPL->p_media_library );
     ml->treeItem()->setData( 0, SPECIAL_ROLE, QVariant( IS_ML ) );
 
-    QTreeWidgetItem *mycomp = addItem( CATEGORY_TYPE, qtr( "My Computer" ),
+    QTreeWidgetItem *mycomp = addItem( CATEGORY_TYPE, "My Computer",
                                         false )->treeItem();
-    QTreeWidgetItem *devices = addItem( CATEGORY_TYPE, qtr( "Devices" ),
+    QTreeWidgetItem *devices = addItem( CATEGORY_TYPE, "Devices",
                                         false )->treeItem();
-    QTreeWidgetItem *lan = addItem( CATEGORY_TYPE, qtr( "Local Network" ),
+    QTreeWidgetItem *lan = addItem( CATEGORY_TYPE, "Local Network",
                                     false )->treeItem();
-    QTreeWidgetItem *internet = addItem( CATEGORY_TYPE, qtr( "Internet" ),
+    QTreeWidgetItem *internet = addItem( CATEGORY_TYPE, "Internet",
                                           false )->treeItem();;
 
     char **ppsz_longnames;
@@ -314,7 +314,7 @@ void PLSelector::createItems()
         }
         else
         {
-            putSDData( addItem( SD_TYPE, qtr( *ppsz_longname ), false ),
+            putSDData( addItem( SD_TYPE, *ppsz_longname, false ),
                        *ppsz_name, *ppsz_longname );
         }
 
diff --git a/modules/gui/qt4/components/playlist/selector.hpp b/modules/gui/qt4/components/playlist/selector.hpp
index d982787..976e607 100644
--- a/modules/gui/qt4/components/playlist/selector.hpp
+++ b/modules/gui/qt4/components/playlist/selector.hpp
@@ -123,7 +123,7 @@ private:
     void createItems();
     void drawBranches ( QPainter *, const QRect &, const QModelIndex & ) const;
     PLSelItem * addItem (
-        SelectorItemType type, const QString& str, bool drop,
+        SelectorItemType type, const char* str, bool drop,
         QTreeWidgetItem* parentItem = 0 );
     PLSelItem * addPodcastItem( playlist_item_t *p_item );
     inline PLSelItem * itemWidget( QTreeWidgetItem * );



More information about the vlc-commits mailing list