Open
Description
Description
Currently, if a user is opening a new file but did not save the current file they are editing, the changes from the current open file will be lost. We need to create a function that will check if the current file has been updated when opening a new one. Maybe extract from the newFile()
function the part that checks if changes have been detected when creating a new file:
Line 63 in 73287c1
Motivation
This will prevent users from losing edited content when opening a new file.
Tasks
- Refactor
void FileManager::newFile()
to extract file change detection - Add the extracted file change detection maybe to
void FileManager::loadFileInEditor(const QString &filePath)
or anywhere that it should be. - Ensure it works by testing, and possibly creating Unit Tests.
Metadata
Metadata
Assignees
Type
Projects
Status
Todo