logic: Fixes and improvements for C/C++ compiler header path handling

* Always add compiler header path when prefilling on first start, regardless of successful detection
* Show compiler header path in path list box on top and readonly
* Prepend compiler header path on Windows in system header path compiler flags, append otherwise
* Show warning when saving ApplicationSettings if compiler header path is not in global include paths
* Show warning when saving ApplicationSettings if there is another path containing compiler headers
This commit is contained in:
Eberhard Graether
2019-01-21 15:18:31 +01:00
parent 3eb9211520
commit 7d30709306
13 changed files with 153 additions and 35 deletions
+3 -3
View File
@@ -13,7 +13,7 @@
#include "UserPaths.h"
#include "Version.h"
const size_t ApplicationSettings::VERSION = 5;
const size_t ApplicationSettings::VERSION = 6;
std::shared_ptr<ApplicationSettings> ApplicationSettings::s_instance;
@@ -78,11 +78,11 @@ bool ApplicationSettings::load(const FilePath& filePath, bool readOnly)
}
}
));
migrator.addMigration(5, std::make_shared<SettingsMigrationLambda>(
migrator.addMigration(6, std::make_shared<SettingsMigrationLambda>(
[](const SettingsMigration* migration, Settings* settings)
{
std::vector<FilePath> cxxHeaderSearchPaths = migration->getValuesFromSettings(
settings, "indexing/cxx/header_search_paths/header_search_path", std::vector<FilePath>());
settings, "indexing/cxx/header_search_paths/header_search_path", std::vector<FilePath>());
cxxHeaderSearchPaths = utility::replaceOrAddCxxCompilerHeaderPath(cxxHeaderSearchPaths);