diff options
author | Aaron Seigo <aseigo@kde.org> | 2014-12-16 10:01:24 +0100 |
---|---|---|
committer | Aaron Seigo <aseigo@kde.org> | 2014-12-16 10:01:24 +0100 |
commit | 176aa6a74fac3c74f52c580051c80ed19c0b0cfd (patch) | |
tree | 201b2782e2d97e674f2420254de8440687afa307 /common/clientapi.h | |
parent | 8c80b142925840a6ae74ad227f5d7d07cae1fef4 (diff) | |
download | sink-176aa6a74fac3c74f52c580051c80ed19c0b0cfd.tar.gz sink-176aa6a74fac3c74f52c580051c80ed19c0b0cfd.zip |
split out functions that get inlined into a separate file
allowed including the header more than once ;)
Diffstat (limited to 'common/clientapi.h')
-rw-r--r-- | common/clientapi.h | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/common/clientapi.h b/common/clientapi.h index 7f01587..2188123 100644 --- a/common/clientapi.h +++ b/common/clientapi.h | |||
@@ -34,16 +34,7 @@ | |||
34 | namespace async { | 34 | namespace async { |
35 | //This should abstract if we execute from eventloop or in thread. | 35 | //This should abstract if we execute from eventloop or in thread. |
36 | //It supposed to allow the caller to finish the current method before executing the runner. | 36 | //It supposed to allow the caller to finish the current method before executing the runner. |
37 | void run(const std::function<void()> &runner) { | 37 | void run(const std::function<void()> &runner); |
38 | QtConcurrent::run(runner); | ||
39 | |||
40 | // //FIXME we should be using a Job instead of a timer | ||
41 | // auto timer = new QTimer; | ||
42 | // timer->setSingleShot(true); | ||
43 | // QObject::connect(timer, &QTimer::timeout, runner); | ||
44 | // QObject::connect(timer, &QTimer::timeout, timer, &QObject::deleteLater); | ||
45 | // timer->start(0); | ||
46 | }; | ||
47 | 38 | ||
48 | /** | 39 | /** |
49 | * Query result set | 40 | * Query result set |
@@ -232,16 +223,10 @@ template<class DomainType> | |||
232 | QString getTypeName(); | 223 | QString getTypeName(); |
233 | 224 | ||
234 | template<> | 225 | template<> |
235 | QString getTypeName<Event>() | 226 | QString getTypeName<Event>(); |
236 | { | ||
237 | return "event"; | ||
238 | } | ||
239 | 227 | ||
240 | template<> | 228 | template<> |
241 | QString getTypeName<Todo>() | 229 | QString getTypeName<Todo>(); |
242 | { | ||
243 | return "todo"; | ||
244 | } | ||
245 | 230 | ||
246 | } | 231 | } |
247 | 232 | ||