From 175b37db711e5174003f6a6fa4fd26174deb8881 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Kempf Date: Mon, 9 May 2011 11:33:13 +0200 Subject: [PATCH] Qt: fix build with --disable-media-library Sorry for the problem. --- modules/gui/qt4/components/playlist/playlist.cpp | 4 ++++ modules/gui/qt4/components/playlist/standardpanel.cpp | 4 ++++ modules/gui/qt4/components/simple_preferences.cpp | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/modules/gui/qt4/components/playlist/playlist.cpp b/modules/gui/qt4/components/playlist/playlist.cpp index e8ec88293c..fd46068ff2 100644 --- a/modules/gui/qt4/components/playlist/playlist.cpp +++ b/modules/gui/qt4/components/playlist/playlist.cpp @@ -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 ); diff --git a/modules/gui/qt4/components/playlist/standardpanel.cpp b/modules/gui/qt4/components/playlist/standardpanel.cpp index aab6879171..6480025bac 100644 --- a/modules/gui/qt4/components/playlist/standardpanel.cpp +++ b/modules/gui/qt4/components/playlist/standardpanel.cpp @@ -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 ) diff --git a/modules/gui/qt4/components/simple_preferences.cpp b/modules/gui/qt4/components/simple_preferences.cpp index f923866a5a..fa13b1db8a 100644 --- a/modules/gui/qt4/components/simple_preferences.cpp +++ b/modules/gui/qt4/components/simple_preferences.cpp @@ -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 -- 2.11.4.GIT