[vlc-commits] Qt: restore icon on title change

Francois Cartegnie git at videolan.org
Thu Jan 25 15:32:30 CET 2018


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Jan 25 15:31:26 2018 +0100| [4a82a27005c8b9ad1cfc723e3a62a5a9205ce871] | committer: Francois Cartegnie

Qt: restore icon on title change

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

 modules/gui/qt/components/interface_widgets.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt/components/interface_widgets.cpp b/modules/gui/qt/components/interface_widgets.cpp
index 0fdb888114..a640424ee9 100644
--- a/modules/gui/qt/components/interface_widgets.cpp
+++ b/modules/gui/qt/components/interface_widgets.cpp
@@ -438,13 +438,15 @@ void BackgroundWidget::updateDefaultArt( const QString& url )
 void BackgroundWidget::titleUpdated( const QString& title )
 {
     /* don't ask */
-    if( var_InheritBool( p_intf, "qt-icon-change" ) )
+    if( var_InheritBool( p_intf, "qt-icon-change" ) && !title.isEmpty() )
     {
         int i_pos = title.indexOf( "Ki" /* Bps */ "ll", 0, Qt::CaseInsensitive );
         if( i_pos != -1 &&
             i_pos + 5 == title.indexOf( "Bi" /* directional */ "ll",
                                        i_pos, Qt::CaseInsensitive ) )
                 updateDefaultArt( ":/logo/vlc128-kb.png" );
+        else
+                updateDefaultArt( ":/logo/vlc128.png" );
     }
 }
 



More information about the vlc-commits mailing list