From 109fa78cd929b134e8fa826ec5c64b09dc88c3b7 Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Wed, 23 Dec 2015 20:22:15 +0100 Subject: get around const'ness with a dptr and introduce an event loop --- akonadi2_cli/state.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'akonadi2_cli/state.h') diff --git a/akonadi2_cli/state.h b/akonadi2_cli/state.h index 2f13166..eb07f56 100644 --- a/akonadi2_cli/state.h +++ b/akonadi2_cli/state.h @@ -26,15 +26,18 @@ class State public: State(); - void print(const QString &message, unsigned int indentationLevel = 0); - void printLine(const QString &message = QString(), unsigned int indentationLevel = 0); - void printError(const QString &errorMessage, const QString &errorCode = QString()); + void print(const QString &message, unsigned int indentationLevel = 0) const; + void printLine(const QString &message = QString(), unsigned int indentationLevel = 0) const; + void printError(const QString &errorMessage, const QString &errorCode = QString()) const; void setDebugLevel(unsigned int level); unsigned int debugLevel() const; + int commandStarted() const; + void commandFinished(int returnCode = 0) const; + private: - int m_debugLevel = 0; - QTextStream m_outStream; + class Private; + Private * const d; }; -- cgit v1.2.3