diff --git a/src/kmime_newsarticle.h b/src/kmime_newsarticle.h --- a/src/kmime_newsarticle.h +++ b/src/kmime_newsarticle.h @@ -25,21 +25,26 @@ #include "kmime_export.h" #include "kmime_message.h" -//#include #include namespace KMime { +/** NNTP news article. */ class KMIME_EXPORT NewsArticle : public Message { public: /** A shared pointer to a news article. */ typedef QSharedPointer Ptr; + ///@cond PRIVATE + // needed for Akonadi polymorphic payload support + typedef Message SuperClass; + ///@endcond + /** Creates a NewsArticle object. */ @@ -92,12 +97,4 @@ } // namespace KMime -////@cond PRIVATE -//// super class trait specialization -//namespace Akonadi -//{ -//template <> struct SuperClass : public SuperClassTrait {}; -//} -//@endcond - #endif // __KMIME_NEWSARTICLE_H__ 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