Skip to content

File Change Detection #36

Open
Open
@chrisdedman

Description

@chrisdedman

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:

else if (isFileSaved)

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

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or requestgood first issueGood for newcomers

    Type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions