texworks: add patch to fix build with qt 6.5

This commit is contained in:
Nick Cao
2023-04-16 22:17:30 +08:00
parent b4026106f7
commit d0565d403e
2 changed files with 28 additions and 0 deletions
@@ -0,0 +1,26 @@
From b26a91fd0f70e8f0a8f3360a5f371a1eace70002 Mon Sep 17 00:00:00 2001
From: Nick Cao <nickcao@nichi.co>
Date: Sun, 16 Apr 2023 22:10:55 +0800
Subject: [PATCH] fix build with qt 6.5
The fix is borrowed from https://github.com/hluk/CopyQ/pull/2324
---
src/scripting/Script.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/scripting/Script.cpp b/src/scripting/Script.cpp
index 3437f125..906eefde 100644
--- a/src/scripting/Script.cpp
+++ b/src/scripting/Script.cpp
@@ -352,7 +352,7 @@ Script::MethodResult Script::doCallMethod(QObject * obj, const QString& name,
}
else if (typeName == QString::fromLatin1("QVariant")) {
// QMetaType can't construct QVariant objects
- retValArg = Q_RETURN_ARG(QVariant, result);
+ retValArg = QGenericReturnArgument("QVariant", static_cast<void*>(result.data()));
}
else {
// Note: These two lines are a hack!
--
2.39.2
@@ -22,6 +22,8 @@ stdenv.mkDerivation rec {
sha256 = "sha256-X0VuXNghHoNsNNDfZJXXJ++nfUa5ofjW8rv3CHOUzxQ=";
};
patches = [ ./0001-fix-build-with-qt-6.5.patch ];
nativeBuildInputs = [
cmake
pkg-config