mirror of
https://github.com/qmlnet/qmlnet.git
synced 2026-05-16 14:15:57 -06:00
[PR #227] [MERGED] AutoGenerated signals don't conflict with MVVM behavior #249
Labels
No labels
bug
enhancement
help wanted
help wanted
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/qmlnet#249
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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:
develop← Head:bug/auto_generated_signals_mvvm📝 Commits (2)
6f20a9bReproduces the problem54418c7Changes 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.