Skip to content

Commit 3a1df3e

Browse files
committed
Fixed crashes when calling inlined constructors and destructors.
Signed-off-by: Dimitar Dobrev <[email protected]>
1 parent 5dc69ae commit 3a1df3e

8 files changed

+34
-31
lines changed

Diff for: CHANGELOG

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
0.7.1 - 10.2.2017
2+
Fixed:
3+
- Crashes when calling certain constructors and destructors.
4+
15
0.7.0 - 5.2.2017
26
Added:
37
- Bindings for Qt 5.8.

Diff for: QtSharp.CLI/QtSharp.CLI.csproj

+6-6
Original file line numberDiff line numberDiff line change
@@ -63,27 +63,27 @@
6363
</PropertyGroup>
6464
<ItemGroup>
6565
<Reference Include="CppSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
66-
<HintPath>..\packages\CppSharp.0.8.3\lib\CppSharp.dll</HintPath>
66+
<HintPath>..\packages\CppSharp.0.8.4\lib\CppSharp.dll</HintPath>
6767
<Private>True</Private>
6868
</Reference>
6969
<Reference Include="CppSharp.AST, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
70-
<HintPath>..\packages\CppSharp.0.8.3\lib\CppSharp.AST.dll</HintPath>
70+
<HintPath>..\packages\CppSharp.0.8.4\lib\CppSharp.AST.dll</HintPath>
7171
<Private>True</Private>
7272
</Reference>
7373
<Reference Include="CppSharp.Generator, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
74-
<HintPath>..\packages\CppSharp.0.8.3\lib\CppSharp.Generator.dll</HintPath>
74+
<HintPath>..\packages\CppSharp.0.8.4\lib\CppSharp.Generator.dll</HintPath>
7575
<Private>True</Private>
7676
</Reference>
7777
<Reference Include="CppSharp.Parser, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
78-
<HintPath>..\packages\CppSharp.0.8.3\lib\CppSharp.Parser.dll</HintPath>
78+
<HintPath>..\packages\CppSharp.0.8.4\lib\CppSharp.Parser.dll</HintPath>
7979
<Private>True</Private>
8080
</Reference>
8181
<Reference Include="CppSharp.Parser.CLI, Version=0.0.0.0, Culture=neutral, processorArchitecture=AMD64">
82-
<HintPath>..\packages\CppSharp.0.8.3\lib\CppSharp.Parser.CLI.dll</HintPath>
82+
<HintPath>..\packages\CppSharp.0.8.4\lib\CppSharp.Parser.CLI.dll</HintPath>
8383
<Private>True</Private>
8484
</Reference>
8585
<Reference Include="CppSharp.Runtime, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
86-
<HintPath>..\packages\CppSharp.0.8.3\lib\CppSharp.Runtime.dll</HintPath>
86+
<HintPath>..\packages\CppSharp.0.8.4\lib\CppSharp.Runtime.dll</HintPath>
8787
<Private>True</Private>
8888
</Reference>
8989
<Reference Include="Mono.Cecil, Version=0.9.6.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">

Diff for: QtSharp.CLI/packages.config

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
33
<package id="Baseclass.Contrib.Nuget.Output" version="2.1.0" targetFramework="net451" />
4-
<package id="CppSharp" version="0.8.3" targetFramework="net461" developmentDependency="true" />
4+
<package id="CppSharp" version="0.8.4" targetFramework="net461" developmentDependency="true" />
55
<package id="Mono.Cecil" version="0.9.6.4" targetFramework="net461" />
66
</packages>

Diff for: QtSharp.sln

+6-6
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ Global
4444
{DBDEB3EE-2EB3-4F03-8276-A7D5A350EB95}.Release|Any CPU.Build.0 = Release|Any CPU
4545
{DBDEB3EE-2EB3-4F03-8276-A7D5A350EB95}.Release|x86.ActiveCfg = Release|x86
4646
{DBDEB3EE-2EB3-4F03-8276-A7D5A350EB95}.Release|x86.Build.0 = Release|x86
47-
{5E8F503D-1B37-4298-855D-06F81B5B4630}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
48-
{5E8F503D-1B37-4298-855D-06F81B5B4630}.Debug|Any CPU.Build.0 = Debug|Any CPU
49-
{5E8F503D-1B37-4298-855D-06F81B5B4630}.Debug|x86.ActiveCfg = Debug|Any CPU
50-
{5E8F503D-1B37-4298-855D-06F81B5B4630}.Release|Any CPU.ActiveCfg = Release|Any CPU
51-
{5E8F503D-1B37-4298-855D-06F81B5B4630}.Release|Any CPU.Build.0 = Release|Any CPU
52-
{5E8F503D-1B37-4298-855D-06F81B5B4630}.Release|x86.ActiveCfg = Release|Any CPU
47+
{5E8F503D-1B37-4298-855D-06F81B5B4630}.Debug|Any CPU.ActiveCfg = Debug|x86
48+
{5E8F503D-1B37-4298-855D-06F81B5B4630}.Debug|x86.ActiveCfg = Debug|x86
49+
{5E8F503D-1B37-4298-855D-06F81B5B4630}.Debug|x86.Build.0 = Debug|x86
50+
{5E8F503D-1B37-4298-855D-06F81B5B4630}.Release|Any CPU.ActiveCfg = Release|x86
51+
{5E8F503D-1B37-4298-855D-06F81B5B4630}.Release|x86.ActiveCfg = Release|x86
52+
{5E8F503D-1B37-4298-855D-06F81B5B4630}.Release|x86.Build.0 = Release|x86
5353
EndGlobalSection
5454
GlobalSection(SolutionProperties) = preSolution
5555
HideSolutionNode = FALSE

Diff for: QtSharp/GenerateEventEventsPass.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ public override bool VisitTranslationUnit(TranslationUnit unit)
2929

3030
private void OnUnitGenerated(GeneratorOutput generatorOutput)
3131
{
32-
var blocks = (from template in generatorOutput.Templates
33-
from block in template.FindBlocks(CSharpBlockKind.Method)
32+
var blocks = (from output in generatorOutput.Outputs
33+
from block in output.FindBlocks(CSharpBlockKind.Method)
3434
where this.events.Contains(block.Object)
3535
select block).ToList();
3636
foreach (var block in blocks)

Diff for: QtSharp/GenerateSignalEventsPass.cs

+8-9
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ private void OnUnitGenerated(GeneratorOutput generatorOutput)
3939

4040
private void GenerateSignalEvents(GeneratorOutput generatorOutput)
4141
{
42-
foreach (var block in from template in generatorOutput.Templates
43-
from block in template.FindBlocks(CSharpBlockKind.Event)
42+
foreach (var block in from output in generatorOutput.Outputs
43+
from block in output.FindBlocks(CSharpBlockKind.Event)
4444
select block)
4545
{
4646
Event @event = (Event) block.Object;
@@ -118,13 +118,12 @@ from e in @event.Parameters
118118
}}", fullNameBuilder, finalName, signature));
119119
}
120120
}
121-
var qtMetacall = (
122-
from template in generatorOutput.Templates
123-
from block in template.FindBlocks(CSharpBlockKind.Method)
124-
let declaration = block.Object as Declaration
125-
where declaration != null && declaration.Name == "QtMetacall" &&
126-
declaration.Namespace.Name == "QObject"
127-
select block).FirstOrDefault();
121+
var qtMetacall = (from output in generatorOutput.Outputs
122+
from block in output.FindBlocks(CSharpBlockKind.Method)
123+
let declaration = block.Object as Declaration
124+
where declaration != null && declaration.Name == "QtMetacall" &&
125+
declaration.Namespace.Name == "QObject"
126+
select block).FirstOrDefault();
128127
if (qtMetacall != null)
129128
{
130129
qtMetacall.Text.StringBuilder.Replace("return __ret;", "return HandleQtMetacall(__ret, _0, _2);");

Diff for: QtSharp/QtSharp.csproj

+6-6
Original file line numberDiff line numberDiff line change
@@ -38,27 +38,27 @@
3838
</PropertyGroup>
3939
<ItemGroup>
4040
<Reference Include="CppSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
41-
<HintPath>..\packages\CppSharp.0.8.3\lib\CppSharp.dll</HintPath>
41+
<HintPath>..\packages\CppSharp.0.8.4\lib\CppSharp.dll</HintPath>
4242
<Private>True</Private>
4343
</Reference>
4444
<Reference Include="CppSharp.AST, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
45-
<HintPath>..\packages\CppSharp.0.8.3\lib\CppSharp.AST.dll</HintPath>
45+
<HintPath>..\packages\CppSharp.0.8.4\lib\CppSharp.AST.dll</HintPath>
4646
<Private>True</Private>
4747
</Reference>
4848
<Reference Include="CppSharp.Generator, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
49-
<HintPath>..\packages\CppSharp.0.8.3\lib\CppSharp.Generator.dll</HintPath>
49+
<HintPath>..\packages\CppSharp.0.8.4\lib\CppSharp.Generator.dll</HintPath>
5050
<Private>True</Private>
5151
</Reference>
5252
<Reference Include="CppSharp.Parser, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
53-
<HintPath>..\packages\CppSharp.0.8.3\lib\CppSharp.Parser.dll</HintPath>
53+
<HintPath>..\packages\CppSharp.0.8.4\lib\CppSharp.Parser.dll</HintPath>
5454
<Private>True</Private>
5555
</Reference>
5656
<Reference Include="CppSharp.Parser.CLI, Version=0.0.0.0, Culture=neutral, processorArchitecture=AMD64">
57-
<HintPath>..\packages\CppSharp.0.8.3\lib\CppSharp.Parser.CLI.dll</HintPath>
57+
<HintPath>..\packages\CppSharp.0.8.4\lib\CppSharp.Parser.CLI.dll</HintPath>
5858
<Private>True</Private>
5959
</Reference>
6060
<Reference Include="CppSharp.Runtime, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
61-
<HintPath>..\packages\CppSharp.0.8.3\lib\CppSharp.Runtime.dll</HintPath>
61+
<HintPath>..\packages\CppSharp.0.8.4\lib\CppSharp.Runtime.dll</HintPath>
6262
<Private>True</Private>
6363
</Reference>
6464
<Reference Include="HtmlAgilityPack, Version=1.4.9.5, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">

Diff for: QtSharp/packages.config

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
33
<package id="Baseclass.Contrib.Nuget.Output" version="2.1.0" targetFramework="net451" />
4-
<package id="CppSharp" version="0.8.3" targetFramework="net461" developmentDependency="true" />
4+
<package id="CppSharp" version="0.8.4" targetFramework="net461" developmentDependency="true" />
55
<package id="HtmlAgilityPack" version="1.4.9.5" targetFramework="net451" />
66
<package id="Mono.Cecil" version="0.9.6.4" targetFramework="net461" />
77
<package id="zlib.net" version="1.0.4" targetFramework="net451" />

0 commit comments

Comments
 (0)