aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Costa <[email protected]>2025-06-03 16:20:44 +0200
committerMiguel Costa <[email protected]>2025-07-02 09:06:06 +0000
commit67da5d331b5ba54c47ee88c4996d7adac0aaf408 (patch)
tree84c060dfde4250fad903636643bf5f861e70b17e
parent543f4ea007aa4f4c0c60f997aad53bf63d64ead1 (diff)
Add Qt.Exclude and Qt.Ignore attribsHEADdev
Task-number: QTBUG-134964 Change-Id: Ic1e56d9abc8fe0132c9662898e65f90292f84d3d Reviewed-by: Karsten Heimrich <[email protected]>
-rw-r--r--src/Qt.DotNet.Adapter/Qt/QtAttribs.cs37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/Qt.DotNet.Adapter/Qt/QtAttribs.cs b/src/Qt.DotNet.Adapter/Qt/QtAttribs.cs
new file mode 100644
index 0000000..37ca229
--- /dev/null
+++ b/src/Qt.DotNet.Adapter/Qt/QtAttribs.cs
@@ -0,0 +1,37 @@
+/***************************************************************************************************
+ Copyright (C) 2025 The Qt Company Ltd.
+ SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+***************************************************************************************************/
+
+using Qt.MetaObject;
+using System;
+
+namespace Qt
+{
+ [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
+ public class ExcludeAttribute : Attribute
+ {
+ public ExcludeAttribute(params Type[] excludedTypes)
+ { }
+ public ExcludeAttribute(params string[] excludedTypeNames)
+ { }
+ public bool Inherited { get; set; } = false;
+ }
+
+ [AttributeUsage(TypeAttributeTarget | MemberAttributeTarget, AllowMultiple = false)]
+ public class IgnoreAttribute : Attribute
+ {
+ private const AttributeTargets TypeAttributeTarget
+ = AttributeTargets.Class
+ | AttributeTargets.Struct
+ | AttributeTargets.Interface
+ | AttributeTargets.Enum
+ | AttributeTargets.Delegate;
+ private const AttributeTargets MemberAttributeTarget
+ = AttributeTargets.Constructor
+ | AttributeTargets.Method
+ | AttributeTargets.Property
+ | AttributeTargets.Field
+ | AttributeTargets.Event;
+ }
+}