mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 17:35:34 +08:00
refs #140, removed MACRO DBUS_ENUM_MARSHALLING, changed to template
discussed in https://dev.vatsim-germany.org/issues/140#change-864
This commit is contained in:
@@ -198,23 +198,4 @@ namespace BlackMisc
|
||||
|
||||
} // BlackMisc
|
||||
|
||||
/*!
|
||||
* \brief Macro to make a ENUMs DBus streamable.
|
||||
* \details Put this macro outside of any namespace, in the same header as the class defining the enumeration.
|
||||
* \param ENUM The fully qualified name of the enumeration.
|
||||
* \hideinitializer
|
||||
* \ingroup Tuples
|
||||
*/
|
||||
#define BLACK_DBUS_ENUM_MARSHALLING(ENUM) \
|
||||
namespace BlackMisc \
|
||||
{ \
|
||||
inline const QDBusArgument &operator >>(const QDBusArgument &arg, ENUM &enumType) \
|
||||
{ \
|
||||
uint e; \
|
||||
arg >> e; \
|
||||
enumType = static_cast<ENUM>(e); \
|
||||
return arg; \
|
||||
}; \
|
||||
}
|
||||
|
||||
#endif // guard
|
||||
|
||||
Reference in New Issue
Block a user