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.cpp | |
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.cpp')
-rw-r--r-- | common/clientapi.cpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/common/clientapi.cpp b/common/clientapi.cpp new file mode 100644 index 0000000..2a4b603 --- /dev/null +++ b/common/clientapi.cpp | |||
@@ -0,0 +1,38 @@ | |||
1 | |||
2 | #include "clientapi.h" | ||
3 | |||
4 | namespace async | ||
5 | { | ||
6 | void run(const std::function<void()> &runner) { | ||
7 | QtConcurrent::run(runner); | ||
8 | |||
9 | // //FIXME we should be using a Job instead of a timer | ||
10 | // auto timer = new QTimer; | ||
11 | // timer->setSingleShot(true); | ||
12 | // QObject::connect(timer, &QTimer::timeout, runner); | ||
13 | // QObject::connect(timer, &QTimer::timeout, timer, &QObject::deleteLater); | ||
14 | // timer->start(0); | ||
15 | }; | ||
16 | } // namespace async | ||
17 | |||
18 | namespace Akonadi2 | ||
19 | { | ||
20 | |||
21 | namespace Domain | ||
22 | { | ||
23 | |||
24 | template<> | ||
25 | QString getTypeName<Event>() | ||
26 | { | ||
27 | return "event"; | ||
28 | } | ||
29 | |||
30 | template<> | ||
31 | QString getTypeName<Todo>() | ||
32 | { | ||
33 | return "todo"; | ||
34 | } | ||
35 | |||
36 | } // namespace Domain | ||
37 | |||
38 | } // namespace Akonadi2 | ||