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

Qt/EPG: use a qgraphicsitem_cast instead of dynamic_cast

parent a5909adc
...@@ -60,11 +60,7 @@ void EPGView::setStartTime( const QDateTime& startTime ) ...@@ -60,11 +60,7 @@ void EPGView::setStartTime( const QDateTime& startTime )
for ( int i = 0; i < itemList.count(); ++i ) for ( int i = 0; i < itemList.count(); ++i )
{ {
#ifndef WIN32 EPGItem* item = qgraphicsitem_cast<EPGItem*>( itemList.at( i ) );
EPGItem* item = dynamic_cast<EPGItem*>( itemList.at( i ) );
#else
EPGItem *item = NULL;
#endif
if ( !item ) continue; if ( !item ) continue;
item->setStart( item->start().addSecs( diff ) ); item->setStart( item->start().addSecs( diff ) );
} }
...@@ -114,11 +110,7 @@ void EPGView::updateDuration() ...@@ -114,11 +110,7 @@ void EPGView::updateDuration()
for ( int i = 0; i < list.count(); ++i ) for ( int i = 0; i < list.count(); ++i )
{ {
#ifndef WIN32 EPGItem* item = qgraphicsitem_cast<EPGItem*>( list.at( i ) );
EPGItem* item = dynamic_cast<EPGItem*>( list.at( i ) );
#else
EPGItem *item = NULL;
#endif
if ( !item ) continue; if ( !item ) continue;
QDateTime itemEnd = item->start().addSecs( item->duration() ); 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