From 14c39b80db95ed92244da1ac9c8b69a1ee6cb696 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Kempf Date: Sat, 14 May 2011 13:32:56 +0200 Subject: [PATCH] Qt: fix a warning in the playlist models --- modules/gui/qt4/components/playlist/vlc_model.hpp | 52 ++++++++++++----------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/modules/gui/qt4/components/playlist/vlc_model.hpp b/modules/gui/qt4/components/playlist/vlc_model.hpp index 520a1bd6a3..4506169278 100644 --- a/modules/gui/qt4/components/playlist/vlc_model.hpp +++ b/modules/gui/qt4/components/playlist/vlc_model.hpp @@ -59,39 +59,41 @@ public: static QString getMeta( const QModelIndex & index, int meta ); static QPixmap getArtPixmap( const QModelIndex & index, const QSize & size ); -public slots: - virtual void activateItem( const QModelIndex &index ) = 0; + static int columnToMeta( int _column ) + { + int meta = 1; + int column = 0; -protected: - intf_thread_t *p_intf; -}; + while( column != _column && meta != COLUMN_END ) + { + meta <<= 1; + column++; + } -static int columnToMeta( int _column ) -{ - int meta = 1; - int column = 0; + return meta; + } - while( column != _column && meta != COLUMN_END ) + static int columnFromMeta( int meta_col ) { - meta <<= 1; - column++; + int meta = 1; + int column = 0; + + while( meta != meta_col && meta != COLUMN_END ) + { + meta <<= 1; + column++; + } + + return column; } - return meta; -} +public slots: + virtual void activateItem( const QModelIndex &index ) = 0; -static int columnFromMeta( int meta_col ) -{ - int meta = 1; - int column = 0; +protected: + intf_thread_t *p_intf; - while( meta != meta_col && meta != COLUMN_END ) - { - meta <<= 1; - column++; - } +}; - return column; -} #endif -- 2.11.4.GIT