Enrico Forestieri wrote:
> On Fri, Jul 16, 2010 at 11:31:02AM +0200, Peter Kümmel wrote:
>> Enrico Forestieri wrote:
>> >>> ///
>>>>> - bool showerr_;
>>>>> + bool terminalOutExists_;
>>>> terminal_out_exists_
>>> stdout_exists_
>> Hope attached patch makes the code more readable.
>
> Yes, I think so, but see below.
>
>> But why do we ignore the terminal settings in flush() ?
>
> What do you mean?
void SystemcallPrivate::flush()
{
if (process_) {
// If the output has been redirected, we write it all at once.
// Even if we are not running in a terminal, the output could go
// to some log file, for example ~/.xsession-errors on *nix.
QString data =
QString::fromLocal8Bit(process_->readAllStandardOutput().data());
ProgressInterface::instance()->appendMessage(data);
if (!use_stdout_ && out_file_.empty())
cout << fromqstr(data);
Does this mean if 'out_file_' is not empty cout is implicitly redirected to
out_file_ and
we must write to cout to fill out_file_?
Where is the redirection from cout to out_file_ done?
Peter