Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WIP #182
Hi Mentors Vinayakjeet this side
Title: Implement Auto-save Feature for Avogadro
Description:
This pull request introduces an auto-save feature to Avogadro, automatically saving the current molecule to a temporary file at a predefined interval (every 5 minutes). This feature is designed to enhance data integrity by reducing the risk of data loss during unexpected application closures. The auto-save mechanism checks if there's a loaded and modified molecule before performing the save operation, using the CJSON format for the saved files.
Changes include:
Initialization of an auto-save timer in MainWindow.
Implementation of autosaveDocument method to handle the auto-saving logic.
Modification of MainWindow to support auto-save functionality, including managing the auto-save interval and temporary file creation.
I'd appreciate feedback on the implemented logic and any suggestions for improvement. Also, should UI CHANGES be implemented to inform the user when an auto-save has occurred ? Additionally, is there a need to create a DESTRUCTOR or cleanup mechanism for managing extra autosaved files, ensuring that only a certain number of autosave files are kept at any time?
Your guidance and suggestions would be highly appreciated to refine this feature further.