Please name it like a function, instead of like a boolean property.
I would suggest:
onAuthenticationSucceeded() and onAuthenticationFailed() (or replace the "on" prefix with "nofify", as it's the pattern you seem to be using already) as dropping the boolean parameter makes Greeter.qml code more readable. After all you're not saving any work with this boolean parameter as the implementation does "if(booleanParam){doSuccessfulPath}else{doFailurePath}" anyway.
eg:
"""
function authenticated(success) {
if (success) { lockscreen.hide();
} else { lockscreen.clear(true);
}
}
"""
Would be:
"""
function onAuthenticationSucceeded() { lockscreen.hide(); }
function onAuthenticationFailed() { lockscreen.clear(true); }
"""
In Greeter.qml:
""" item.authentica ted(false) ;
loader.
"""
Please name it like a function, instead of like a boolean property.
I would suggest: nSucceeded( ) and onAuthenticatio nFailed( ) (or replace the "on" prefix with "nofify", as it's the pattern you seem to be using already) as dropping the boolean parameter makes Greeter.qml code more readable. After all you're not saving any work with this boolean parameter as the implementation does "if(booleanPara m){doSuccessful Path}else{ doFailurePath} " anyway.
onAuthenticatio
eg:
""" success) {
lockscreen .hide() ;
lockscreen .clear( true);
function authenticated(
if (success) {
} else {
}
}
"""
Would be:
""" nSucceeded( ) { lockscreen.hide(); } nFailed( ) { lockscreen. clear(true) ; }
function onAuthenticatio
function onAuthenticatio
"""