> 2025/07/13 22:18、Scott Kostyshak <skost...@lyx.org>のメール:
> 
> On Thu, Jul 03, 2025 at 12:55:02AM +0200, Scott Kostyshak wrote:
>> On Thu, Jul 03, 2025 at 12:10:10AM +0200, Jean-Marc Lasgouttes wrote:
>>> Le 02/07/2025 à 18:16, Scott Kostyshak a écrit :
> 
>>>> src/insets/Inset.h:217:22: warning: ‘virtual void 
>>>> lyx::Inset::draw(lyx::PainterInfo&, int, int, const 
>>>> lyx::frontend::InputMethod*, lyx::pos_type) const’ was hidden 
>>>> [-Woverloaded-virtual=]
>>>>   217 |         virtual void draw(PainterInfo &, int, int, 
>>>> frontend::InputMethod const *,
>>>>       |                      ^~~~
>>>> src/insets/InsetExternal.h:139:14: note:   by ‘virtual void 
>>>> lyx::InsetExternal::draw(lyx::PainterInfo&, int, int) const’
>>>>   139 |         void draw(PainterInfo & pi, int x, int y) const override;
>>>>       |              ^~~~
>>> 
>>> For the draw() issue, I see three solutions:
>>> 1/ rename the draw() version with more parameters to something else, or
>>> 2/ add the parameters (with default values nullptr and 0) to all draw
>>> functions
>>> 3/ seeing that the new draw() method is actually only implemented for
>>> InsetMathChar (I assume that it is for text in math), decide that polluting
>>> the Inset class with that is not a good idea and just create an ad-hoc
>>> method that is explicitly called in MathRow::draw.
>>> 
>>> I think that 3/ is the best solution, but I'll let Koji decide.
>> 
>> Sounds good.
> 
> Hi Koji, can you take care of the above?

Sure.

Along with the 3/ plan, I hope the attached patch suppresses the warnings, but 
I’m not sure how much of resemblance of functions leads to a warning (it still 
uses overloaded text() functions).

Input-method-related overloaded functions of PainterInfo::draw(), Inset::draw() 
and InsetMathChar::draw() now have the name of drawWithInputMethod().

Is it ok to go with this?

Koji

Attachment: avoidWarnings.patch
Description: Binary data


-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
https://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to