-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);
-
- data = QString::fromLocal8Bit(process_->readAllStandardError().data());
- ProgressInterface::instance()->appendError(data);
- if (!use_stderr_)
- cerr << fromqstr(data);
- }
-}
-
-