ui: Revised project setup to customer feedback

* Support environment variables in compilation database path
* Moved advanced option (compiler flags & exclude paths) to separate dialog
* Allow environment variables that contain multiple paths
* Renamed 'Project Name' to 'Coati Project Name'
* Renamed 'Project File Location' to 'Coati Project Location'
* Renamed 'Project Paths' to 'Indexed Paths'
* Make all paths chosen by path picker relative to the project location
* Disabled name and location changing in project editing and removed project moving
* Added sub-titles to project setup dialogs
* Warn user when no Indexed Header Paths were set
* Deprecated lazy include search: It's only useable and visible to projects holding the key
* Split default file extensions for C++ and C

bug ids = 234 254 283 293 312 335
This commit is contained in:
Eberhard Graether
2017-02-13 01:02:09 +01:00
parent 17d9c87a5d
commit 0ceff0203c
32 changed files with 568 additions and 366 deletions
+21 -8
View File
@@ -4,6 +4,7 @@
#include "utility/logging/logging.h"
#include "utility/text/TextAccess.h"
#include "utility/utilityString.h"
#include "utility/utility.h"
Settings::Settings(const Settings& other)
: m_config(other.m_config->createCopy())
@@ -83,6 +84,26 @@ void Settings::setVersion(size_t version)
setValue<int>("version", version);
}
FilePath Settings::expandPath(const FilePath& path)
{
std::vector<FilePath> paths = path.expandEnvironmentVariables();
if (paths.size() >= 1)
{
return paths[0];
}
return FilePath();
}
std::vector<FilePath> Settings::expandPaths(const std::vector<FilePath>& paths)
{
std::vector<FilePath> expanedPaths;
for (const FilePath& path : paths)
{
utility::append(expanedPaths, path.expandEnvironmentVariables());
}
return expanedPaths;
}
Settings::Settings()
{
clear();
@@ -106,14 +127,6 @@ std::vector<FilePath> Settings::getPathValues(const std::string& key) const
return paths;
}
void Settings::expandPaths(std::vector<FilePath>& paths) const
{
for (FilePath& path : paths)
{
path = path.expandEnvironmentVariables();
}
}
bool Settings::setPathValues(const std::string& key, const std::vector<FilePath>& paths)
{
std::vector<std::string> values;