@@ -92,34 +92,6 @@ where string.IsNullOrEmpty(@enum.Name)
9292 {
9393 enumeration . Name = "TypeEnum" ;
9494 }
95-
96- // HACK: work around https://github.com/mono/CppSharp/issues/692
97- foreach ( var name in new [ ] { "QImage" , "QPixmap" } )
98- {
99- var @class = lib . FindCompleteClass ( name ) ;
100- var ctorWithArray = @class . Constructors . FirstOrDefault (
101- c => c . Parameters . Count == 1 && c . Parameters [ 0 ] . Type . Desugar ( ) is ArrayType ) ;
102- if ( ctorWithArray != null )
103- {
104- ctorWithArray . ExplicitlyIgnore ( ) ;
105- }
106- }
107- foreach ( var name in new [ ] { "QGraphicsScene" , "QGraphicsView" } )
108- {
109- var @class = lib . FindCompleteClass ( name ) ;
110- var drawItems = @class . Methods . FirstOrDefault ( m => m . OriginalName == "drawItems" ) ;
111- if ( drawItems != null )
112- {
113- drawItems . ExplicitlyIgnore ( ) ;
114- }
115- }
116- lib . FindCompleteClass ( "QAbstractPlanarVideoBuffer" ) . ExplicitlyIgnore ( ) ;
117- var qAbstractVideoBuffer = lib . FindCompleteClass ( "QAbstractVideoBuffer" ) ;
118- var mapPlanes = qAbstractVideoBuffer . Methods . FirstOrDefault ( m => m . OriginalName == "mapPlanes" ) ;
119- if ( mapPlanes != null )
120- {
121- mapPlanes . ExplicitlyIgnore ( ) ;
122- }
12395 }
12496
12597 public void Postprocess ( Driver driver , ASTContext lib )
@@ -224,6 +196,7 @@ public void Setup(Driver driver)
224196 module . Libraries . Add ( libFile ) ;
225197 if ( moduleName == "Core" )
226198 {
199+ module . Headers . Insert ( 0 , "guiddef.h" ) ;
227200 module . CodeFiles . Add ( Path . Combine ( dir , "QObject.cs" ) ) ;
228201 module . CodeFiles . Add ( Path . Combine ( dir , "QChar.cs" ) ) ;
229202 module . CodeFiles . Add ( Path . Combine ( dir , "QEvent.cs" ) ) ;
@@ -243,9 +216,6 @@ public void Setup(Driver driver)
243216 driver . ParserOptions . AddIncludeDirs ( qtInfo . Headers ) ;
244217
245218 driver . ParserOptions . AddLibraryDirs ( Platform . IsWindows ? qtInfo . Bins : qtInfo . Libs ) ;
246-
247- // Qt defines its own GUID with the same header guard as the system GUID, so ensure the system GUID is read first
248- driver . Project . AddFile ( "guiddef.h" ) ;
249219 }
250220
251221 public static string GetModuleNameFromLibFile ( string libFile )
@@ -322,21 +292,7 @@ private void CompileMakefile(GenerateSymbolsPass.SymbolsCodeEventArgs e)
322292 proBuilder . Append ( "LIBS += -loleaut32 -lole32" ) ;
323293 }
324294 File . WriteAllText ( path , proBuilder . ToString ( ) ) ;
325- // HACK: work around https://bugreports.qt.io/browse/QTBUG-55952
326- if ( e . Module . LibraryName == "Qt3DRender.Sharp" )
327- {
328- var cpp = Path . ChangeExtension ( pro , "cpp" ) ;
329- var unlinkable = new [ ]
330- {
331- "&Qt3DRender::QSortCriterion::tr;" ,
332- "&Qt3DRender::QSortCriterion::trUtf8;" ,
333- "&Qt3DRender::qt_getEnumMetaObject;"
334- } ;
335- var linkable = ( from line in File . ReadLines ( cpp )
336- where unlinkable . All ( ul => ! line . EndsWith ( ul , StringComparison . Ordinal ) )
337- select line ) . ToList ( ) ;
338- File . WriteAllLines ( cpp , linkable ) ;
339- }
295+
340296 int error ;
341297 string errorMessage ;
342298 ProcessHelper . Run ( this . qtInfo . QMake , $ "\" { path } \" ", out error , out errorMessage ) ;
0 commit comments