[vlc-devel] [PATCH 1/2] qt: fix missing return value in ChapterModel
Abel Tesfaye
abeltesfaye45 at gmail.com
Fri Jun 14 20:05:15 CEST 2019
Cool, thanks!
On Fri, 14 Jun 2019 19:03 Hugo Beauzée-Luyssen, <hugo at beauzee.fr> wrote:
> On Fri, Jun 14, 2019, at 5:45 PM, Abel Tesfaye wrote:
> > From: Abel Tesfaye <Abeltesfaye45 at gmail.com>
> >
> > ---
> > modules/gui/qt/util/input_models.cpp | 7 ++++---
> > 1 file changed, 4 insertions(+), 3 deletions(-)
> >
> > diff --git a/modules/gui/qt/util/input_models.cpp
> > b/modules/gui/qt/util/input_models.cpp
> > index 918f93193d..125586a60e 100644
> > --- a/modules/gui/qt/util/input_models.cpp
> > +++ b/modules/gui/qt/util/input_models.cpp
> > @@ -346,8 +346,7 @@ void ChapterListModel::resetTitle(const
> > vlc_player_title *newTitle)
> >
> > QString ChapterListModel::getNameAtPosition(float pos) const
> > {
> > - if(m_title == nullptr)
> > - return qtr("nothing found");
> > + if(m_title != nullptr){
> >
> > vlc_tick_t posTime = pos * m_title->length;
> > int prevChapterIndex = 0;
> > @@ -357,13 +356,15 @@ QString ChapterListModel::getNameAtPosition(float
> > pos) const
> > vlc_tick_t currentChapterTime = m_title->chapters[i].time;
> >
> > if(currentChapterTime > posTime)
> > - return qfu(m_title->chapters[prevChapterIndex].name);
> > + return qfu(m_title->chapters[prevChapterIndex].name);
> >
> > else if(i == (m_title->chapter_count - 1))
> > return qfu(m_title->chapters[i].name);
> >
> > prevChapterIndex = i;
> > }
> > + }
> > + return QString();
> > }
> >
> > //***************************
>
> Merged, thanks!
> I took the liberty of removing the whitespace change from the 1st commit.
>
> --
> Hugo Beauzée-Luyssen
> hugo at beauzee.fr
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20190614/c39aaae9/attachment.html>
More information about the vlc-devel
mailing list