aboutsummaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Use more generic QML engine typeMiguel Costa2025-11-283-22/+22
| | | | | | | | Now using QQmlEngine instead of the derived type QQmlApplicationEngine. No behavior change. This is only relevant when using Qt Quick Test. Change-Id: I93759541b975400de6946c72a150f94cc226ebd8 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Add macro to embed assembly name in native hostMiguel Costa2025-11-281-0/+10
| | | | | Change-Id: I532c6feb15eaba7aa41432dc25a8a625f89f4cc8 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Remove unused codeMiguel Costa2025-10-244-440/+4
| | | | | | | | | | The following types are no longer used: * IQModelIndex * IQVariant * QDotNetAbstractListModel Change-Id: Ibf871362382dab4cc9480701c996bb0445f0c1d1 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Use SpinWait to sync with Adapter initMiguel Costa2025-10-231-2/+0
| | | | | | | | | * Moved sync code to Adapter.Static (was in IQQmlApplicationEngine) * Replaced Thread.Sleep loop with SpinWait * Timeout after 3 secs without sync Change-Id: Id9f59def1251b5d15e8bdef3dd4d1474031a4cd8 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Remove unused DotNetParameter::ModelIndexMiguel Costa2025-10-231-6/+0
| | | | | Change-Id: I27da1d6c22cc293070ee636377f65f85ae177dce Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Implement Uri marshalingMiguel Costa2025-10-231-0/+54
| | | | | Change-Id: I57b52e5cd3261396d6d73fe13a9683d7cede9386 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Fix bugs in generation of field membersMiguel Costa2025-10-151-2/+2
| | | | | Change-Id: Ibfa97d7f3deb887f4bfb0f64e4529f59607944ce Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Add multi-thread support to QAIMMiguel Costa2025-10-131-0/+4
| | | | | | | | | | | Model code between `Begin*` and `End*` calls will now execute in the context of a critical section. Furthermore, the events that will trigger the corresponding calls to the C++ functions `begin*` and `end*` are now synchronized: the thread that sends one of these events will block until it receives confirmation that the corresponding C++ call was made. Change-Id: I83bd9bb975ea53e1549c3fdc2487a714c8a5a0cb Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Implement QDateTime marshalingMiguel Costa2025-10-081-0/+40
| | | | | Change-Id: If2fed86ce16d146b52ed3128abe0429439e0a027 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Fix event handler not releasedMiguel Costa2025-10-082-9/+6
| | | | | Change-Id: I8806e0a1b7548ab5979cfbbd568f3cccf71ead5a Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Fix Adapter init when QmlEngine is nullMiguel Costa2025-10-081-2/+6
| | | | | Change-Id: I8ad8ad8fc86314272eb839fc2591e11f10480767 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Implement QModelIndex marshalingMiguel Costa2025-10-082-0/+63
| | | | | Change-Id: Ib67fb220677b8e098809043f6957ea6e626a0204 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Add basic types to IQVariantMiguel Costa2025-09-292-16/+93
| | | | | Change-Id: I32b02ac2d4aa5aa09d8da740560d83b7b31001e4 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Rework event handlingMiguel Costa2025-09-291-0/+11
| | | | | | | | | | | | | | | | Each event will now be mapped to just one signal with one parameter corresponding to the EventArgs object, with the exception of property change notifications that will also emit property notification signals. This extends the EventArgs contract to QML code and is in keeping with the goal of re-using native concepts as much as possible while avoiding the use of Qt-specific native syntax (e.g. QSignal attribs in events). The possibility to configure a custom conversion to signal parameters is still a valid one, and might be re-introduced later on. Change-Id: Iff91c40e32ff20bb6281f6f7ed709942a553fb06 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Make QML engine accessible in C#Miguel Costa2025-09-243-3/+104
| | | | | | | | This will allow QML files and generated element types to be loaded from C# code, e.g. from the Program.Main() entry-point. Change-Id: Ia7ceecccf5b36ed43dab08b4a66694fbe32b49de Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Fix runtime errors in Release configMiguel Costa2025-08-081-0/+6
| | | | | | | | The Stats() function of the adapter is only available in Debug. The native API must also reflect this. Change-Id: I79a4b34ab49e983562244ffcd7197167fbc8adc3 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Add Q_DOTNET_HANDLER helper macroMiguel Costa2025-08-081-0/+39
| | | | | | | | | | | | | | | | | | | Expands to a declaration of an event handler member variable. Example: struct Foo { Q_DOTNET_EVENT_HANDLER(ValueChanged, Foo) *handler = nullptr; } ... void Foo::ValueChanged::handleEvent(...) { ... } Change-Id: I02cb446cc67e446886f4c54e7e72ccc3f4484f54 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Add default ctor to QDotNetDelegateMiguel Costa2025-08-071-0/+2
| | | | | Change-Id: Iaa8be876b667d8c7f300dca8ee3c2bd24ac349d7 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Pass argv to .NET Main()Miguel Costa2025-08-071-2/+12
| | | | | Change-Id: Ief669bb31ae21a524b6412717e4307a791dc42db Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Update SignalConverterMiguel Costa2025-08-071-0/+16
| | | | | | | * Add accessors for argument types Change-Id: I8995895ec7d6b65d7ca3113fd9df80d3a443ec6e Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Add access to .NET constants and fieldsMiguel Costa2025-07-013-0/+151
| | | | | | Task-number: QTBUG-134961 Change-Id: I447a125faa5e40fea07bd9957a4b80192d582f96 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Add C++ wrapper for Signal class (QDotNetSignal)Miguel Costa2025-07-011-0/+98
| | | | | | Task-number: QTBUG-134963 Change-Id: I45df3b90a7da19811084b9bc725ada67cd8e86c1 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Add C++ wrapper for System.EventArgsMiguel Costa2025-07-011-0/+6
| | | | | Change-Id: Id8638fda02fe3385a3f9ae0d32c1c75f29825556 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* RefactorMiguel Costa2025-06-2515-184/+934
| | | | | | | | | | | | | | | | Includes: * Implement QDotNetNativeInterface: specialization of QDotNetInterface that wraps a pointer to native data. * Implement IQVariant: QDotNetNativeInterface that wraps a QVariant. * Implement IQModelIndex interface: QDotNetNativeInterface that wraps a QModelIndex. * Implement QDotNetAbstractListModel base class: allows extending QAbstractListModel in C#. * Add class QDotNetDelegate * Remove old examples Change-Id: I2eb21df29e1cf9379e14a64d5174eb934b5bf18a Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* QDotNetAdapter: Simplify delegate macroOrgad Shaneh2023-06-131-20/+18
| | | | | Change-Id: I86e3af57f429c72475deacc724878bedcbba04ab Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Add wrapper facilities for .NET typesMiguel Costa2023-06-1210-0/+1296
| | | | | | | | | | | | | | | | Auxiliary types for writing C++ wrapper classes to encapsulate the low-level interoperability with managed types. In particular, the QDotNetObject C++ class can be extended to implement unmanaged proxies for .NET types, allowing native code to seamlessly interact through a C++ interface with managed code. Extending both QDotNetObject and QObject in the same wrapper class is the basis for a close, seamless integration between Qt applications and .NET code. Change-Id: Ib6d9472ff113868551ead1375764db7dd79643ea Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Implement native/managed adapterMiguel Costa2023-06-122-0/+410
| | | | | | | | | | | The adapter module provides low-level interoperability services for native applications to be able to call into managed code. These services include, among other things, obtaining function pointers to call into .NET methods, subscribing to .NET events, and passing native types as implementations of .NET interfaces. Change-Id: Ia7c0173a46ea3035bfe3e252f4006884f39223ad Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Implement .NET native hostMiguel Costa2023-06-125-0/+1063
Implements a native host for the .NET runtime, as documented by: https://learn.microsoft.com/en-us/dotnet/core/tutorials/netcore-hosting The host was implemented in C++ and using Qt. It is intended to provide Qt applications the ability to interoperate with managed code. Change-Id: I28d3f3d2f795806b69f5c019860a88541dce9c5c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>