]> git.sesse.net Git - vlc/commitdiff
Workaround for Qt bug #176201 (affect only Qt 4.5.0)
authorLudovic Fauvet <etix@l0cal.com>
Mon, 30 Mar 2009 22:17:51 +0000 (00:17 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 30 Mar 2009 23:04:34 +0000 (01:04 +0200)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/gui/qt4/menus.cpp

index d9231d9160b3e8420d8a461605f90dd8f2fd80d3..7ba3f3a8a7d1e432c36ae405579cde598f23f654 100644 (file)
@@ -1393,7 +1393,15 @@ void QVLCMenu::updateRecents( intf_thread_t *p_intf )
         RecentsMRL* rmrl = RecentsMRL::getInstance( p_intf );
         QList<QString> l = rmrl->recents();
 
+#if QT_VERSION == 0x040500
+        //Workaround for Qt bug #176201
+        QList<QAction*> actions = recentsMenu->actions();
+        for(int i = 0; i < actions.size(); ++i)
+            actions.at(i)->deleteLater();
+#else
         recentsMenu->clear();
+#endif
+
         if( !l.size() )
         {
             action = recentsMenu->addAction( qtr(" - Empty - ") );