Am Mon, 14 Jul 2025 16:11:47 +0200
schrieb Scott Kostyshak <[email protected]>:

> On Mon, Jul 14, 2025 at 03:51:03PM +0200, Jean-Marc Lasgouttes wrote:
> > Le 14/07/2025 à 14:41, Yokota K. a écrit :  
> > > 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).  
> > 
> > Looks good to me. What is not good is when you overload a method in a
> > derived class. In this case, you should reimplement the original function in
> > the new class too (or just use "using oldclass::mymethod(arg1, arg2)" or
> > something like that).
> >   
> > > Input-method-related overloaded functions of PainterInfo::draw(), 
> > > Inset::draw() and
> > > InsetMathChar::draw() now have the name of drawWithInputMethod().  
> > 
> > My original idea was to declare it only for InsetMathChar, not Inset.
> > 
> > I'll let Scott test it.  
> 
> Thanks for working on this, Koji!
> 
> Tested the patch and it does make the warning about Inset.h:217 go away.
> 
> Scott

Works here too. At least for draw(). But not for src/insets/InsetSpecialChar.cpp
In file included from /usr2/src/lyx/lyx-test/src/frontends/NullPainter.h:17,
                 from /usr2/src/lyx/lyx-test/src/insets/InsetSpecialChar.cpp:27:
/usr2/src/lyx/lyx-test/src/frontends/Painter.h:154:22: error: ‘virtual void
lyx::frontend::Painter::text(int, int, lyx::char_type, const 
lyx::frontend::InputMethod*, lyx::pos_type, Direction)’ was hidden 
[-Werror=overloaded-virtual=]
  154 |         virtual void text(int, int, char_type, InputMethod const *,
      |                      ^~~~
/usr2/src/lyx/lyx-test/src/frontends/NullPainter.h:80:14: note:   by
‘lyx::frontend::NullPainter::text’
   80 |         void text(int, int, docstring const &, Font const &,
      |              ^~~~
cc1plus: all warnings being treated as errors

        Kornel

Attachment: pgpNp8MVhtCAD.pgp
Description: Digitale Signatur von OpenPGP

-- 
lyx-devel mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to