summaryrefslogtreecommitdiffhomepage
path: root/options/metatype.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-07-24 12:47:05 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-07-24 12:47:05 +0200
commit9762ccffa4df162d8574d76749d21d09b57c52ad (patch)
treedce2ffda8811adb868745e132c126276cd05a545 /options/metatype.cpp
parent3f15d496d65600fdd53f0b91a39a8cd5d2d91f7d (diff)
Revert "options/metatype: nuke it"
This was making sliders unable to save at all.
Diffstat (limited to 'options/metatype.cpp')
-rw-r--r--options/metatype.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/options/metatype.cpp b/options/metatype.cpp
new file mode 100644
index 00000000..8f92f385
--- /dev/null
+++ b/options/metatype.cpp
@@ -0,0 +1,23 @@
+#include "slider.hpp"
+#include "metatype.hpp"
+
+#define OPENTRACK_REGISTER_METATYPE(t) ::options::detail::custom_type_initializer::declare_for_type<t>(#t)
+
+namespace options {
+namespace detail {
+
+custom_type_initializer::custom_type_initializer()
+{
+ OPENTRACK_REGISTER_METATYPE(slider_value);
+ OPENTRACK_REGISTER_METATYPE(QList<double>);
+ OPENTRACK_REGISTER_METATYPE(QList<float>);
+ OPENTRACK_REGISTER_METATYPE(QList<int>);
+ OPENTRACK_REGISTER_METATYPE(QList<bool>);
+ OPENTRACK_REGISTER_METATYPE(QList<QString>);
+ OPENTRACK_REGISTER_METATYPE(QList<QPointF>);
+}
+
+const custom_type_initializer custom_type_initializer::singleton;
+
+}
+}