[vlc-commits] commit: Qt/EPG: use a qgraphicsitem_cast instead of dynamic_cast ( Jean-Baptiste Kempf )
git at videolan.org
git at videolan.org
Thu Jun 17 12:20:56 CEST 2010
vlc/vlc-1.1 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Jun 16 21:53:36 2010 +0200| [c78769e4f9b00cff30f4bbec6c53ccfcde50d3b1] | committer: Jean-Baptiste Kempf
Qt/EPG: use a qgraphicsitem_cast instead of dynamic_cast
(cherry picked from commit a8c86004499bed7014dfbdbe188a113759f7e340)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=c78769e4f9b00cff30f4bbec6c53ccfcde50d3b1
---
modules/gui/qt4/components/epg/EPGView.cpp | 12 ++----------
1 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/modules/gui/qt4/components/epg/EPGView.cpp b/modules/gui/qt4/components/epg/EPGView.cpp
index ea32110..5a8da87 100644
--- a/modules/gui/qt4/components/epg/EPGView.cpp
+++ b/modules/gui/qt4/components/epg/EPGView.cpp
@@ -60,11 +60,7 @@ void EPGView::setStartTime( const QDateTime& startTime )
for ( int i = 0; i < itemList.count(); ++i )
{
-#ifndef WIN32
- EPGItem* item = dynamic_cast<EPGItem*>( itemList.at( i ) );
-#else
- EPGItem *item = NULL;
-#endif
+ EPGItem* item = qgraphicsitem_cast<EPGItem*>( itemList.at( i ) );
if ( !item ) continue;
item->setStart( item->start().addSecs( diff ) );
}
@@ -114,11 +110,7 @@ void EPGView::updateDuration()
for ( int i = 0; i < list.count(); ++i )
{
-#ifndef WIN32
- EPGItem* item = dynamic_cast<EPGItem*>( list.at( i ) );
-#else
- EPGItem *item = NULL;
-#endif
+ EPGItem* item = qgraphicsitem_cast<EPGItem*>( list.at( i ) );
if ( !item ) continue;
QDateTime itemEnd = item->start().addSecs( item->duration() );
More information about the vlc-commits
mailing list