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