Skip to content

Commit

Permalink
Fix behavior of DitheringMode with QVariant in Qt5
Browse files Browse the repository at this point in the history
Fixes #3304
  • Loading branch information
10110111 committed Jul 6, 2023
1 parent 26ab36d commit 7e89ba7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/StelCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2056,6 +2056,7 @@ void StelCore::registerMathMetaTypes()
qRegisterMetaType<Mat4f>();
qRegisterMetaType<Mat3d>();
qRegisterMetaType<Mat3f>();
qRegisterMetaType<DitheringMode>();

#if (QT_VERSION<QT_VERSION_CHECK(6,0,0))
//registers the QDataStream operators, so that QVariants with these types can be saved
Expand All @@ -2072,6 +2073,7 @@ void StelCore::registerMathMetaTypes()
qRegisterMetaTypeStreamOperators<Mat4f>();
qRegisterMetaTypeStreamOperators<Mat3d>();
qRegisterMetaTypeStreamOperators<Mat3f>();
qRegisterMetaTypeStreamOperators<DitheringMode>();
#endif
//for debugging QVariants with these types, it helps if we register the string converters
// This is also required for QJSEngine.
Expand Down

0 comments on commit 7e89ba7

Please sign in to comment.