[vlc-commits] Qt: remember correctly the network list

Jean-Baptiste Kempf git at videolan.org
Tue Feb 28 23:41:17 CET 2012


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Feb 28 23:40:27 2012 +0100| [cba6de799bbe8583a88e00a71a277210a0b2acce] | committer: Jean-Baptiste Kempf

Qt: remember correctly the network list

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

 modules/gui/qt4/components/open_panels.cpp |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/modules/gui/qt4/components/open_panels.cpp b/modules/gui/qt4/components/open_panels.cpp
index a200938..d17906d 100644
--- a/modules/gui/qt4/components/open_panels.cpp
+++ b/modules/gui/qt4/components/open_panels.cpp
@@ -609,12 +609,19 @@ NetOpenPanel::~NetOpenPanel()
     /* Create the list with the current items */
     QStringList mrlList;
     for( int i = 0; i < ui.urlComboBox->count(); i++ )
+    {
         mrlList << ui.urlComboBox->itemText( i );
+        msg_Err( p_intf, "%s" , qtu( ui.urlComboBox->itemText( i ) ) );
+
+    }
 
-    /* Clean the list... */
-    mrlList.removeDuplicates();
-    /* ...and save the 8 last entries */
-    getSettings()->setValue( "OpenDialog/netMRL", mrlList );
+    if( mrlList.count() > 0 )
+    {
+        /* Clean the list... */
+        mrlList.removeDuplicates();
+        /* ...and save the 8 last entries */
+        getSettings()->setValue( "OpenDialog/netMRL", mrlList );
+    }
 }
 
 void NetOpenPanel::clear()



More information about the vlc-commits mailing list