diff options
Diffstat (limited to 'akonadi2_cli/state.cpp')
-rw-r--r-- | akonadi2_cli/state.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/akonadi2_cli/state.cpp b/akonadi2_cli/state.cpp index bb21e0e..80a2d3a 100644 --- a/akonadi2_cli/state.cpp +++ b/akonadi2_cli/state.cpp | |||
@@ -20,9 +20,24 @@ | |||
20 | #include "state.h" | 20 | #include "state.h" |
21 | 21 | ||
22 | #include <QDebug> | 22 | #include <QDebug> |
23 | #include <QDir> | 23 | #include <QTextStream> |
24 | 24 | ||
25 | State::State() | 25 | State::State() |
26 | : m_outStream(stdout) | ||
26 | { | 27 | { |
27 | } | 28 | } |
28 | 29 | ||
30 | void State::print(const QString &message) | ||
31 | { | ||
32 | m_outStream << message; | ||
33 | } | ||
34 | |||
35 | void State::printLine(const QString &message) | ||
36 | { | ||
37 | m_outStream << message << "\n"; | ||
38 | } | ||
39 | |||
40 | void State::printError(const QString &error, int code) | ||
41 | { | ||
42 | m_outStream << "ERROR " << code << ": " << error << "\n"; | ||
43 | } | ||