Commit b6fa76ea authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: kill a bunch of warnings

parent e6a21a3c
...@@ -87,7 +87,7 @@ MLItem::MLItem( const MLModel *p_model, ...@@ -87,7 +87,7 @@ MLItem::MLItem( const MLModel *p_model,
intf_thread_t* _p_intf, intf_thread_t* _p_intf,
ml_media_t *p_media, ml_media_t *p_media,
MLItem *p_parent ) MLItem *p_parent )
: model( p_model ), children(), parentItem( p_parent ), p_intf( _p_intf ) : p_intf( _p_intf ), model( p_model ), children(), parentItem( p_parent )
{ {
if( p_media ) if( p_media )
ml_gc_incref( p_media ); ml_gc_incref( p_media );
......
...@@ -74,10 +74,10 @@ public: ...@@ -74,10 +74,10 @@ public:
private: private:
ml_media_t* media; ml_media_t* media;
intf_thread_t* p_intf; intf_thread_t* p_intf;
const MLModel *model;
media_library_t* p_ml; media_library_t* p_ml;
QList< MLItem* > children; QList< MLItem* > children;
MLItem *parentItem; MLItem *parentItem;
const MLModel *model;
}; };
#endif #endif
......
...@@ -193,8 +193,9 @@ bool MLModel::isEditable( const QModelIndex &index ) const ...@@ -193,8 +193,9 @@ bool MLModel::isEditable( const QModelIndex &index ) const
case ML_VOTE: case ML_VOTE:
case ML_YEAR: case ML_YEAR:
return true; return true;
default:
return false;
} }
return false;
} }
QMimeData* MLModel::mimeData( const QModelIndexList &indexes ) const QMimeData* MLModel::mimeData( const QModelIndexList &indexes ) const
...@@ -261,6 +262,7 @@ int MLModel::getId( QModelIndex index ) const ...@@ -261,6 +262,7 @@ int MLModel::getId( QModelIndex index ) const
QVariant MLModel::data( const QModelIndex &index, int role ) const QVariant MLModel::data( const QModelIndex &index, int role ) const
{ {
if( index.isValid() ) if( index.isValid() )
{
if( role == Qt::DisplayRole || role == Qt::EditRole ) if( role == Qt::DisplayRole || role == Qt::EditRole )
{ {
MLItem *it = static_cast<MLItem*>( index.internalPointer() ); MLItem *it = static_cast<MLItem*>( index.internalPointer() );
...@@ -272,6 +274,7 @@ QVariant MLModel::data( const QModelIndex &index, int role ) const ...@@ -272,6 +274,7 @@ QVariant MLModel::data( const QModelIndex &index, int role ) const
return QVariant( true ); return QVariant( true );
else if( role == VLCModel::IsCurrentsParentNodeRole ) else if( role == VLCModel::IsCurrentsParentNodeRole )
return QVariant( false ); return QVariant( false );
}
return QVariant(); return QVariant();
} }
......
...@@ -377,7 +377,7 @@ QSize LocationBar::sizeHint() const ...@@ -377,7 +377,7 @@ QSize LocationBar::sizeHint() const
LocationButton::LocationButton( const QString &text, bool bold, LocationButton::LocationButton( const QString &text, bool bold,
bool arrow, QWidget * parent ) bool arrow, QWidget * parent )
: b_arrow( arrow ), QPushButton( parent ) : QPushButton( parent ), b_arrow( arrow )
{ {
QFont font; QFont font;
font.setBold( bold ); font.setBold( bold );
......
...@@ -195,7 +195,7 @@ void PLSelector::createItems() ...@@ -195,7 +195,7 @@ void PLSelector::createItems()
ml->treeItem()->setData( 0, SPECIAL_ROLE, QVariant( IS_ML ) ); ml->treeItem()->setData( 0, SPECIAL_ROLE, QVariant( IS_ML ) );
/* SQL ML */ /* SQL ML */
QTreeWidgetItem *sql_ml = addItem( SQL_ML_TYPE, "SQL Media Library" )->treeItem(); addItem( SQL_ML_TYPE, "SQL Media Library" )->treeItem();
/* SD nodes */ /* SD nodes */
QTreeWidgetItem *mycomp = addItem( CATEGORY_TYPE, N_("My Computer") )->treeItem(); QTreeWidgetItem *mycomp = addItem( CATEGORY_TYPE, N_("My Computer") )->treeItem();
......
...@@ -57,9 +57,11 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent, ...@@ -57,9 +57,11 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
PLSelector *_p_selector, PLSelector *_p_selector,
PLModel *_p_model, PLModel *_p_model,
MLModel *_p_plmodel) MLModel *_p_plmodel)
: QWidget( _parent ), p_intf( _p_intf ), : QWidget( _parent ),
p_selector( _p_selector ), model( _p_model ), model( _p_model ),
mlmodel( _p_plmodel) mlmodel( _p_plmodel),
p_intf( _p_intf ),
p_selector( _p_selector )
{ {
viewStack = new QStackedLayout( this ); viewStack = new QStackedLayout( this );
viewStack->setSpacing( 0 ); viewStack->setMargin( 0 ); viewStack->setSpacing( 0 ); viewStack->setMargin( 0 );
...@@ -401,7 +403,7 @@ void StandardPLPanel::showView( int i_view ) ...@@ -401,7 +403,7 @@ void StandardPLPanel::showView( int i_view )
gotoPlayingItem(); gotoPlayingItem();
} }
const int StandardPLPanel::currentViewIndex() int StandardPLPanel::currentViewIndex() const
{ {
if( currentView == treeView ) if( currentView == treeView )
return TREE_VIEW; return TREE_VIEW;
......
...@@ -68,14 +68,13 @@ public: ...@@ -68,14 +68,13 @@ public:
PICTUREFLOW_VIEW, PICTUREFLOW_VIEW,
VIEW_COUNT }; VIEW_COUNT };
const int currentViewIndex(); int currentViewIndex() const;
protected: protected:
PLModel *model; PLModel *model;
MLModel *mlmodel; MLModel *mlmodel;
virtual void wheelEvent( QWheelEvent *e ); virtual void wheelEvent( QWheelEvent *e );
private: private:
intf_thread_t *p_intf; intf_thread_t *p_intf;
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include "vlc_model.hpp" #include "vlc_model.hpp"
VLCModel::VLCModel( intf_thread_t *_p_intf, QObject *parent ) VLCModel::VLCModel( intf_thread_t *_p_intf, QObject *parent )
: p_intf(_p_intf), QAbstractItemModel( parent ) : QAbstractItemModel( parent ), p_intf(_p_intf)
{ {
} }
......
...@@ -54,7 +54,7 @@ void QFramelessButton::paintEvent( QPaintEvent * ) ...@@ -54,7 +54,7 @@ void QFramelessButton::paintEvent( QPaintEvent * )
} }
QElidingLabel::QElidingLabel( const QString &s, Qt::TextElideMode mode, QWidget * parent ) QElidingLabel::QElidingLabel( const QString &s, Qt::TextElideMode mode, QWidget * parent )
: elideMode( mode ), QLabel( s, parent ) : QLabel( s, parent ), elideMode( mode )
{ } { }
void QElidingLabel::setElideMode( Qt::TextElideMode mode ) void QElidingLabel::setElideMode( Qt::TextElideMode mode )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment