<div dir="ltr"><div dir="ltr">if the first patch's name is "qt: fix missing return value in ChapterModel", what should the second one be called?</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 14 Jun 2019 at 18:37, Abel Tesfaye <<a href="mailto:abeltesfaye45@gmail.com">abeltesfaye45@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 14 Jun 2019 at 18:33, Hugo Beauzée-Luyssen <<a href="mailto:hugo@beauzee.fr" target="_blank">hugo@beauzee.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri, Jun 14, 2019, at 5:30 PM, Hugo Beauzée-Luyssen wrote:<br>
> On Fri, Jun 14, 2019, at 5:27 PM, Abel Tesfaye wrote:<br>
> > From: Abel Tesfaye <<a href="mailto:Abeltesfaye45@gmail.com" target="_blank">Abeltesfaye45@gmail.com</a>><br>
> > <br>
> > ---<br>
> > modules/gui/qt/util/input_models.cpp | 23 ++++++++++++-----------<br>
> > 1 file changed, 12 insertions(+), 11 deletions(-)<br>
> > <br>
> > diff --git a/modules/gui/qt/util/input_models.cpp <br>
> > b/modules/gui/qt/util/input_models.cpp<br>
> > index 918f93193d..6b0a0b8bf1 100644<br>
> > --- a/modules/gui/qt/util/input_models.cpp<br>
> > +++ b/modules/gui/qt/util/input_models.cpp<br>
> > @@ -346,24 +346,25 @@ void ChapterListModel::resetTitle(const <br>
> > vlc_player_title *newTitle)<br>
> > <br>
> > QString ChapterListModel::getNameAtPosition(float pos) const<br>
> > {<br>
> > - if(m_title == nullptr)<br>
> > - return qtr("nothing found");<br>
> > + if(m_title != nullptr){<br>
> > <br>
> > - vlc_tick_t posTime = pos * m_title->length;<br>
> > - int prevChapterIndex = 0;<br>
> > + vlc_tick_t posTime = pos * m_title->length;<br>
> > + int prevChapterIndex = 0;<br>
> > <br>
> > - for(unsigned int i=0;i<m_title->chapter_count;i++){<br>
> > + for(unsigned int i=0;i<m_title->chapter_count;i++){<br>
> > <br>
> > - vlc_tick_t currentChapterTime = m_title->chapters[i].time;<br>
> > + vlc_tick_t currentChapterTime = m_title->chapters[i].time;<br>
> > <br>
> > - if(currentChapterTime > posTime)<br>
> > - return qfu(m_title->chapters[prevChapterIndex].name);<br>
> > + if(currentChapterTime > posTime)<br>
> > + return qfu(m_title->chapters[prevChapterIndex].name);<br>
> > <br>
> > - else if(i == (m_title->chapter_count - 1))<br>
> > - return qfu(m_title->chapters[i].name);<br>
> > + else if(i == (m_title->chapter_count - 1))<br>
> > + return qfu(m_title->chapters[i].name);<br>
> > <br>
> > - prevChapterIndex = i;<br>
> > + prevChapterIndex = i;<br>
> > + }<br>
> > }<br>
> > + return QString();<br>
> > }<br>
> > <br>
> > //***************************<br>
> <br>
> Hi,<br>
> <br>
> Could you split the patch in 2, one for the actual change, and one for <br>
> the indentation fix? That eases up reading tge change quite a lot :)<br></blockquote><div><br></div><div>Sure, i'll send the two patches now</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> <br>
<br>
That being said, in this specific case, wouldn't it be simpler to just add a return QString{} at the bottom of the function? (I'm not entirely sure we need a translatable string for that error)<br></blockquote><div><br></div><div>the "nothing found" error was removed in this patch</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
-- <br>
Hugo Beauzée-Luyssen<br>
<a href="mailto:hugo@beauzee.fr" target="_blank">hugo@beauzee.fr</a><br>
_______________________________________________<br>
vlc-devel mailing list<br>
To unsubscribe or modify your subscription options:<br>
<a href="https://mailman.videolan.org/listinfo/vlc-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/listinfo/vlc-devel</a></blockquote></div></div></div>
</blockquote></div>