From 5c8e383cd798cadfb93b46fa4bf5cba9e0d61413 Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Fri, 27 Sep 2024 15:21:18 +0200 Subject: [PATCH] Lua: Bind openExternalLinks Change-Id: I8b8f1083feec63bd36689f36db38a7a895ebf9dd Reviewed-by: hjk --- src/plugins/lua/bindings/gui.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/plugins/lua/bindings/gui.cpp b/src/plugins/lua/bindings/gui.cpp index bbaaff3b03c..c021c60924b 100644 --- a/src/plugins/lua/bindings/gui.cpp +++ b/src/plugins/lua/bindings/gui.cpp @@ -105,6 +105,7 @@ HAS_MEM_FUNC(setWidgetAttribute, hasSetWidgetAttribute); HAS_MEM_FUNC(setAutoFillBackground, hasSetAutoFillBackground); HAS_MEM_FUNC(setIconPath, hasSetIconPath); HAS_MEM_FUNC(setFlat, hasSetFlat); +HAS_MEM_FUNC(setOpenExternalLinks, hasSetOpenExternalLinks); template void setProperties(std::unique_ptr &item, const sol::table &children, QObject *guard) { @@ -201,6 +202,12 @@ void setProperties(std::unique_ptr &item, const sol::table &children, QObject if (readOnly) item->setReadOnly(*readOnly); } + if constexpr (hasSetOpenExternalLinks::value) { + sol::optional openExternalLinks = children.get>( + "openExternalLinks"); + if (openExternalLinks) + item->setOpenExternalLinks(*openExternalLinks); + } } template