Am Freitag, den 10.03.2017, 15:17 +0100 schrieb Jean-Marc Lasgouttes:
> Le 10/03/2017 à 14:59, Jürgen Spitzmüller a écrit :
> > > A way to fix the coverity issue would be to assert on p>=0, but I
> > > have
> > > to ask: how do we know that p!=-1?
> > 
> > AFAICS it can actually be -1, if the filter string is not found. So
> > we
> > probably should not assert here, but leave the loop.
> > 
> > So
> > 
> > - LASSERT(p != -1, /**/);
> > + if (p < 0)
> > +     break;
> 
> But this would mean that I can make it assert easily, right? I did
> not 
> manage to do that.

Right, actually it seems to be impossible.

> 
> My experience is:
> - qt4: no crash, no underline
> - qt5: no crash, correct underlines.
> 
> Are both situations expected?

No, it should also underline with qt4 (I do not have a qt4 build here
to test myself, but I remember it used to work).

> 
> > The condition above, AFAICS, looks for consecutive matching strings
> > which are then concatenated, i.e.
> > 
> > <u>found</u>found... -> <u>foundfound</u>...
> > 
> > If the condition does not match, the matching string only applies
> > to
> > the actual hit, so it is wrapped in <u>...</u>
> 
> That is what I figured out. I seems to me that it could be done in
> an 
> easier way, although I do not know which one yet :)

Me neither.

> > > An easy question to en the message: the lone "cc_->filter();"
> > > statement
> > > before the loop does nothing AFAIU. Was it supposed to be
> > > something
> > > else?
> > 
> > I suppose it can be removed (also in LayoutBox.cpp).
> 
> I missed that one. Is there a reason why these two classes are
> separate?

Laziness. They should eventually be merged. IIRC LayoutBox differs in
some respects (or is tied to layouts), but I think it could inherit and
modify CategorizedCombo.

Jürgen

> 
> JMarc
> 

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to