[vlc-devel] commit: [qt4/recents] Remove dependency on qt4.4 for QList::removeOne() ( David Flynn )
git version control
git at videolan.org
Sun Oct 26 17:37:00 CET 2008
vlc | branch: master | David Flynn <davidf at rd.bbc.co.uk> | Sun Oct 26 17:33:14 2008 +0100| [1a78a1572777a17318146421d2a60b7db2474088] | committer: Rémi Duraffort
[qt4/recents] Remove dependency on qt4.4 for QList::removeOne()
Signed-off-by: Rémi Duraffort <ivoire at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1a78a1572777a17318146421d2a60b7db2474088
---
modules/gui/qt4/recents.cpp | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/modules/gui/qt4/recents.cpp b/modules/gui/qt4/recents.cpp
index b1bbf85..46a1fa0 100644
--- a/modules/gui/qt4/recents.cpp
+++ b/modules/gui/qt4/recents.cpp
@@ -63,10 +63,11 @@ void RecentsMRL::addRecent( const QString &mrl )
return;
msg_Dbg( p_intf, "Adding a new MRL to recent ones: %s", qtu( mrl ) );
- if( stack->contains( mrl ) )
+ int i_index = stack->indexOf( mrl );
+ if( 0 <= i_index )
{
- stack->removeOne( mrl );
- stack->prepend( mrl );
+ /* move to the front */
+ stack->move( i_index, 0 );
}
else
{
More information about the vlc-devel
mailing list