summaryrefslogtreecommitdiffstats
path: root/akonadish
diff options
context:
space:
mode:
Diffstat (limited to 'akonadish')
-rw-r--r--akonadish/state.cpp12
-rw-r--r--akonadish/state.h3
2 files changed, 15 insertions, 0 deletions
diff --git a/akonadish/state.cpp b/akonadish/state.cpp
index c9f9ee3..f3f5975 100644
--- a/akonadish/state.cpp
+++ b/akonadish/state.cpp
@@ -45,6 +45,7 @@ public:
45 45
46 int debugLevel = 0; 46 int debugLevel = 0;
47 QEventLoop *event = 0; 47 QEventLoop *event = 0;
48 bool timing = false;
48 QTextStream outStream; 49 QTextStream outStream;
49}; 50};
50 51
@@ -111,3 +112,14 @@ void State::setHasEventLoop(bool evented)
111 s_hasEventLoop = evented; 112 s_hasEventLoop = evented;
112} 113}
113 114
115void State::setCommandTiming(bool time)
116{
117 d->timing = time;
118}
119
120bool State::commandTiming() const
121{
122 return d->timing;
123}
124
125
diff --git a/akonadish/state.h b/akonadish/state.h
index 1ba86dd..9c1ab6f 100644
--- a/akonadish/state.h
+++ b/akonadish/state.h
@@ -33,6 +33,9 @@ public:
33 void setDebugLevel(unsigned int level); 33 void setDebugLevel(unsigned int level);
34 unsigned int debugLevel() const; 34 unsigned int debugLevel() const;
35 35
36 void setCommandTiming(bool);
37 bool commandTiming() const;
38
36 int commandStarted() const; 39 int commandStarted() const;
37 void commandFinished(int returnCode = 0) const; 40 void commandFinished(int returnCode = 0) const;
38 41