[vlc-devel] [PATCH 2/2] qt: fix compilation on Qt4
KO Myung-Hun
komh78 at gmail.com
Tue Dec 20 13:37:55 CET 2016
QMap::last() was introduced in Qt 5.2
---
modules/gui/qt/components/epg/EPGView.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/modules/gui/qt/components/epg/EPGView.cpp b/modules/gui/qt/components/epg/EPGView.cpp
index ea5b3ac..5af463a 100644
--- a/modules/gui/qt/components/epg/EPGView.cpp
+++ b/modules/gui/qt/components/epg/EPGView.cpp
@@ -173,7 +173,11 @@ void EPGView::walkItems( bool b_cleanup )
if( !program->eventsbytime.isEmpty() )
{
+#if QT_VERSION >= 0x050200
const EPGItem *last = program->eventsbytime.last();
+#else
+ const EPGItem *last = (program->eventsbytime.end() - 1).value();
+#endif
if( !maxTime.isValid() ||
last->start().addSecs( last->duration() ) > maxTime )
{
--
2.9.2
More information about the vlc-devel
mailing list