logic: fixed initialization of header search paths on first start

* updated version of fallback ApplicationSettings.xml to current settings version
* removed is-empty-check when pre-filling settings at the first start of Sourcetrail
This commit is contained in:
mlangkabel
2019-01-14 17:22:22 +01:00
parent fc64f1a958
commit e3c9f12012
3 changed files with 7 additions and 7 deletions
@@ -14,5 +14,5 @@
<recent_project>./projects/javaparser/javaparser.srctrlprj</recent_project>
</recent_projects>
</user>
<version>1</version>
<version>5</version>
</config>
+5 -5
View File
@@ -62,7 +62,7 @@ void setupLogging()
void prefillJavaRuntimePath()
{
std::shared_ptr<ApplicationSettings> settings = ApplicationSettings::getInstance();
if (!settings->getHasPrefilledJavaPath() && settings->getJavaPath().empty())
if (!settings->getHasPrefilledJavaPath())
{
LOG_INFO("Prefilling Java path");
std::shared_ptr<CombinedPathDetector> javaPathDetector = utility::getJavaRuntimePathDetector();
@@ -85,7 +85,7 @@ void prefillJavaRuntimePath()
void prefillJreSystemLibraryPaths()
{
std::shared_ptr<ApplicationSettings> settings = ApplicationSettings::getInstance();
if (!settings->getHasPrefilledJreSystemLibraryPaths() && settings->getJreSystemLibraryPaths().empty())
if (!settings->getHasPrefilledJreSystemLibraryPaths())
{
LOG_INFO("Prefilling JRE system library path");
std::shared_ptr<CombinedPathDetector> jreSystemLibraryPathsDetector = utility::getJreSystemLibraryPathsDetector();
@@ -108,7 +108,7 @@ void prefillJreSystemLibraryPaths()
void prefillMavenExecutablePath()
{
std::shared_ptr<ApplicationSettings> settings = ApplicationSettings::getInstance();
if (!settings->getHasPrefilledMavenPath() && settings->getMavenPath().empty())
if (!settings->getHasPrefilledMavenPath())
{
LOG_INFO("Prefilling Maven path");
std::shared_ptr<CombinedPathDetector> mavenPathDetector = utility::getMavenExecutablePathDetector();
@@ -131,7 +131,7 @@ void prefillMavenExecutablePath()
void prefillCxxHeaderPaths()
{
std::shared_ptr<ApplicationSettings> settings = ApplicationSettings::getInstance();
if (!settings->getHasPrefilledHeaderSearchPaths() && settings->getHeaderSearchPaths().empty())
if (!settings->getHasPrefilledHeaderSearchPaths())
{
LOG_INFO("Prefilling header search paths");
std::shared_ptr<CombinedPathDetector> cxxHeaderDetector = utility::getCxxHeaderPathDetector();
@@ -152,7 +152,7 @@ void prefillCxxHeaderPaths()
void prefillCxxFrameworkPaths()
{
std::shared_ptr<ApplicationSettings> settings = ApplicationSettings::getInstance();
if (!settings->getHasPrefilledFrameworkSearchPaths() && settings->getFrameworkSearchPaths().empty())
if (!settings->getHasPrefilledFrameworkSearchPaths())
{
LOG_INFO("Prefilling framework search paths");
std::shared_ptr<CombinedPathDetector> cxxFrameworkDetector = utility::getCxxFrameworkPathDetector();
+1 -1
View File
@@ -82,7 +82,7 @@ bool ApplicationSettings::load(const FilePath& filePath, bool readOnly)
[](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);