Commit 175b37db authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: fix build with --disable-media-library

Sorry for the problem.
parent 6296dd70
...@@ -94,8 +94,12 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QWidget *_par ) ...@@ -94,8 +94,12 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QWidget *_par )
setMinimumWidth( 400 ); setMinimumWidth( 400 );
PLModel *model = new PLModel( p_playlist, p_intf, p_root, this ); PLModel *model = new PLModel( p_playlist, p_intf, p_root, this );
#ifdef MEDIA_LIBRARY
MLModel *mlmodel = new MLModel( p_intf, this ); MLModel *mlmodel = new MLModel( p_intf, this );
mainView = new StandardPLPanel( this, p_intf, p_root, selector, model, mlmodel ); mainView = new StandardPLPanel( this, p_intf, p_root, selector, model, mlmodel );
#else
mainView = new StandardPLPanel( this, p_intf, p_root, selector, model, NULL );
#endif
/* Location Bar */ /* Location Bar */
locationBar = new LocationBar( model ); locationBar = new LocationBar( model );
......
...@@ -195,12 +195,14 @@ void StandardPLPanel::searchDelayed( const QString& searchText ) ...@@ -195,12 +195,14 @@ void StandardPLPanel::searchDelayed( const QString& searchText )
/* This activated by the selector selection */ /* This activated by the selector selection */
void StandardPLPanel::setRoot( playlist_item_t *p_item, bool b ) void StandardPLPanel::setRoot( playlist_item_t *p_item, bool b )
{ {
#ifdef MEDIA_LIBRARY
if( b ) if( b )
{ {
msg_Dbg( p_intf, "Setting the SQL ML" ); msg_Dbg( p_intf, "Setting the SQL ML" );
currentView->setModel( mlmodel ); currentView->setModel( mlmodel );
} }
else else
#endif
{ {
msg_Dbg( p_intf, "Normal PL/ML or SD" ); msg_Dbg( p_intf, "Normal PL/ML or SD" );
if( currentView->model() != model ) if( currentView->model() != model )
...@@ -354,6 +356,7 @@ void StandardPLPanel::createTreeView() ...@@ -354,6 +356,7 @@ void StandardPLPanel::createTreeView()
void StandardPLPanel::changeModel( bool b_ml ) void StandardPLPanel::changeModel( bool b_ml )
{ {
#ifdef MEDIA_LIBRARY
VLCModel *mod; VLCModel *mod;
if( b_ml ) if( b_ml )
mod = mlmodel; mod = mlmodel;
...@@ -361,6 +364,7 @@ void StandardPLPanel::changeModel( bool b_ml ) ...@@ -361,6 +364,7 @@ void StandardPLPanel::changeModel( bool b_ml )
mod = model; mod = model;
if( currentView->model() != mod ) if( currentView->model() != mod )
currentView->setModel( mod ); currentView->setModel( mod );
#endif
} }
void StandardPLPanel::showView( int i_view ) void StandardPLPanel::showView( int i_view )
......
...@@ -549,7 +549,9 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, ...@@ -549,7 +549,9 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
ui.assoButton->hide(); ui.assoButton->hide();
ui.assocLabel->hide(); ui.assocLabel->hide();
#endif #endif
#ifdef MEDIA_LIBRARY
BUTTONACT( ui.sqlMLbtn, configML() ); BUTTONACT( ui.sqlMLbtn, configML() );
#endif
/* interface */ /* interface */
char *psz_intf = config_GetPsz( p_intf, "intf" ); char *psz_intf = config_GetPsz( p_intf, "intf" );
...@@ -891,9 +893,11 @@ void SPrefsPanel::changeStyle( QString s_style ) ...@@ -891,9 +893,11 @@ void SPrefsPanel::changeStyle( QString s_style )
void SPrefsPanel::configML() void SPrefsPanel::configML()
{ {
#ifdef MEDIA_LIBRARY
MLConfDialog *mld = new MLConfDialog( this, p_intf ); MLConfDialog *mld = new MLConfDialog( this, p_intf );
mld->exec(); mld->exec();
delete mld; delete mld;
#endif
} }
#ifdef WIN32 #ifdef WIN32
......
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