From 19abb0b24950da38f52e23e5ed72624ab5fc8b8a Mon Sep 17 00:00:00 2001 From: harry Date: Tue, 30 Jan 2024 06:50:40 -0500 Subject: [PATCH] Fix for build break, QJSEngine::setObjectOwnership does not exist in Qt5. Only in version 6. --- src/drivers/Qt/QtScriptManager.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/drivers/Qt/QtScriptManager.cpp b/src/drivers/Qt/QtScriptManager.cpp index f772e227..e9ab29e9 100644 --- a/src/drivers/Qt/QtScriptManager.cpp +++ b/src/drivers/Qt/QtScriptManager.cpp @@ -256,7 +256,9 @@ QJSValue EmuScriptObject::getScreenPixel(int x, int y, bool useBackup) QJSValue jsVal = engine->newQObject(pixelObj); +#if QT_VERSION >= QT_VERSION_CHECK(6,0,0) QJSEngine::setObjectOwnership( pixelObj, QJSEngine::JavaScriptOwnership); +#endif return jsVal; }