Skip to content

Commit 38a530e

Browse files
committed
Updated C++# to get reusable delegates.
Signed-off-by: Dimitar Dobrev <[email protected]>
1 parent dbe20aa commit 38a530e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

QtSharp/Documentation.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ private void DocumentQtProperty(Declaration property)
337337
}
338338

339339
var node = this.propertyNodes[property.Name].Find(
340-
c => c.Attribute("fullname").Value == property.QualifiedName);
340+
c => c.Attribute("fullname").Value == property.QualifiedOriginalName);
341341
if (node != null && node.Attribute("href") != null)
342342
{
343343
var link = node.Attribute("href").Value.Split('#');

QtSharp/QString.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ public override void CSharpMarshalToNative(MarshalContext ctx)
4141
{
4242
Type.TryGetClass(out @class);
4343
}
44-
var qualifiedIdentifier = CSharpMarshalNativeToManagedPrinter.QualifiedIdentifier(@class.OriginalClass ?? @class);
44+
typePrinter = typePrinter ?? (typePrinter = new CSharpTypePrinter(ctx.Driver));
45+
var qualifiedIdentifier = (@class.OriginalClass ?? @class).Visit(typePrinter);
4546
ctx.Return.Write("ReferenceEquals(__qstring{0}, null) ? new {1}.Internal() : *({1}.Internal*) (__qstring{0}.{2})",
4647
ctx.ParameterIndex, qualifiedIdentifier, Helpers.InstanceIdentifier);
4748
}
@@ -51,5 +52,7 @@ public override void CSharpMarshalToManaged(MarshalContext ctx)
5152
ctx.Return.Write("Marshal.PtrToStringUni(new IntPtr(QtCore.QString.{0}({1}).Utf16))",
5253
Helpers.CreateInstanceIdentifier, ctx.ReturnVarName);
5354
}
55+
56+
CSharpTypePrinter typePrinter;
5457
}
5558
}

0 commit comments

Comments
 (0)