diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-03-08 13:16:37 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-08 13:16:37 +0900 |
commit | ba5ca3c88a20926f2be06872f530d9da12d5a062 (patch) | |
tree | 1d8b69e433dacf51427b4e3dcab9545374c85116 /jobs/syncjob.h | |
parent | 2cc1fc52baa28c4896080069a985c200517ad7cd (diff) | |
parent | 81b6d940218a212a37e3c600c66fbe9a7476f433 (diff) | |
download | libquotient-ba5ca3c88a20926f2be06872f530d9da12d5a062.tar.gz libquotient-ba5ca3c88a20926f2be06872f530d9da12d5a062.zip |
Merge pull request #53 from Fxrh/kitsune-fix-adding-events
Fix adding events to the timeline
Diffstat (limited to 'jobs/syncjob.h')
-rw-r--r-- | jobs/syncjob.h | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/jobs/syncjob.h b/jobs/syncjob.h index be1d4776..b41c09d4 100644 --- a/jobs/syncjob.h +++ b/jobs/syncjob.h @@ -22,41 +22,10 @@ #include "../joinstate.h" #include "../events/event.h" +#include "util.h" namespace QMatrixClient { - /** - * @brief A crude wrapper around a container of pointers that owns pointers - * to contained objects - * - * Similar to vector<unique_ptr<>>, upon deletion, EventsHolder - * will delete all events contained in it. - */ - template <typename ContainerT> - class Owning : public ContainerT - { - public: - Owning() = default; -#if defined(_MSC_VER) && _MSC_VER < 1900 - // Workaround: Dangerous (auto_ptr style) copy constructor because - // VS2013 (unnecessarily) instantiates EventList::QVector<>::toList() - // which instantiates QList< Owning<> > which needs the contained - // object to have a non-deleted copy constructor. - Owning(Owning& other) : ContainerT(std::move(other)) { } -#else - Owning(Owning&) = delete; -#endif - Owning(Owning&& other) : ContainerT(std::move(other)) { } - ~Owning() { for (auto e: *this) delete e; } - - /** - * @brief returns the underlying events and releases the ownership - * - * Acts similar to unique_ptr::release. - */ - ContainerT release() { return std::move(*this); } - }; - class SyncRoomData { public: |