logic: paths in ProjectSettings relative to file not working directory

This change checks all paths in the ProjectSettings file for relativity and makes them relative to the location of the
ProjectSettings file if necessary. The paths are also correctly saved relative to the file.
This commit is contained in:
Eberhard Graether
2015-07-29 22:20:26 +02:00
parent 336df76912
commit 5f25311389
31 changed files with 407 additions and 148 deletions
+3 -3
View File
@@ -63,7 +63,7 @@ void Project::clearProjectSettings()
bool Project::setSourceDirectoryPath(const std::string& sourceDirectoryPath)
{
m_projectSettingsFilepath = sourceDirectoryPath + "/ProjectSettings.xml";
bool success = ProjectSettings::getInstance()->setSourcePaths(std::vector<std::string>(1, sourceDirectoryPath));
bool success = ProjectSettings::getInstance()->setSourcePaths(std::vector<FilePath>(1, sourceDirectoryPath));
if (success)
{
@@ -131,8 +131,8 @@ void Project::createFileManager()
{
std::shared_ptr<ProjectSettings> projSettings = ProjectSettings::getInstance();
std::vector<std::string> sourcePaths(projSettings->getSourcePaths());
std::vector<std::string> includePaths(sourcePaths);
std::vector<FilePath> sourcePaths(projSettings->getSourcePaths());
std::vector<FilePath> includePaths(sourcePaths);
std::vector<std::string> sourceExtensions = projSettings->getSourceExtensions();
std::vector<std::string> includeExtensions = projSettings->getHeaderExtensions();