summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorUwe Klotz <uklotz@mixxx.org>2021-01-31 14:02:33 +0100
committerUwe Klotz <uklotz@mixxx.org>2021-01-31 14:39:09 +0100
commitfcb59bbff8997094d2a0ce3e60afd7edb2bc0118 (patch)
tree9fbb99b0fa327d757251774b3ffeeb1ebf652784 /src
parent0848065bcccd6d263aba91d9b0ca485d43dd76d8 (diff)
Use Q_MOVABLE_TYPE instead of Q_PRIMITIVE_TYPE for std::optional
std::optional<primitive type> might not strictly qualify for a primitive type.
Diffstat (limited to 'src')
-rw-r--r--src/audio/types.h4
-rw-r--r--src/util/color/rgbcolor.h4
2 files changed, 3 insertions, 5 deletions
diff --git a/src/audio/types.h b/src/audio/types.h
index 327c5cc08f..2a20d50adb 100644
--- a/src/audio/types.h
+++ b/src/audio/types.h
@@ -202,10 +202,10 @@ QDebug operator<<(QDebug dbg, Bitrate arg);
Q_DECLARE_TYPEINFO(mixxx::audio::ChannelCount, Q_PRIMITIVE_TYPE);
Q_DECLARE_METATYPE(mixxx::audio::ChannelCount)
-Q_DECLARE_TYPEINFO(mixxx::audio::OptionalChannelLayout, Q_PRIMITIVE_TYPE);
+Q_DECLARE_TYPEINFO(mixxx::audio::OptionalChannelLayout, Q_MOVABLE_TYPE);
Q_DECLARE_METATYPE(mixxx::audio::OptionalChannelLayout)
-Q_DECLARE_TYPEINFO(mixxx::audio::OptionalSampleLayout, Q_PRIMITIVE_TYPE);
+Q_DECLARE_TYPEINFO(mixxx::audio::OptionalSampleLayout, Q_MOVABLE_TYPE);
Q_DECLARE_METATYPE(mixxx::audio::OptionalSampleLayout)
Q_DECLARE_TYPEINFO(mixxx::audio::SampleRate, Q_PRIMITIVE_TYPE);
diff --git a/src/util/color/rgbcolor.h b/src/util/color/rgbcolor.h
index 03c4c7fc57..25975b615a 100644
--- a/src/util/color/rgbcolor.h
+++ b/src/util/color/rgbcolor.h
@@ -238,7 +238,5 @@ inline QDebug operator<<(QDebug dbg, RgbColor::optional_t optionalColor) {
} // namespace mixxx
-// Assumption: A primitive type wrapped into std::optional is
-// still a primitive type.
-Q_DECLARE_TYPEINFO(std::optional<mixxx::RgbColor>, Q_PRIMITIVE_TYPE);
+Q_DECLARE_TYPEINFO(std::optional<mixxx::RgbColor>, Q_MOVABLE_TYPE);
Q_DECLARE_METATYPE(std::optional<mixxx::RgbColor>)