generatorconsoleoutput.cpp 408 B

1234567891011121314151617181920
  1. #include "generatorconsoleoutput.h"
  2. GeneratorConsoleOutput::GeneratorConsoleOutput()
  3. {
  4. m_output = new QTextStream(stdout, QIODevice::WriteOnly);
  5. }
  6. GeneratorConsoleOutput::~GeneratorConsoleOutput()
  7. {
  8. delete m_output;
  9. }
  10. void GeneratorConsoleOutput::printOutput(const QString &message)
  11. {
  12. *m_output << message << "\n";
  13. m_output->flush();
  14. emit GeneratorOutputView::message(message);
  15. }