Cpp changes, minor refactor plus separate signal logic, typo.
- typo in searchindex - Cpp plugin changed to use enum lidstate - minor refactor - Using signals instead of direct property access. - Using states instead - checking lidclosed instead of preparetosleep
This commit is contained in:
@@ -5,11 +5,12 @@ import QtQuick
|
||||
Scope {
|
||||
id: root
|
||||
|
||||
required property var lock
|
||||
signal requestLock
|
||||
|
||||
Connections {
|
||||
function onLidClosing(): void {
|
||||
root.lock.lock.locked = true;
|
||||
function onStateChanged(): void {
|
||||
if (LidWatcher.state === LidWatcher.Closed)
|
||||
root.requestLock();
|
||||
}
|
||||
|
||||
target: LidWatcher
|
||||
|
||||
Reference in New Issue
Block a user