mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
refs #413 Doxygen fixes.
(cherry picked from commit da107e6c5a90744c02bb61bc6be6ec026081b409)
This commit is contained in:
@@ -39,16 +39,15 @@ namespace BlackMisc
|
||||
namespace Private
|
||||
{
|
||||
//! \private SFINAE for CValueObject constructor to avoid being selected as a viable copy constructor.
|
||||
//! @{
|
||||
template <typename...> struct DecayFirst
|
||||
{
|
||||
typedef void type;
|
||||
};
|
||||
//! \private
|
||||
template <typename T, typename... Ts> struct DecayFirst<T, Ts...>
|
||||
{
|
||||
typedef typename std::decay<T>::type type;
|
||||
};
|
||||
//! @}
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
@@ -96,11 +96,13 @@ namespace BlackMisc
|
||||
template <typename T>
|
||||
struct CValueObjectMetaInfo : public IValueObjectMetaInfo
|
||||
{
|
||||
//! \cond PRIVATE
|
||||
// http://en.wikibooks.org/wiki/More_C++_Idioms/Member_Detector
|
||||
struct Fallback { int toJson, convertFromJson, setPropertyByIndex, propertyByIndex, propertyByIndexAsString, equalsPropertyByIndex, toIcon; };
|
||||
template <int Fallback:: *> struct int_t { typedef int type; };
|
||||
template <typename U> struct Derived : public U, public Fallback {};
|
||||
# define DISABLE_IF_HAS(MEMBER) typename int_t<&Derived<U>::MEMBER>::type
|
||||
//! \endcond
|
||||
|
||||
template <typename U> static QJsonObject toJsonHelper(const U &object, DISABLE_IF_HAS(toJson)) { throw CVariantException(object, "toJson"); }
|
||||
template <typename U> static QJsonObject toJsonHelper(const U &object, ...) { return object.toJson(); }
|
||||
@@ -203,7 +205,7 @@ namespace BlackMisc
|
||||
template <typename T>
|
||||
IValueObjectMetaInfo *getValueObjectMetaInfo() { return getValueObjectMetaInfo(qMetaTypeId<T>()); }
|
||||
|
||||
//! \private
|
||||
//! \cond PRIVATE
|
||||
template <typename T, bool IsRegisteredMetaType /* = true */>
|
||||
struct MetaTypeHelperImpl
|
||||
{
|
||||
@@ -213,7 +215,6 @@ namespace BlackMisc
|
||||
static void maybeConvertFromQVariant(T &obj, const QVariant &var) { BlackMisc::setFromQVariant(&obj, var); }
|
||||
};
|
||||
|
||||
//! \private
|
||||
template <typename T>
|
||||
struct MetaTypeHelperImpl<T, /* IsRegisteredMetaType = */ false>
|
||||
{
|
||||
@@ -223,9 +224,9 @@ namespace BlackMisc
|
||||
static void maybeConvertFromQVariant(T &, const QVariant &) {}
|
||||
};
|
||||
|
||||
//! \private
|
||||
template <typename T>
|
||||
using MetaTypeHelper = MetaTypeHelperImpl<T, QMetaTypeId<T>::Defined>;
|
||||
//! \endcond
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user