Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/UIElements/Views/Qt4/QDebugStream.hpp

    r52dfcc r4d6d6a  
    3333{
    3434public:
    35   QDebugStream(std::ostream &stream, QTextEdit* text_edit) :
    36     m_stream(stream),
    37     printing(false)
     35  QDebugStream(std::ostream &stream, QTextEdit* text_edit) : m_stream(stream)
    3836  {
    3937    log_window = text_edit;
     
    5654  {
    5755    if (v == '\n') {
    58       while (printing);
    59       printing = true;
    6056      log_window->append(m_string.c_str());
    6157      qDebug() << m_string.c_str();
    6258      m_string.erase(m_string.begin(), m_string.end());
    63       printing = false;
    6459    } else
    6560      m_string += v;
     
    7065  virtual std::streamsize xsputn(const char *p, std::streamsize n)
    7166  {
    72     while (printing);
    73     printing = true;
    7467    m_string.append(p, p + n);
    75     printing = false;
    7668
    7769    size_t pos = 0;
     
    8072      if (pos != std::string::npos) {
    8173        std::string tmp(m_string.begin(), m_string.begin() + pos);
    82         while (printing);
    83         printing = true;
    8474        log_window->append(tmp.c_str());
    8575        qDebug() << tmp.c_str();
    8676        m_string.erase(m_string.begin(), m_string.begin() + pos + 1);
    87         printing = false;
    8877      }
    8978    }
     
    9786  std::string m_string;
    9887
    99   bool printing;
    100 
    10188  QTextEdit* log_window;
    10289};
Note: See TracChangeset for help on using the changeset viewer.