diff options
Diffstat (limited to 'options/metatype.hpp')
-rw-r--r-- | options/metatype.hpp | 47 |
1 files changed, 17 insertions, 30 deletions
diff --git a/options/metatype.hpp b/options/metatype.hpp index c889766a..ca0947fb 100644 --- a/options/metatype.hpp +++ b/options/metatype.hpp @@ -1,38 +1,25 @@ #pragma once -#include <QMetaType> +#include "slider.hpp" +#include "defs.hpp" + #include <QList> #include <QString> #include <QPointF> -#include <QDataStream> #include <QDebug> -#include "export.hpp" -#include "slider.hpp" - -Q_DECLARE_METATYPE(QList<double>) -Q_DECLARE_METATYPE(QList<float>) -Q_DECLARE_METATYPE(QList<int>) -Q_DECLARE_METATYPE(QList<bool>) -Q_DECLARE_METATYPE(QList<QString>) -Q_DECLARE_METATYPE(QList<QPointF>) -Q_DECLARE_METATYPE(::options::slider_value) - -namespace options { -namespace detail { - -struct custom_type_initializer final -{ - static const custom_type_initializer singleton; - - custom_type_initializer(); - - template<typename t> static void declare_for_type(const char* str) - { - qRegisterMetaType<t>(str); - qRegisterMetaTypeStreamOperators<t>(); - } -}; +#include <QMetaType> -} -} +#if !defined OPENTRACK_METATYPE_ +# define OPENTRACK_METATYPE(x) Q_DECLARE_METATYPE(x) +#else +# define OPENTRACK_METATYPE(x) Q_DECLARE_METATYPE(x) OPENTRACK_METATYPE_(x) +#endif + +OPENTRACK_METATYPE(QList<double>) +OPENTRACK_METATYPE(QList<float>) +OPENTRACK_METATYPE(QList<int>) +OPENTRACK_METATYPE(QList<bool>) +OPENTRACK_METATYPE(QList<QString>) +OPENTRACK_METATYPE(QList<QPointF>) +OPENTRACK_METATYPE(::options::slider_value) |