Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
QMetaType no longer has any registerXXX methods in Qt6
Halla Rempt640810b02768
diff --git a/libs/brush/kis_brush.cpp b/libs/brush/kis_brush.cppindex aef075006c..839c582766 100644--- a/libs/brush/kis_brush.cpp+++ b/libs/brush/kis_brush.cpp@@ -47,7 +47,9 @@KIS_DECLARE_STATIC_INITIALIZER {qRegisterMetaType<KisBrushSP>("KisBrushSP");+#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))QMetaType::registerEqualsComparator<KisBrushSP>();+#endif}const QString KisBrush::brushTypeMetaDataKey = "image-based-brush";diff --git a/libs/flake/text/KoSvgText.cpp b/libs/flake/text/KoSvgText.cppindex 495628342e..5c1d3155f8 100644--- a/libs/flake/text/KoSvgText.cpp+++ b/libs/flake/text/KoSvgText.cpp@@ -23,40 +23,48 @@KIS_DECLARE_STATIC_INITIALIZER {qRegisterMetaType<KoSvgText::CssLengthPercentage>("KoSvgText::CssLengthPercentage");+ qRegisterMetaType<KoSvgText::AutoValue>("KoSvgText::AutoValue");+ qRegisterMetaType<KoSvgText::AutoLengthPercentage>("KoSvgText::AutoLengthPercentage");+ qRegisterMetaType<KoSvgText::StrokeProperty>("KoSvgText::StrokeProperty");+ qRegisterMetaType<KoSvgText::TextTransformInfo>("KoSvgText::TextTransformInfo");+ qRegisterMetaType<KoSvgText::TextIndentInfo>("KoSvgText::TextIndentInfo");+ qRegisterMetaType<KoSvgText::TabSizeInfo>("KoSvgText::TabSizeInfo");+ qRegisterMetaType<KoSvgText::LineHeightInfo>("KoSvgText::LineHeightInfo");++#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))QMetaType::registerEqualsComparator<KoSvgText::CssLengthPercentage>();QMetaType::registerDebugStreamOperator<KoSvgText::CssLengthPercentage>();- qRegisterMetaType<KoSvgText::AutoValue>("KoSvgText::AutoValue");QMetaType::registerEqualsComparator<KoSvgText::AutoValue>();QMetaType::registerDebugStreamOperator<KoSvgText::AutoValue>();- qRegisterMetaType<KoSvgText::AutoLengthPercentage>("KoSvgText::AutoLengthPercentage");+QMetaType::registerEqualsComparator<KoSvgText::AutoLengthPercentage>();QMetaType::registerDebugStreamOperator<KoSvgText::AutoLengthPercentage>();- qRegisterMetaType<KoSvgText::BackgroundProperty>("KoSvgText::BackgroundProperty");+QMetaType::registerEqualsComparator<KoSvgText::BackgroundProperty>();QMetaType::registerDebugStreamOperator<KoSvgText::BackgroundProperty>();- qRegisterMetaType<KoSvgText::StrokeProperty>("KoSvgText::StrokeProperty");+QMetaType::registerEqualsComparator<KoSvgText::StrokeProperty>();QMetaType::registerDebugStreamOperator<KoSvgText::StrokeProperty>();- qRegisterMetaType<KoSvgText::TextTransformInfo>("KoSvgText::TextTransformInfo");+QMetaType::registerEqualsComparator<KoSvgText::TextTransformInfo>();QMetaType::registerDebugStreamOperator<KoSvgText::TextTransformInfo>();- qRegisterMetaType<KoSvgText::TextIndentInfo>("KoSvgText::TextIndentInfo");+QMetaType::registerEqualsComparator<KoSvgText::TextIndentInfo>();QMetaType::registerDebugStreamOperator<KoSvgText::TextIndentInfo>();- qRegisterMetaType<KoSvgText::TabSizeInfo>("KoSvgText::TabSizeInfo");+QMetaType::registerEqualsComparator<KoSvgText::TabSizeInfo>();QMetaType::registerDebugStreamOperator<KoSvgText::TabSizeInfo>();- qRegisterMetaType<KoSvgText::LineHeightInfo>("KoSvgText::LineHeightInfo");QMetaType::registerEqualsComparator<KoSvgText::LineHeightInfo>();QMetaType::registerDebugStreamOperator<KoSvgText::LineHeightInfo>();+#endif}namespace KoSvgText {diff --git a/libs/flake/text/KoSvgTextPropertyData.cpp b/libs/flake/text/KoSvgTextPropertyData.cppindex a5866d77ac..96078be072 100644--- a/libs/flake/text/KoSvgTextPropertyData.cpp+++ b/libs/flake/text/KoSvgTextPropertyData.cpp@@ -10,8 +10,11 @@KIS_DECLARE_STATIC_INITIALIZER {qRegisterMetaType<KoSvgTextPropertyData>("KoSvgTextPropertyData");++#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))QMetaType::registerEqualsComparator<KoSvgTextPropertyData>();QMetaType::registerDebugStreamOperator<KoSvgTextPropertyData>();+#endif}QDebug operator<<(QDebug dbg, const KoSvgTextPropertyData &prop)diff --git a/libs/pigment/KoColor.cpp b/libs/pigment/KoColor.cppindex 5c4a3ee3e5..ee195970ab 100644--- a/libs/pigment/KoColor.cpp+++ b/libs/pigment/KoColor.cpp@@ -56,7 +56,9 @@ struct DefaultKoColorInitializer* We want KoColor to be comparable inside QVariant,* so we should generate comparators.*/+#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))QMetaType::registerEqualsComparator<KoColor>();+#endif}~DefaultKoColorInitializer() {diff --git a/libs/resources/KoResourceCacheInterface.cpp b/libs/resources/KoResourceCacheInterface.cppindex 84e62ee848..47fea77c50 100644--- a/libs/resources/KoResourceCacheInterface.cpp+++ b/libs/resources/KoResourceCacheInterface.cpp@@ -9,7 +9,9 @@KIS_DECLARE_STATIC_INITIALIZER {qRegisterMetaType<KoResourceCacheInterfaceSP>("KoResourceCacheInterfaceSP");+#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))QMetaType::registerEqualsComparator<KoResourceCacheInterfaceSP>();+#endif}KoResourceCacheInterface::~KoResourceCacheInterface()diff --git a/plugins/dockers/channeldocker/KisChannelsThumbnailsStrokeStrategy.cpp b/plugins/dockers/channeldocker/KisChannelsThumbnailsStrokeStrategy.cppindex 9d0acc3dcf..43a6e9fbc7 100644--- a/plugins/dockers/channeldocker/KisChannelsThumbnailsStrokeStrategy.cpp+++ b/plugins/dockers/channeldocker/KisChannelsThumbnailsStrokeStrategy.cpp@@ -14,7 +14,9 @@KIS_DECLARE_STATIC_INITIALIZER {qRegisterMetaType<QVector<QImage>>("QVector<QImage>");+#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))QMetaType::registerEqualsComparator<QVector<QImage>>();+#endif}void KisChannelsThumbnailsStrokeStrategy::reportThumbnailGenerationCompleted(KisPaintDeviceSP device, const QRect &rect)