From 176aa6a74fac3c74f52c580051c80ed19c0b0cfd Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Tue, 16 Dec 2014 10:01:24 +0100 Subject: split out functions that get inlined into a separate file allowed including the header more than once ;) --- common/clientapi.cpp | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 common/clientapi.cpp (limited to 'common/clientapi.cpp') 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 @@ + +#include "clientapi.h" + +namespace async +{ + void run(const std::function &runner) { + QtConcurrent::run(runner); + + // //FIXME we should be using a Job instead of a timer + // auto timer = new QTimer; + // timer->setSingleShot(true); + // QObject::connect(timer, &QTimer::timeout, runner); + // QObject::connect(timer, &QTimer::timeout, timer, &QObject::deleteLater); + // timer->start(0); + }; +} // namespace async + +namespace Akonadi2 +{ + +namespace Domain +{ + +template<> +QString getTypeName() +{ + return "event"; +} + +template<> +QString getTypeName() +{ + return "todo"; +} + +} // namespace Domain + +} // namespace Akonadi2 -- cgit v1.2.3