[vlc-commits] commit: Qt4: enable all messages only if filter is empty (Ilkka Ollakka )

git at videolan.org git at videolan.org
Fri Jul 9 15:24:47 CEST 2010


vlc/vlc-1.1 | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Fri Jul  9 11:48:50 2010 +0300| [cdbe234456f23580f3ffb4a5cc29bee74c28ade6] | committer: Ilkka Ollakka 

Qt4: enable all messages only if filter is empty
(cherry picked from commit eadba593a3010168598a4395fceecd392f8469c5)

Signed-off-by: Ilkka Ollakka <ileoo at videolan.org>

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

 modules/gui/qt4/dialogs/messages.cpp |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/modules/gui/qt4/dialogs/messages.cpp b/modules/gui/qt4/dialogs/messages.cpp
index 3558aa2..a8d1e95 100644
--- a/modules/gui/qt4/dialogs/messages.cpp
+++ b/modules/gui/qt4/dialogs/messages.cpp
@@ -195,10 +195,9 @@ void MessagesDialog::updateConfig()
     config_PutPsz(p_intf, "verbose-objects", qtu(vbobjectsEdit->text()));
     //vbobjectsEdit->setText("vbEdit changed!");
 
-    char * psz_verbose_objects = strdup(qtu(vbobjectsEdit->text()));
-    msg_EnableObjectPrinting(p_intf, "all");
-    if( psz_verbose_objects )
+    if( !vbobjectsEdit->text().isEmpty() )
     {
+        char * psz_verbose_objects = strdup(qtu(vbobjectsEdit->text()));
         char * psz_object, * iter =  psz_verbose_objects;
         while( (psz_object = strsep( &iter, "," )) )
         {
@@ -211,6 +210,10 @@ void MessagesDialog::updateConfig()
         }
         free( psz_verbose_objects );
     }
+    else
+    {
+        msg_EnableObjectPrinting( p_intf, "all");
+    }
 }
 
 void MessagesDialog::sinkMessage( msg_item_t *item )



More information about the vlc-commits mailing list