On Wed, Dec 18, 2002 at 02:45:05PM +0100, Jean-Marc Lasgouttes wrote: > Juergen> Mixing QString with string broke non-boost (gcc 2.95.3 here). > Juergen> Please apply. > > Juergen> PS: the fix is fromqstr(qt_("LyX: ")) instead of _("LyX: ") > Juergen> because gettext is no more included (OTOH: who translates > Juergen> "LyX: "?). > > I get bitten by this too. However, it does not seem that > fromqstr(qt_("LyX: ")), which translates char > const*=>string=>qstring=>string, is a particularly good solution. > John, what shall we do? Is it authorised to include gettext.h to have > the good old _()?
Yes, it is. The crucial thing in this is that text must be passed through toqstr before being passed to a Qt widget. So here the fromqstr(qt_("LyX: ")) is strictly unnecessary. qt_() is equivalent to toqstr(_()). I have preferred to remove gettext.h wherever possible to help people use the qt_() when necessary, but there are indeed exceptions, of which this is one. regards john -- "ALL television is children's television." - Richard Adler