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.

My experience is:
- qt4: no crash, no underline
- qt5: no crash, correct underlines.

Are both situations expected?

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 :)


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?

JMarc

Reply via email to