From: Ludovic Fauvet Date: Mon, 30 Mar 2009 22:17:51 +0000 (+0200) Subject: Workaround for Qt bug #176201 (affect only Qt 4.5.0) X-Git-Tag: 1.0.0-pre2~322 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=059438ecccb5503ef26853dd8a9ffdd87dd5afb6;p=vlc Workaround for Qt bug #176201 (affect only Qt 4.5.0) Signed-off-by: Jean-Baptiste Kempf --- diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp index d9231d9160..7ba3f3a8a7 100644 --- a/modules/gui/qt4/menus.cpp +++ b/modules/gui/qt4/menus.cpp @@ -1393,7 +1393,15 @@ void QVLCMenu::updateRecents( intf_thread_t *p_intf ) RecentsMRL* rmrl = RecentsMRL::getInstance( p_intf ); QList l = rmrl->recents(); +#if QT_VERSION == 0x040500 + //Workaround for Qt bug #176201 + QList 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 - ") );