[vlc-devel] [PATCH 2/2] qt: fix compilation on Qt4

Gilles Sabourin gilles.sabourin at free.fr
Tue Dec 20 19:28:49 CET 2016


Hello KO,

Aren't you supposed to compile vlc 3.0 in qt5 environment? I've
installed both qt4/qt5 development environment with my distro and have
no problem.

Best,

Gilles Sabourin

Le 20/12/2016 à 13:37, KO Myung-Hun a écrit :
> 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 )
>              {


More information about the vlc-devel mailing list