]> git.sesse.net Git - vlc/commitdiff
Qt/EPG: fix start and end program displaying.
authorAdrien Maglo <magsoft@videolan.org>
Thu, 17 Jun 2010 19:50:05 +0000 (21:50 +0200)
committerAdrien Maglo <magsoft@videolan.org>
Thu, 17 Jun 2010 19:50:36 +0000 (21:50 +0200)
My fault: addSecs() call was modifying the item start time ...

modules/gui/qt4/components/epg/EPGItem.cpp

index 39dbea5153f799f3ae3081f6b59842170ed3cbff..4e24e5864217562f4a3089e0a2d1df733ec7da96 100644 (file)
@@ -85,7 +85,9 @@ void EPGItem::paint( QPainter *painter, const QStyleOptionGraphicsItem*, QWidget
     painter->drawText( mapped, Qt::AlignTop | Qt::AlignLeft, fm.elidedText( m_name, Qt::ElideRight, mapped.width() ) );
 
     mapped.adjust( 0, 20, 0, 0 );
-    QDateTime m_end = m_start.addSecs( m_duration );
+
+    QDateTime m_end = m_start;
+    m_end.addSecs( m_duration );
     f.setPixelSize( 10 );
     f.setItalic( true );
     painter->setFont( f );