← Back to team overview

kicad-developers team mailing list archive

Re: wxT()

 

The wx documentation says:

"Note that since wxWidgets 2.9.0 you shouldn't use wxT() anymore in your
program sources (it was previously required if you wanted to support Unicode)."

http://docs.wxwidgets.org/trunk/group__group__funcmacro__string.html

*shouldn't* is definitely stronger than "mostly unnecessary", and to me hints
that it may be removed at a later date. My guess is that "mostly" is just the
usual poor documentation quality in wxwidgets and they weren't being
particularly careful with their phrasing...

Personally I don't like the "remove them as we update the files" approach. We
end up in a messy state a year later with half the code one way and half the
other, and nobody can remember why. Then they'll remove wxT it and we'll all be
scratching our heads wondering if there was some critical reason we left it in
for half the cases...

Also - "in the same way that we +forget to+ update the copyright dates", FTFY
;)

On Tue, Feb 02, 2016 at 11:10:51AM -0500, Wayne Stambaugh wrote:
> Here is the comment in wx/chartypes.h (version 3.0.2)
> 
> /*
>    wxT ("wx text") macro turns a literal string constant into a wide char
>    constant. It is mostly unnecessary with wx 2.9 but defined for
>    compatibility.
>  */
> 
> I would have thought that wxT() expands to nothing since 2.9.0 but that
> not the case.  What makes me nervous is the "mostly unnecessary"
> statement.  What does "mostly unnecessary" mean?  I'm fine with getting
> rid of the wxT macros but I'd rather not do it as one huge patch.  We
> can remove these as we find them in the same way that we update the
> copyright dates as we modify the source files.
> 
> On 2/2/2016 10:59 AM, Simon Wells wrote:
> > While looking up something in the wxwidgets documentation i noticed
> > 
> > "Note that since wxWidgets 2.9.0 you shouldn't use wxT() anymore in
> > your program sources (it was previously required if you wanted to
> > support Unicode)."
> > 
> > As kicad only supports wxWidgets 3 is there a plan to change the 4247
> > instances of this in the tree?
> > 
> > thanks
> > 
> > Simon
> > 
> > _______________________________________________
> > Mailing list: https://launchpad.net/~kicad-developers
> > Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> > Unsubscribe : https://launchpad.net/~kicad-developers
> > More help   : https://help.launchpad.net/ListHelp
> > 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp


Follow ups

References