[neon/extras/grantlee/Neon/release] debian: register MetaEnumVariable for comparison

Pino Toscano null at kde.org
Mon Sep 2 17:01:22 BST 2024


Git commit 80192e5255fa7b945790b139ea8b8651160bc4f3 by Pino Toscano.
Committed on 12/08/2023 at 10:10.
Pushed by jriddell into branch 'Neon/release'.

register MetaEnumVariable for comparison

M  +2    -0    debian/changelog
A  +37   -0    debian/patches/register-comparator.diff
A  +1    -0    debian/patches/series

https://invent.kde.org/neon/extras/grantlee/-/commit/80192e5255fa7b945790b139ea8b8651160bc4f3

diff --git a/debian/changelog b/debian/changelog
index 8a45c0a..d75953b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,8 @@ grantlee5 (5.3.1-2) UNRELEASED; urgency=medium
   [ Pino Toscano ]
   * Build with -ffloat-store on i386 architectures to fix rounding issues with
     double/qreal.
+  * Properly register MetaEnumVariable for comparison; should hopefully fix the
+    enum tests on some architectures; patch register-comparator.diff.
 
  -- Debian Krap Maintainers <debian-qt-kde at lists.debian.org>  Sat, 12 Aug 2023 10:35:40 +0200
 
diff --git a/debian/patches/register-comparator.diff b/debian/patches/register-comparator.diff
new file mode 100644
index 0000000..3c791e3
--- /dev/null
+++ b/debian/patches/register-comparator.diff
@@ -0,0 +1,37 @@
+Author: Pino Toscano <pino at debian.org>
+Description: Registr MetaEnumVariable for comparison
+ .
+ This is needed to ensure that MetaEnumVariable can be properly handled
+ for comparisons, e.g. as done via QVariant::compare().
+Forwarded: https://github.com/steveire/grantlee/pull/91
+Last-Update: 2023-08-12
+
+diff --git a/templates/lib/engine.cpp b/templates/lib/engine.cpp
+index c6a6987..d31b54a 100644
+--- a/templates/lib/engine.cpp
++++ b/templates/lib/engine.cpp
+@@ -24,6 +24,7 @@
+ #include "exception.h"
+ #include "grantlee_config_p.h"
+ #include "grantlee_version.h"
++#include "metaenumvariable_p.h"
+ #ifdef QT_QML_LIB
+ #include "scriptabletags.h"
+ #endif
+@@ -32,6 +33,7 @@
+ 
+ #include <QtCore/QCoreApplication>
+ #include <QtCore/QDir>
++#include <QtCore/QMetaType>
+ #include <QtCore/QPluginLoader>
+ #include <QtCore/QTextStream>
+ 
+@@ -48,6 +50,8 @@ Engine::Engine(QObject *parent)
+ 
+   d_ptr->m_pluginDirs = QCoreApplication::libraryPaths();
+   d_ptr->m_pluginDirs << QString::fromLocal8Bit(GRANTLEE_PLUGIN_PATH);
++
++  QMetaType::registerComparators<MetaEnumVariable>();
+ }
+ 
+ Engine::~Engine()
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..19c9d4f
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+register-comparator.diff



More information about the Neon-commits mailing list