Skip to content

Commit 8febd13

Browse files
committed
Removed all mappings to C# structures because their empty constructors are not correctly wrapped yet.
Also had to update C++# because some of the default parameters which used structures exposed problems when they were changed to use classes. Signed-off-by: Dimitar Dobrev <[email protected]>
1 parent 78e975d commit 8febd13

7 files changed

+31
-40
lines changed

CHANGELOG

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
0.6.1 - 17.9.2016
2+
Fixed:
3+
- Removed all mappings to C# structures because their empty constructors are not correctly wrapped yet.
4+
15
0.6.0 - 14.9.2016
26
BREAKING: The bindings are now named according to the pattern:
37
Qt<module>.Sharp

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.7.1\lib\CppSharp.dll</HintPath>
66+
<HintPath>..\packages\CppSharp.0.7.2\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.7.1\lib\CppSharp.AST.dll</HintPath>
70+
<HintPath>..\packages\CppSharp.0.7.2\lib\CppSharp.AST.dll</HintPath>
7171
<Private>True</Private>
7272
</Reference>
7373
<Reference Include="CppSharp.Generator, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
74-
<HintPath>..\packages\CppSharp.0.7.1\lib\CppSharp.Generator.dll</HintPath>
74+
<HintPath>..\packages\CppSharp.0.7.2\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.7.1\lib\CppSharp.Parser.dll</HintPath>
78+
<HintPath>..\packages\CppSharp.0.7.2\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.7.1\lib\CppSharp.Parser.CLI.dll</HintPath>
82+
<HintPath>..\packages\CppSharp.0.7.2\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.7.1\lib\CppSharp.Runtime.dll</HintPath>
86+
<HintPath>..\packages\CppSharp.0.7.2\lib\CppSharp.Runtime.dll</HintPath>
8787
<Private>True</Private>
8888
</Reference>
8989
<Reference Include="System" />

QtSharp.CLI/packages.config

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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.7.1" targetFramework="net451" developmentDependency="true" />
4+
<package id="CppSharp" version="0.7.2" targetFramework="net451" developmentDependency="true" />
55
</packages>

QtSharp/CompileInlinesPass.cs

+13-14
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,26 @@ public CompileInlinesPass(string qmake, string make)
2222

2323
public override bool VisitLibrary(ASTContext context)
2424
{
25+
string error;
26+
const string qtVersionVariable = "QT_VERSION";
27+
var qtVersion = ProcessHelper.Run(this.qmake, string.Format("-query {0}", qtVersionVariable), out error);
28+
var qtVersionFile = Path.Combine(this.Context.Options.OutputDir, qtVersionVariable);
29+
var qtVersionFileInfo = new FileInfo(qtVersionFile);
30+
var text = string.Empty;
31+
if (!qtVersionFileInfo.Exists || (text = File.ReadAllText(qtVersionFile)) != qtVersion)
32+
{
33+
File.WriteAllText(qtVersionFile, qtVersion);
34+
qtVersionFileInfo = new FileInfo(qtVersionFile);
35+
}
36+
var dir = Platform.IsMacOS ? this.Context.Options.OutputDir : Path.Combine(this.Context.Options.OutputDir, "release");
2537
foreach (var module in this.Context.Options.Modules)
2638
{
27-
string error;
28-
const string qtVersionVariable = "QT_VERSION";
29-
var qtVersion = ProcessHelper.Run(this.qmake, string.Format("-query {0}", qtVersionVariable), out error);
30-
var qtVersionFile = Path.Combine(this.Context.Options.OutputDir, qtVersionVariable);
31-
var dir = Platform.IsMacOS ? this.Context.Options.OutputDir : Path.Combine(this.Context.Options.OutputDir, "release");
3239
var inlines = Path.GetFileName(string.Format("{0}{1}.{2}", Platform.IsWindows ? string.Empty : "lib",
3340
module.InlinesLibraryName, Platform.IsMacOS ? "dylib" : "dll"));
3441
var libFile = Path.Combine(dir, inlines);
35-
var qtVersionFileInfo = new FileInfo(qtVersionFile);
3642
var inlinesFileInfo = new FileInfo(libFile);
37-
string text = string.Empty;
38-
if (!qtVersionFileInfo.Exists || (text = File.ReadAllText(qtVersionFile)) != qtVersion ||
39-
!inlinesFileInfo.Exists || qtVersionFileInfo.CreationTimeUtc > inlinesFileInfo.CreationTimeUtc ||
40-
qtVersionFileInfo.LastWriteTimeUtc > inlinesFileInfo.LastWriteTimeUtc)
43+
if (!inlinesFileInfo.Exists || qtVersionFileInfo.LastWriteTimeUtc > inlinesFileInfo.LastWriteTimeUtc)
4144
{
42-
if (text != qtVersion)
43-
{
44-
File.WriteAllText(qtVersionFile, qtVersion);
45-
}
4645
if (!this.CompileInlines(module))
4746
{
4847
continue;

QtSharp/QtSharp.cs

-12
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,6 @@ public void Preprocess(Driver driver, ASTContext lib)
4545
IgnorePrivateDeclarations(unit);
4646
}
4747
}
48-
lib.SetClassAsValueType("QByteArray");
49-
lib.SetClassAsValueType("QLocale");
50-
lib.SetClassAsValueType("QModelIndex");
51-
lib.SetClassAsValueType("QPoint");
52-
lib.SetClassAsValueType("QPointF");
53-
lib.SetClassAsValueType("QSize");
54-
lib.SetClassAsValueType("QSizeF");
55-
lib.SetClassAsValueType("QRect");
56-
lib.SetClassAsValueType("QRectF");
57-
lib.SetClassAsValueType("QGenericArgument");
58-
lib.SetClassAsValueType("QGenericReturnArgument");
59-
lib.SetClassAsValueType("QVariant");
6048

6149
// QString is type-mapped to string so we only need two methods for the conversion
6250
var qString = lib.FindCompleteClass("QString");

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.7.1\lib\CppSharp.dll</HintPath>
41+
<HintPath>..\packages\CppSharp.0.7.2\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.7.1\lib\CppSharp.AST.dll</HintPath>
45+
<HintPath>..\packages\CppSharp.0.7.2\lib\CppSharp.AST.dll</HintPath>
4646
<Private>True</Private>
4747
</Reference>
4848
<Reference Include="CppSharp.Generator, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
49-
<HintPath>..\packages\CppSharp.0.7.1\lib\CppSharp.Generator.dll</HintPath>
49+
<HintPath>..\packages\CppSharp.0.7.2\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.7.1\lib\CppSharp.Parser.dll</HintPath>
53+
<HintPath>..\packages\CppSharp.0.7.2\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.7.1\lib\CppSharp.Parser.CLI.dll</HintPath>
57+
<HintPath>..\packages\CppSharp.0.7.2\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.7.1\lib\CppSharp.Runtime.dll</HintPath>
61+
<HintPath>..\packages\CppSharp.0.7.2\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">

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.7.1" targetFramework="net451" developmentDependency="true" />
4+
<package id="CppSharp" version="0.7.2" targetFramework="net451" developmentDependency="true" />
55
<package id="HtmlAgilityPack" version="1.4.9.5" targetFramework="net451" />
66
<package id="zlib.net" version="1.0.4" targetFramework="net451" />
77
</packages>

0 commit comments

Comments
 (0)