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