logic: fixed indexed header paths for compilation database project screw up the processing order of includes (issue #571)

* prevented indexed header paths for CDB to be appended to compile command
* fixed exists check for relative paths in QtSelectPathsDialog
* indexed header paths will automatically be updated when a new compilation database is picked
This commit is contained in:
mlangkabel
2018-04-27 17:51:03 +02:00
parent 872d24bf6a
commit a7ef02459a
12 changed files with 145 additions and 78 deletions
+10 -1
View File
@@ -12,7 +12,7 @@
#include "utility/utilityString.h"
#include "utility/utilityUuid.h"
const size_t ProjectSettings::VERSION = 5;
const size_t ProjectSettings::VERSION = 6;
const wchar_t PROJECT_FILE_EXTENSION[] = L".srctrlprj";
LanguageType ProjectSettings::getLanguageOfProject(const FilePath& filePath)
@@ -320,6 +320,15 @@ SettingsMigrator ProjectSettings::getMigrations() const
migrator.addMigration(5, std::make_shared<SettingsMigrationMoveKey>(key + "/exclude_paths/exclude_path", key + "/exclude_filters/exclude_filter"));
}
for (std::shared_ptr<SourceGroupSettings> sourceGroupSettings : getAllSourceGroupSettings())
{
if (sourceGroupSettings->getType() == SOURCE_GROUP_CXX_CDB)
{
const std::string key = SourceGroupSettings::s_keyPrefix + sourceGroupSettings->getId();
migrator.addMigration(6, std::make_shared<SettingsMigrationMoveKey>(key + "/source_paths/source_path", key + "/indexed_header_paths/indexed_header_path"));
}
}
return migrator;
}