[vlc-commits] Qt: fix build with --disable-media-library

Jean-Baptiste Kempf git at videolan.org
Mon May 9 11:33:40 CEST 2011


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon May  9 11:33:13 2011 +0200| [175b37db711e5174003f6a6fa4fd26174deb8881] | committer: Jean-Baptiste Kempf

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

Sorry for the problem.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=175b37db711e5174003f6a6fa4fd26174deb8881
---

 modules/gui/qt4/components/playlist/playlist.cpp   |    4 ++++
 .../gui/qt4/components/playlist/standardpanel.cpp  |    4 ++++
 modules/gui/qt4/components/simple_preferences.cpp  |    4 ++++
 3 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/modules/gui/qt4/components/playlist/playlist.cpp b/modules/gui/qt4/components/playlist/playlist.cpp
index e8ec882..fd46068 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 aab6879..6480025 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 f923866..fa13b1d 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



More information about the vlc-commits mailing list