From b0d831910d0615dea94bec77dc46c8c2e415545c Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Wed, 23 Dec 2015 11:48:59 +0100 Subject: shove output through state --- akonadi2_cli/state.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'akonadi2_cli/state.cpp') 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 @@ #include "state.h" #include -#include +#include State::State() + : m_outStream(stdout) { } +void State::print(const QString &message) +{ + m_outStream << message; +} + +void State::printLine(const QString &message) +{ + m_outStream << message << "\n"; +} + +void State::printError(const QString &error, int code) +{ + m_outStream << "ERROR " << code << ": " << error << "\n"; +} -- cgit v1.2.3