diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -107,7 +107,6 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kcalcore_export.h ${KCalCore_HEADERS} - supertrait.h DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/KCalCore/kcalcore COMPONENT Devel ) diff --git a/src/event.h b/src/event.h --- a/src/event.h +++ b/src/event.h @@ -30,7 +30,6 @@ #include "kcalcore_export.h" #include "incidence.h" -#include "supertrait.h" #include @@ -66,6 +65,11 @@ */ typedef QVector List; + ///@cond PRIVATE + // needed for Akonadi polymorphic payload support + typedef Incidence SuperClass; + ///@endcond + /** Constructs an event. */ @@ -274,12 +278,4 @@ Q_DECLARE_METATYPE(KCalCore::Event *) //@endcond -//@cond PRIVATE -namespace Akonadi -{ -// super class trait specialization -template <> struct SuperClass : public SuperClassTrait {}; -} -//@endcond - #endif diff --git a/src/journal.h b/src/journal.h --- a/src/journal.h +++ b/src/journal.h @@ -32,7 +32,6 @@ #include "kcalcore_export.h" #include "incidence.h" -#include "supertrait.h" namespace KCalCore { @@ -54,6 +53,11 @@ */ typedef QVector List; + ///@cond PRIVATE + // needed for Akonadi polymorphic payload support + typedef Incidence SuperClass; + ///@endcond + /** Constructs an empty journal. */ @@ -170,12 +174,4 @@ Q_DECLARE_METATYPE(KCalCore::Journal *) //@endcond -//@cond PRIVATE -namespace Akonadi -{ -// super class trait specialization -template <> struct SuperClass : public SuperClassTrait {}; -} -//@endcond - #endif diff --git a/src/supertrait.h b/src/supertrait.h deleted file mode 100644 --- a/src/supertrait.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - Copyright (c) 2009 Volker Krause - - This library is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published by - the Free Software Foundation; either version 2 of the License, or (at your - option) any later version. - - This library is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public - License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to the - Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. -*/ - -#ifndef AKONADI_SUPERTRAIT_H -#define AKONADI_SUPERTRAIT_H - -// NOTE: This header is a copy of akonadi/src/core/supertrait.h because we can't -// depend on Akonadi -// DO NOT change include guards or namespace. - -//@cond PRIVATE -namespace Akonadi -{ -/** - @internal - @see super_class -*/ -template -struct SuperClassTrait { - typedef Super Type; -}; - -/** - Type trait to provide information about a base class for a given class. - Used eg. for the Akonadi payload mechanism. - - To provide base class introspection for own types, extend this trait as follows: - @code - namespace Akonadi - { - template <> struct SuperClass : public SuperClassTrait{}; - } - @endcode -*/ -template struct SuperClass : public SuperClassTrait {}; -} -//@endcond - -#endif diff --git a/src/todo.h b/src/todo.h --- a/src/todo.h +++ b/src/todo.h @@ -33,7 +33,6 @@ #include "kcalcore_export.h" #include "incidence.h" -#include "supertrait.h" namespace KCalCore { @@ -55,6 +54,11 @@ */ typedef QVector List; + ///@cond PRIVATE + // needed for Akonadi polymorphic payload support + typedef Incidence SuperClass; + ///@endcond + /** Constructs an empty to-do. */ @@ -358,12 +362,6 @@ Q_DECLARE_TYPEINFO(KCalCore::Todo::Ptr, Q_MOVABLE_TYPE); Q_DECLARE_METATYPE(KCalCore::Todo::Ptr) Q_DECLARE_METATYPE(KCalCore::Todo *) - -namespace Akonadi -{ -// super class trait specialization -template <> struct SuperClass : public SuperClassTrait {}; -} //@endcond #endif