Skip to content

Conversation

@Saif-k93
Copy link

@Saif-k93 Saif-k93 commented Dec 27, 2025

This pull request addresses the restore failure after deletion reported in
#288.

Changes:

  1. Keychain jobs (readCredentialJob, writeCredentialJob, deleteCredentialJob) are now
    created dynamically at runtime instead of being persistent member variables.
    This ensures that restore operations succeed even after a previous deletion failure.

  2. Existing member jobs are retained but commented out, with explanations referencing
    the GitHub issue for context.

  3. Added autoDelete = true for runtime-created jobs to ensure proper cleanup without
    manual deletion.

  4. Updated readKey, writeKey, and deleteKey methods to use both persistent and
    dynamic job objects to handle legacy cases and dynamic use-cases safely.

Motivation:

Persistent job objects were causing failures in restore operations after deletion because
the internal state of the QKeychain jobs persisted across operations. Creating jobs
dynamically ensures each operation works with a fresh object.

Related Issue:

#288

Commented out persistent member variables for credential jobs.
Refactor KeyChainClass to use local job instances for reading, writing, and deleting keys. Removed unused member jobs and added auto-delete functionality.
Removed commented-out member variables related to QKeychain jobs.
Removed commented-out code and debugging statements related to credential jobs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants