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,
intf_thread_t* _p_intf,
ml_media_t *p_media,
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 )
ml_gc_incref( p_media );
......
......@@ -74,10 +74,10 @@ public:
private:
ml_media_t* media;
intf_thread_t* p_intf;
const MLModel *model;
media_library_t* p_ml;
QList< MLItem* > children;
MLItem *parentItem;
const MLModel *model;
};
#endif
......
......@@ -193,8 +193,9 @@ bool MLModel::isEditable( const QModelIndex &index ) const
case ML_VOTE:
case ML_YEAR:
return true;
default:
return false;
}
return false;
}
QMimeData* MLModel::mimeData( const QModelIndexList &indexes ) const
......@@ -261,6 +262,7 @@ int MLModel::getId( QModelIndex index ) const
QVariant MLModel::data( const QModelIndex &index, int role ) const
{
if( index.isValid() )
{
if( role == Qt::DisplayRole || role == Qt::EditRole )
{
MLItem *it = static_cast<MLItem*>( index.internalPointer() );
......@@ -272,6 +274,7 @@ QVariant MLModel::data( const QModelIndex &index, int role ) const
return QVariant( true );
else if( role == VLCModel::IsCurrentsParentNodeRole )
return QVariant( false );
}
return QVariant();
}
......
......@@ -377,7 +377,7 @@ QSize LocationBar::sizeHint() const
LocationButton::LocationButton( const QString &text, bool bold,
bool arrow, QWidget * parent )
: b_arrow( arrow ), QPushButton( parent )
: QPushButton( parent ), b_arrow( arrow )
{
QFont font;
font.setBold( bold );
......
......@@ -195,7 +195,7 @@ void PLSelector::createItems()
ml->treeItem()->setData( 0, SPECIAL_ROLE, QVariant( IS_ML ) );
/* SQL ML */
QTreeWidgetItem *sql_ml = addItem( SQL_ML_TYPE, "SQL Media Library" )->treeItem();
addItem( SQL_ML_TYPE, "SQL Media Library" )->treeItem();
/* SD nodes */
QTreeWidgetItem *mycomp = addItem( CATEGORY_TYPE, N_("My Computer") )->treeItem();
......
......@@ -57,9 +57,11 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
PLSelector *_p_selector,
PLModel *_p_model,
MLModel *_p_plmodel)
: QWidget( _parent ), p_intf( _p_intf ),
p_selector( _p_selector ), model( _p_model ),
mlmodel( _p_plmodel)
: QWidget( _parent ),
model( _p_model ),
mlmodel( _p_plmodel),
p_intf( _p_intf ),
p_selector( _p_selector )
{
viewStack = new QStackedLayout( this );
viewStack->setSpacing( 0 ); viewStack->setMargin( 0 );
......@@ -401,7 +403,7 @@ void StandardPLPanel::showView( int i_view )
gotoPlayingItem();
}
const int StandardPLPanel::currentViewIndex()
int StandardPLPanel::currentViewIndex() const
{
if( currentView == treeView )
return TREE_VIEW;
......
......@@ -68,14 +68,13 @@ public:
PICTUREFLOW_VIEW,
VIEW_COUNT };
const int currentViewIndex();
int currentViewIndex() const;
protected:
PLModel *model;
MLModel *mlmodel;
virtual void wheelEvent( QWheelEvent *e );
private:
intf_thread_t *p_intf;
......
......@@ -24,7 +24,7 @@
#include "vlc_model.hpp"
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 * )
}
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 )
......
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