logic: Ask user before reparsing the project
While the message box with the question is visible the ui is blocked. A message appears when: * when project was edited * when preferences were edited * when project file has more recent changes than db * when db has a different version than Coati
This commit is contained in:
+15
-3
@@ -13,15 +13,25 @@ class StorageAccessProxy;
|
||||
class Project
|
||||
{
|
||||
public:
|
||||
enum ProjectState
|
||||
{
|
||||
PROJECT_NONE,
|
||||
PROJECT_EMPTY,
|
||||
PROJECT_LOADED,
|
||||
PROJECT_OUTDATED,
|
||||
PROJECT_OUTVERSIONED
|
||||
};
|
||||
|
||||
static std::shared_ptr<Project> create(StorageAccessProxy* storageAccessProxy);
|
||||
|
||||
~Project();
|
||||
|
||||
const FilePath& getProjectSettingsFilePath() const;
|
||||
|
||||
bool load(const FilePath& projectSettingsFile);
|
||||
ProjectState load(const FilePath& projectSettingsFile);
|
||||
ProjectState reload();
|
||||
|
||||
bool save(const FilePath& projectSettingsFile);
|
||||
void reload();
|
||||
|
||||
void clearStorage();
|
||||
|
||||
@@ -35,17 +45,19 @@ private:
|
||||
void parseCode();
|
||||
|
||||
void setProjectSettingsFilePath(const FilePath& path);
|
||||
void loadStorage(const FilePath& path);
|
||||
void updateFileManager();
|
||||
|
||||
Parser::Arguments getParserArguments() const;
|
||||
|
||||
StorageAccessProxy* const m_storageAccessProxy;
|
||||
|
||||
ProjectState m_state;
|
||||
|
||||
FilePath m_projectSettingsFilepath;
|
||||
FileManager m_fileManager;
|
||||
|
||||
std::shared_ptr<Storage> m_storage;
|
||||
bool m_storageWasLoaded;
|
||||
};
|
||||
|
||||
#endif // PROJECT_H
|
||||
|
||||
Reference in New Issue
Block a user