[vlc-commits] commit: Qt/EPG: Fix event deletion. (Adrien Maglo )

git at videolan.org git at videolan.org
Thu Jul 29 11:38:43 CEST 2010


vlc/vlc-1.1 | branch: master | Adrien Maglo <magsoft at videolan.org> | Wed Jul 28 21:33:14 2010 +0200| [0f3f3d980abc4bcbed13975e38c51da58e9ef3b1] | committer: Jean-Baptiste Kempf 

Qt/EPG: Fix event deletion.
(cherry picked from commit c0dccd6f57da1f9a832aea1402c24c3c33c0da98)

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

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=0f3f3d980abc4bcbed13975e38c51da58e9ef3b1
---

 modules/gui/qt4/components/epg/EPGWidget.cpp |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt4/components/epg/EPGWidget.cpp b/modules/gui/qt4/components/epg/EPGWidget.cpp
index 948b83c..3bc91ac 100644
--- a/modules/gui/qt4/components/epg/EPGWidget.cpp
+++ b/modules/gui/qt4/components/epg/EPGWidget.cpp
@@ -116,7 +116,7 @@ void EPGWidget::updateEPG( vlc_epg_t **pp_epg, int i_epg )
     }
 
     // Remove old items
-    QMap<QString, EPGEvent*>::iterator i = m_events.begin();
+    QMultiMap<QString, EPGEvent*>::iterator i = m_events.begin();
     while ( i != m_events.end() )
     {
         EPGEvent* item = i.value();
@@ -124,7 +124,8 @@ void EPGWidget::updateEPG( vlc_epg_t **pp_epg, int i_epg )
         {
             m_epgView->delEvent( item );
             delete item;
-            i = m_events.erase( i );
+            i--;
+            m_events.erase( i + 1 );
         }
         else
             item->updated = false;
@@ -135,5 +136,7 @@ void EPGWidget::updateEPG( vlc_epg_t **pp_epg, int i_epg )
     // Update the global duration and start time.
     m_epgView->updateDuration();
     m_epgView->updateStartTime();
+    // Udate the channel list.
+    m_channelsWidget->update();
 }
 



More information about the vlc-commits mailing list