Skip to content

Commit

Permalink
fix: crashed after invoking qml signal in Qt 6.6.0
Browse files Browse the repository at this point in the history
Signed-off-by: ComixHe <[email protected]>
  • Loading branch information
ComixHe committed Dec 14, 2023
1 parent b24d02d commit dfa9b3b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/greeter/Center.qml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Item {

LoginAnimation {
onStopped: {
GreeterModel.animationPlayFinished()
GreeterModel.emitAnimationPlayFinished()
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/greeter/Greeter.qml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ Item {

Connections {
target: GreeterModel.proxy
function onLoginSucceeded() {
GreeterModel.animationPlayed()
function onLoginSucceeded(user) {
GreeterModel.emitAnimationPlayed()
}
}

Expand Down
8 changes: 8 additions & 0 deletions src/greeter/GreeterModel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ Item {
signal animationPlayed
signal animationPlayFinished

function emitAnimationPlayed() {
animationPlayed();
}

function emitAnimationPlayFinished() {
animationPlayFinished();
}

UserModel {
id: userModel
}
Expand Down

0 comments on commit dfa9b3b

Please sign in to comment.