From bc4a22f142c1a30e27fb4391d4655a67b2e38bb3 Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 15 Apr 2025 20:50:00 +1200 Subject: [PATCH] genbindings: Qt6Network dtls functions require QT_CONFIG(dtls) --- cmd/genbindings/config-allowlist.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cmd/genbindings/config-allowlist.go b/cmd/genbindings/config-allowlist.go index 4fa13ca8..299f30cb 100644 --- a/cmd/genbindings/config-allowlist.go +++ b/cmd/genbindings/config-allowlist.go @@ -657,6 +657,15 @@ func ApplyQuirks(packageName, className string, mm *CppMethod) { mm.ReturnType.BecomesConstInVersion = addr("6.9") } + // macOS Brew does not have Qt6Network dtls functionality enabled, but we + // want these functions to exist on other platforms + // Can't block in Go-side + if (packageName == "qt6/network" || packageName == "qt/network") && + className == "QSslConfiguration" && + (mm.MethodName == "dtlsCookieVerificationEnabled" || mm.MethodName == "setDtlsCookieVerificationEnabled" || mm.MethodName == "defaultDtlsConfiguration" || mm.MethodName == "setDefaultDtlsConfiguration") { + mm.RequireCpp = addr("QT_CONFIG(dtls)") + } + if className == "QFileDialog" && mm.MethodName == "saveFileContent" && mm.IsStatic && len(mm.Parameters) > 1 { // The prototype was changed from // [Qt 5 - 6.6] void QFileDialog::saveFileContent(const QByteArray &fileContent, const QString &fileNameHint = QString())