genode/repos/libports/src/lib/qt5/patches/qtbase_genode_qtscriptclass...

41 lines
1.7 KiB
Diff

qtbase_genode_qtscriptclassic.patch
diff --git a/qtbase/src/corelib/global/qglobal.h b/qtbase/src/corelib/global/qglobal.h
index 223ebbc..965e6d0 100644
--- a/qtbase/src/corelib/global/qglobal.h
+++ b/qtbase/src/corelib/global/qglobal.h
@@ -923,13 +923,17 @@ inline void qSwap(T &value1, T &value2)
swap(value1, value2);
}
+#ifndef Q_OS_GENODE
#if QT_DEPRECATED_SINCE(5, 0)
+#endif
+#else
+/* QtScript classic still needs these functions */
Q_CORE_EXPORT QT_DEPRECATED void *qMalloc(size_t size) Q_ALLOC_SIZE(1);
Q_CORE_EXPORT QT_DEPRECATED void qFree(void *ptr);
Q_CORE_EXPORT QT_DEPRECATED void *qRealloc(void *ptr, size_t size) Q_ALLOC_SIZE(2);
Q_CORE_EXPORT QT_DEPRECATED void *qMemCopy(void *dest, const void *src, size_t n);
Q_CORE_EXPORT QT_DEPRECATED void *qMemSet(void *dest, int c, size_t n);
-#endif
+#endif /* Q_OS_GENODE */
Q_CORE_EXPORT void *qMallocAligned(size_t size, size_t alignment) Q_ALLOC_SIZE(1);
Q_CORE_EXPORT void *qReallocAligned(void *ptr, size_t size, size_t oldsize, size_t alignment) Q_ALLOC_SIZE(2);
Q_CORE_EXPORT void qFreeAligned(void *ptr);
diff --git a/qtbase/src/corelib/kernel/qvariant_p.h b/qtbase/src/corelib/kernel/qvariant_p.h
index b22b7c2..f79d473 100644
--- a/qtbase/src/corelib/kernel/qvariant_p.h
+++ b/qtbase/src/corelib/kernel/qvariant_p.h
@@ -380,7 +380,10 @@ public:
void delegate(const void*)
{
+#ifndef Q_OS_GENODE
+ /* this warning appears often when using the QtScript classic lib (tetrix), not sure if it is serious */
qWarning("Trying to create a QVariant instance of QMetaType::Void type, an invalid QVariant will be constructed instead");
+#endif
m_x->type = QMetaType::UnknownType;
m_x->is_shared = false;
m_x->is_null = !m_copy;