Seitseman 2275fe4f1f fix(Stored): Make stores typed
Adding types instead of var for stores used in qml components

Closes: #14801
2024-08-27 10:52:18 +02:00

29 lines
1.0 KiB
QML

import QtQuick 2.15
QtObject {
property QtObject privacyModule: QtObject {
signal passwordChanged(success: bool, errorMsg: string)
signal storeToKeychainError(errorDescription: string)
signal storeToKeychainSuccess()
}
function tryStoreToKeyChain(errorDescription) {
if (generateMacKeyChainStoreError.checked) {
privacyModule.storeToKeychainError(errorDescription)
} else {
passwordView.localAccountSettings.storeToKeychainValue = Constants.keychain.storedValue.store
privacyModule.storeToKeychainSuccess()
privacyModule.passwordChanged(true, "")
}
}
function tryRemoveFromKeyChain() {
if (generateMacKeyChainStoreError.checked) {
privacyModule.storeToKeychainError("Error removing from keychain")
} else {
passwordView.localAccountSettings.storeToKeychainValue = Constants.keychain.storedValue.notNow
privacyModule.storeToKeychainSuccess()
}
}
}