#include <Workspace/testcommon.h>
◆ ~MockLogStream()
◆ flush()
Clients would not normally need to call this function, but if for some reason they want to be sure that all logged text has been sent to where it needs to go before performing some task, they can call flush(). When flush() returns, all underlying streams and buffers associated with the LogStream object will have been flushed to disk, etc.
Implements LogStream.
◆ getStreamContents()
QString getStreamContents |
( |
| ) |
|
|
inline |
◆ isStreamOkay()
bool isStreamOkay |
( |
| ) |
const |
|
inlineoverridevirtual |
- Returns
- True if the stream is able to accept text for writing.
Implements LogStream.
◆ popStreamContents()
QString popStreamContents |
( |
| ) |
|
|
inline |
◆ sendText() [1/2]
void sendText |
( |
const QString & |
msg | ) |
|
|
inlineoverridevirtual |
- Parameters
-
msg | The text to be sent to the stream. |
This function is called by logText() with the expectation that msg will be sent to the relevant place by the subclass' implementation. It's now preferred to override the 3 parameters version of sendText to handle additional information properly.If the 3 parameters version is overridden, this method won't be used.
Reimplemented from LogStream.
◆ sendText() [2/2]
void sendText |
( |
const QString & |
msg, |
|
|
const QDateTime & |
|
|
) |
| |
|
inlineoverridevirtual |
- Parameters
-
msg | The text to be sent to the stream. |
This function is called by logText() with the expectation that msg will be sent to the relevant place by the subclass' implementation. Please override this only.
Reimplemented from LogStream.