Commit 0db583c2 authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Merge branch 'master' of https://git.rwth-aachen.de/ita/Redstart

parents 48621dd6 8603b62b
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <QPlainTextEdit> #include <QPlainTextEdit>
#include <QStringListModel> #include <QStringListModel>
#include <QMutex>
#include <iostream> #include <iostream>
...@@ -69,8 +70,7 @@ public: ...@@ -69,8 +70,7 @@ public:
inline RedstartCoreOutputPlainTextEdit( QWidget* pParent ) inline RedstartCoreOutputPlainTextEdit( QWidget* pParent )
: QPlainTextEdit( pParent ) : QPlainTextEdit( pParent )
{ {
m_pOutStream = new COutStream( this ); m_pOutStream = new COutStream( this );
}; };
inline ~RedstartCoreOutputPlainTextEdit() inline ~RedstartCoreOutputPlainTextEdit()
...@@ -86,8 +86,11 @@ public: ...@@ -86,8 +86,11 @@ public:
inline void append() inline void append()
{ {
// Append a copy
m_qLock.lock();
appendPlainText( m_sLine ); appendPlainText( m_sLine );
m_sLine.clear(); m_sLine.clear();
m_qLock.unlock();
}; };
inline void write( char c ) inline void write( char c )
...@@ -105,6 +108,7 @@ public: ...@@ -105,6 +108,7 @@ public:
private: private:
COutStream* m_pOutStream; COutStream* m_pOutStream;
QString m_sLine; QString m_sLine;
QMutex m_qLock;
}; };
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment