From 290c7f4d5cd6bdca68a083ea8ee77ceeb1e73306 Mon Sep 17 00:00:00 2001 From: Renato Severiano Date: Wed, 31 Aug 2016 16:23:38 +0100 Subject: [PATCH 1/3] warning as mode_last == mode_loop, Mode::Loop == vlc::mode_last --- QmlVlcPlaylist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/QmlVlcPlaylist.cpp b/QmlVlcPlaylist.cpp index 5f151e9..b52a668 100644 --- a/QmlVlcPlaylist.cpp +++ b/QmlVlcPlaylist.cpp @@ -69,7 +69,7 @@ QmlVlcPlaylist::Mode QmlVlcPlaylist::get_mode() void QmlVlcPlaylist::set_mode( QmlVlcPlaylist::Mode mode ) { - if( mode > vlc::mode_last ) + if( mode > Mode::Loop ) return; return player().set_playback_mode( (vlc::playback_mode_e) mode ); From cc0c3f0ecb70a08ab98ce23b7ae47bafa3cc36b1 Mon Sep 17 00:00:00 2001 From: Renato Severiano Date: Wed, 31 Aug 2016 18:01:59 +0100 Subject: [PATCH 2/3] Update QmlVlcPlaylist.cpp --- QmlVlcPlaylist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/QmlVlcPlaylist.cpp b/QmlVlcPlaylist.cpp index b52a668..7f1ab1e 100644 --- a/QmlVlcPlaylist.cpp +++ b/QmlVlcPlaylist.cpp @@ -69,7 +69,7 @@ QmlVlcPlaylist::Mode QmlVlcPlaylist::get_mode() void QmlVlcPlaylist::set_mode( QmlVlcPlaylist::Mode mode ) { - if( mode > Mode::Loop ) + if( reinterpret_cast(mode) > playback_mode_e::last ) return; return player().set_playback_mode( (vlc::playback_mode_e) mode ); From 8017671b6bef3e676d4feebbf4850567eb7169c1 Mon Sep 17 00:00:00 2001 From: Renato Severiano Date: Wed, 31 Aug 2016 18:08:36 +0100 Subject: [PATCH 3/3] added verification to lower emun --- QmlVlcPlaylist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/QmlVlcPlaylist.cpp b/QmlVlcPlaylist.cpp index 7f1ab1e..c4c9a3e 100644 --- a/QmlVlcPlaylist.cpp +++ b/QmlVlcPlaylist.cpp @@ -69,7 +69,7 @@ QmlVlcPlaylist::Mode QmlVlcPlaylist::get_mode() void QmlVlcPlaylist::set_mode( QmlVlcPlaylist::Mode mode ) { - if( reinterpret_cast(mode) > playback_mode_e::last ) + if( mode > Mode::Last || mode < Mode::Single ) return; return player().set_playback_mode( (vlc::playback_mode_e) mode );