logic: Added migration for C/C++ standard to ProjectSettings

* extended SettingsMigrator to support lambdas
* added PROJECT_STATE_NEEDS_MIGRATION and dialog for loading old project files
This commit is contained in:
Eberhard Graether
2016-09-15 12:23:18 +02:00
parent 73ef7c1bcb
commit 5680bf7b25
12 changed files with 261 additions and 82 deletions
+7
View File
@@ -13,6 +13,8 @@ class ProjectSettings
public:
static LanguageType getLanguageOfProject(FilePath projectFilePath);
static const size_t VERSION;
ProjectSettings();
ProjectSettings(const FilePath& projectFilePath);
ProjectSettings(std::string projectName, const FilePath& projectFileLocation);
@@ -22,6 +24,9 @@ public:
virtual std::vector<std::string> getLanguageStandards() const;
bool needMigration() const;
void migrate();
bool reload();
std::string getProjectName() const;
@@ -55,6 +60,8 @@ protected:
private:
virtual std::vector<std::string> getDefaultSourceExtensions() const;
virtual std::string getDefaultStandard() const;
SettingsMigrator getMigrations() const;
};
#endif // PROJECT_SETTINGS_H