On Thu, Jun 12, 2014 at 11:56:03AM +0200, Jean-Marc Lasgouttes wrote:
> 11/06/2014 18:20, Enrico Forestieri:
> >>To be honest, I am not terribly well informed about this sort of
> >>topic, so I am more than happy to take your word for what is right
> >>here.
> >
> >I have checked that it is Qt itself that calls setlocale(LC_ALL, "")
> >during QCoreApplication initialization. Of course, that is never
> >performed for batch processing and this explains the bug.
> 
> I am coming late in the discussion, sorry. What I the reason why we
> do not want to initialize QCoreApplication in batch mode? It would
> be better if LyX was behaving similarly in all cases.

That comes as part of a QApplication initialization. I think we don't
directly instantiate any QCoreApplication. In LyX.cpp there is code
that explicitly avoids that initialization for batch mode. I think that
in theory we could instantiate a QApplication for a gui-driven mode and
a QCoreApplication for batch processing. However, that was not done
for a reason that I don't know. Without a clear understanding of that
decision and of its consequences, I won't open that can of worms...

As regards LyX behaving similarly, apart this specific case (that, BTW,
only seems affecting LyX 2.1 and 2.2, most probably due to the gettext
removal, and that, BTW2, does not manifests with Qt5), I think that this
is already the case, as a QCoreApplication would only give you an event
loop that we, apparently, don't need. But I am not an expert in this
field, so take that only as a IMHO comment.

-- 
Enrico

Reply via email to