ddobrev / QtSharp

Mono/.NET bindings for Qt
Other
571 stars 52 forks source link

more reference changes #29

Closed Hecatron closed 8 years ago

Hecatron commented 9 years ago
  1. I've added a reference to CppSharp.Runtime to QtSerialPort lib
  2. I've also marked QtGUI and QtSerialPort as friend assemblies in relation to QtCore This way they can access the stuff marked as internal within QtCore without errors https://msdn.microsoft.com/en-us/library/0tke9fxk.aspx
  3. added a reference to QtCore in Setup

With a couple of minor manual changes it's now possible to get QtSerialPort to build within Visual Studio I haven't yet tried the same trick with QtGui, and there's no telling if it will actually run / do stuff but we seem to be fairly close to be able to build without errors at least which is a good sign

The manual changes include

  1. changing QSerialPort so that it inherits from QIODevice "public unsafe partial class QSerialPort : QIODevice, IDisposable" there seems to be a problem with CppSharp picking up on inheritance
  2. implement 2 missing members ReadData / WriteData
ddobrev commented 9 years ago

Hello @grbd . I am grateful for your work so far but I am afraid I cannot take this pull. You added a dependency from QtSerialPort to QtCore manually, while dependencies can, and should, be added automatically. A fellow named Pyry completed a large part of the work on dependencies but three more pieces are still missing - points 1, 2 and 3 from https://github.com/ddobrev/QtSharp/issues/8#issuecomment-56527581 . The same goes for InternalsVisibleTo which are closely related to the dependencies - the info needed for dependencies can and should be used to generate InternalsVisibleTo attributes automatically. I also think that ReadData / WriteData were ignored because of dependencies. Once the latter is complete, these members will appear on their own. In general, please note that I don't want the project files and code of the wrappers in the repository at all. I merged a pull by Pyry putting them in and I only did that because I was extremely busy then in order to discuss it with him properly while on the other hand I didn't want to stop his work because he had contributed a few important pieces. I am sorry if the presence of these files has lead you in the wrong direction. However, I am willing to leave them in for the time being if you or other contributors find it easier to work this way.

Hecatron commented 9 years ago

no problem I understand what your saying thanks for the info, I'll try and have a look at the stuff by Pyry

Hecatron commented 8 years ago

Closing as out of date