Vincent van Ravesteijn wrote:

> I did some debugging. The problem lies in the use of
> QProcess::startDetached. If you call this function with a the "cmd"
> prefix, you will inevitably get a command window.

So in some sense it does what it is told to do;-)

> Omitting the "cmd" could be a solution. Does it have any use to add the
> latexEnvCmdPrefix to a viewer command ?

This looks rather wrong to me. This should only be added when running a TeX 
related converter, e.g. LaTeX, BibTeX etc.

There are more dangerous code parts, e.g. 

subst(command, "cmd /d /c ", "");

looks quite fragile.

> Other solutions using QProcess::start did not work as I never seem to
> get a finished() signal to be able to delete the process. This deletion
> of the Qprocess object was the reason to change this in commit 52258212.

Yes, there are many ways to do subtle errors when creating child processes 
(a long time ago I wrote cross-platform wrapper for that which took quite 
long to get it right), so we should not change this right now. However, if 
there is an easy way to use latexEnvCmdPrefix only for converters it would 
probably be good to do that.


Georg

Reply via email to