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:
Eberhard Graether
2016-04-24 22:47:39 +02:00
parent a6e57a6564
commit 6be207a68a
16 changed files with 342 additions and 70 deletions
+15 -3
View File
@@ -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