[vlc-commits] Qt: EPGItem: fix constness

Francois Cartegnie git at videolan.org
Thu Mar 28 16:53:06 CET 2013


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Mar 28 16:45:00 2013 +0100| [cdb42f5c39783270c810b13a6ac7db155b826001] | committer: Francois Cartegnie

Qt: EPGItem: fix constness

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

 modules/gui/qt4/components/epg/EPGItem.cpp |    4 ++--
 modules/gui/qt4/components/epg/EPGItem.hpp |    8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/modules/gui/qt4/components/epg/EPGItem.cpp b/modules/gui/qt4/components/epg/EPGItem.cpp
index 0de8149..f932c05 100644
--- a/modules/gui/qt4/components/epg/EPGItem.cpp
+++ b/modules/gui/qt4/components/epg/EPGItem.cpp
@@ -136,7 +136,7 @@ const QDateTime& EPGItem::start() const
     return m_start;
 }
 
-QDateTime EPGItem::end()
+QDateTime EPGItem::end() const
 {
     return QDateTime( m_start ).addSecs( m_duration );
 }
@@ -204,7 +204,7 @@ void EPGItem::setRating( uint8_t i_rating )
     m_rating = i_rating;
 }
 
-QString EPGItem::description()
+QString EPGItem::description() const
 {
     if( m_description.isEmpty() )
         return m_shortDescription;
diff --git a/modules/gui/qt4/components/epg/EPGItem.hpp b/modules/gui/qt4/components/epg/EPGItem.hpp
index 1a7895a..b4e1ea9 100644
--- a/modules/gui/qt4/components/epg/EPGItem.hpp
+++ b/modules/gui/qt4/components/epg/EPGItem.hpp
@@ -44,12 +44,12 @@ public:
     virtual void paint( QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0 );
 
     const QDateTime& start() const;
-    QDateTime end();
+    QDateTime end() const;
 
     int duration() const;
-    const QString& name() { return m_name; };
-    QString description();
-    int rating() { return m_rating; }
+    const QString& name() const { return m_name; }
+    QString description() const;
+    int rating() const { return m_rating; }
     bool setData( vlc_epg_event_t * );
     void setRow( unsigned int );
     void setCurrent( bool );



More information about the vlc-commits mailing list