gammaray/fix-build-qt-5.12-again.patch

28 lines
1.1 KiB
Diff
Raw Normal View History

From d0c9f9c8a0c62c53812c25e5bd77119f214cd1f8 Mon Sep 17 00:00:00 2001
From: Volker Krause <volker.krause@kdab.com>
Date: Mon, 20 Aug 2018 13:47:35 +0200
Subject: [PATCH] Adapt to Qt 5.12 V4 identifier changes
---
plugins/qmlsupport/qmlcontextpropertyadaptor.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/plugins/qmlsupport/qmlcontextpropertyadaptor.cpp b/plugins/qmlsupport/qmlcontextpropertyadaptor.cpp
index 2c183f083..1c24eaa44 100644
--- a/plugins/qmlsupport/qmlcontextpropertyadaptor.cpp
+++ b/plugins/qmlsupport/qmlcontextpropertyadaptor.cpp
@@ -100,8 +100,13 @@ void QmlContextPropertyAdaptor::doSetObject(const ObjectInstance &oi)
QV4::IdentifierHashEntry *e = propNames.d->entries;
QV4::IdentifierHashEntry *end = e + propNames.d->alloc;
while (e < end) {
+#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
if (e->identifier)
m_contextPropertyNames.push_back(e->identifier->string);
+#else
+ if (e->identifier.isValid())
+ m_contextPropertyNames.push_back(e->identifier.toQString());
+#endif
++e;
}
#else