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

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


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

Qt: remember correctly the network list
(cherry picked from commit cba6de799bbe8583a88e00a71a277210a0b2acce)

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

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

 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 dc1f9e6..a90580d 100644
--- a/modules/gui/qt4/components/open_panels.cpp
+++ b/modules/gui/qt4/components/open_panels.cpp
@@ -611,12 +611,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