[vlc-commits] qt4: dynamic_cast -> qobject_cast

Hugo Beauzée-Luyssen git at videolan.org
Tue Oct 18 12:26:55 CEST 2011


vlc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Mon Oct 17 18:48:15 2011 +0200| [11233c1ba089448bcb4ac55f9da06ccb0e95d6b3] | committer: Jean-Baptiste Kempf

qt4: dynamic_cast -> qobject_cast

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/gui/qt4/dialogs/open.cpp     |    8 ++++----
 modules/gui/qt4/util/pictureflow.cpp |    4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/modules/gui/qt4/dialogs/open.cpp b/modules/gui/qt4/dialogs/open.cpp
index f5b9892..aea65b9 100644
--- a/modules/gui/qt4/dialogs/open.cpp
+++ b/modules/gui/qt4/dialogs/open.cpp
@@ -245,7 +245,7 @@ void OpenDialog::showTab( int i_tab )
     show();
     if( ui.Tab->currentWidget() != NULL )
     {
-        OpenPanel *panel = dynamic_cast<OpenPanel *>( ui.Tab->currentWidget() );
+        OpenPanel *panel = qobject_cast<OpenPanel *>( ui.Tab->currentWidget() );
         assert( panel );
         panel->onFocus();
     }
@@ -285,7 +285,7 @@ void OpenDialog::signalCurrent( int i_tab )
     if( i_tab == OPEN_CAPTURE_TAB ) captureOpenPanel->initialize();
     if( ui.Tab->currentWidget() != NULL )
     {
-        OpenPanel *panel = dynamic_cast<OpenPanel *>( ui.Tab->currentWidget() );
+        OpenPanel *panel = qobject_cast<OpenPanel *>( ui.Tab->currentWidget() );
         assert( panel );
         panel->onFocus();
         panel->updateMRL();
@@ -300,7 +300,7 @@ void OpenDialog::cancel()
 {
     /* Clear the panels */
     for( int i = 0; i < OPEN_TAB_MAX; i++ )
-        dynamic_cast<OpenPanel*>( ui.Tab->widget( i ) )->clear();
+        qobject_cast<OpenPanel*>( ui.Tab->widget( i ) )->clear();
 
     /* Clear the variables */
     itemsMRL.clear();
@@ -359,7 +359,7 @@ void OpenDialog::enqueue( bool b_enqueue )
     }
 
     for( int i = 0; i < OPEN_TAB_MAX; i++ )
-        dynamic_cast<OpenPanel*>( ui.Tab->widget( i ) )->onAccept();
+        qobject_cast<OpenPanel*>( ui.Tab->widget( i ) )->onAccept();
 
     /* Sort alphabetically */
     itemsMRL.sort();
diff --git a/modules/gui/qt4/util/pictureflow.cpp b/modules/gui/qt4/util/pictureflow.cpp
index 7e946fb..6b51863 100644
--- a/modules/gui/qt4/util/pictureflow.cpp
+++ b/modules/gui/qt4/util/pictureflow.cpp
@@ -631,9 +631,9 @@ QRect PictureFlowSoftwareRenderer::renderSlide(const SlideInfo &slide, int col1,
 
     QString artURL;
 
-    PLModel* plm = dynamic_cast<PLModel*>( state->model );
+    PLModel* plm = qobject_cast<PLModel*>( state->model );
 #ifdef MEDIA_LIBRARY
-    MLModel* mlm = dynamic_cast<MLModel*>( state->model );
+    MLModel* mlm = qobject_cast<MLModel*>( state->model );
 #endif
     if( plm != 0 )
     {



More information about the vlc-commits mailing list