qtbase_genode_qtscriptclassic.patch

From: Christian Prochaska <christian.prochaska@genode-labs.com>


---
 qtbase/src/corelib/global/qglobal.h    |    6 +++++-
 qtbase/src/corelib/kernel/qvariant_p.h |    3 +++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/qtbase/src/corelib/global/qglobal.h b/qtbase/src/corelib/global/qglobal.h
index 3217691..570158a 100644
--- a/qtbase/src/corelib/global/qglobal.h
+++ b/qtbase/src/corelib/global/qglobal.h
@@ -866,13 +866,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 bf88def..d6c2b0c 100644
--- a/qtbase/src/corelib/kernel/qvariant_p.h
+++ b/qtbase/src/corelib/kernel/qvariant_p.h
@@ -350,7 +350,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;
