[PR #227] [MERGED] AutoGenerated signals don't conflict with MVVM behavior #249

Closed
opened 2026-05-05 11:21:38 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/qmlnet/qmlnet/pull/227
Author: @devmil
Created: 10/21/2020
Status: Merged
Merged: 10/21/2020
Merged by: @pauldotknopf

Base: developHead: bug/auto_generated_signals_mvvm


📝 Commits (2)

  • 6f20a9b Reproduces the problem
  • 54418c7 Changes auto-generation to be a behavior

📊 Changes

9 files changed (+209 additions, -23 deletions)

View changed files

src/net/Qml.Net.Tests/Qml/AutoSignalTests.cs (+68 -0)
📝 src/net/Qml.Net.Tests/Qml/BaseQmlTests.cs (+6 -3)
📝 src/net/Qml.Net.Tests/Qml/MvvmInteropBehaviorTests.cs (+24 -0)
src/net/Qml.Net/Internal/Behaviors/AutoGenerateNotifySignalsBehavior.cs (+71 -0)
📝 src/net/Qml.Net/Internal/Behaviors/MvvmQmlInteropBehavior.cs (+6 -4)
📝 src/net/Qml.Net/Internal/DefaultCallbacks.cs (+0 -12)
📝 src/net/Qml.Net/Internal/IQmlInteropBehavior.cs (+5 -0)
📝 src/net/Qml.Net/Internal/InteropBehaviors.cs (+8 -2)
📝 src/net/Qml.Net/QmlNetConfig.cs (+21 -2)

📄 Description

This PR fixes the auto generation of signals interference with the MVVM behavior.

I changed that functionality to be a Behavior so that the order can be controlled.
This enables us to use the AutoGenerateNotifySignalsBehavior to act as a filler for properties that don't get signals at all.
By using this approach the MVVM relevant properties already have signals and don't get an autogenerated one.

This PR includes a unit test to reproduce the problem and a unit test for the feature itself.

I kept the config property though. Maybe we should switch to an Activate API like for the MVVM behavior?


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/qmlnet/qmlnet/pull/227 **Author:** [@devmil](https://github.com/devmil) **Created:** 10/21/2020 **Status:** ✅ Merged **Merged:** 10/21/2020 **Merged by:** [@pauldotknopf](https://github.com/pauldotknopf) **Base:** `develop` ← **Head:** `bug/auto_generated_signals_mvvm` --- ### 📝 Commits (2) - [`6f20a9b`](https://github.com/qmlnet/qmlnet/commit/6f20a9be0439749d46224023858c09a8985271f6) Reproduces the problem - [`54418c7`](https://github.com/qmlnet/qmlnet/commit/54418c79efabe9802ec780cb8058d93f5bedd067) Changes auto-generation to be a behavior ### 📊 Changes **9 files changed** (+209 additions, -23 deletions) <details> <summary>View changed files</summary> ➕ `src/net/Qml.Net.Tests/Qml/AutoSignalTests.cs` (+68 -0) 📝 `src/net/Qml.Net.Tests/Qml/BaseQmlTests.cs` (+6 -3) 📝 `src/net/Qml.Net.Tests/Qml/MvvmInteropBehaviorTests.cs` (+24 -0) ➕ `src/net/Qml.Net/Internal/Behaviors/AutoGenerateNotifySignalsBehavior.cs` (+71 -0) 📝 `src/net/Qml.Net/Internal/Behaviors/MvvmQmlInteropBehavior.cs` (+6 -4) 📝 `src/net/Qml.Net/Internal/DefaultCallbacks.cs` (+0 -12) 📝 `src/net/Qml.Net/Internal/IQmlInteropBehavior.cs` (+5 -0) 📝 `src/net/Qml.Net/Internal/InteropBehaviors.cs` (+8 -2) 📝 `src/net/Qml.Net/QmlNetConfig.cs` (+21 -2) </details> ### 📄 Description This PR fixes the auto generation of signals interference with the MVVM behavior. I changed that functionality to be a Behavior so that the order can be controlled. This enables us to use the AutoGenerateNotifySignalsBehavior to act as a filler for properties that don't get signals at all. By using this approach the MVVM relevant properties already have signals and don't get an autogenerated one. This PR includes a unit test to reproduce the problem and a unit test for the feature itself. I kept the config property though. Maybe we should switch to an Activate API like for the MVVM behavior? --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 11:21:38 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/qmlnet#249
No description provided.