Commit c78769e4 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt/EPG: use a qgraphicsitem_cast instead of dynamic_cast

(cherry picked from commit a8c86004)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 2ed48d53
......@@ -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() );
......
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