]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/menus.cpp
Workaround for Qt bug #176201 (affect only Qt 4.5.0)
[vlc] / 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 - ") );