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
@@ -57,6 +57,7 @@ void QtProjectWizzardContentBuildFile::populate(QGridLayout* layout, int& row)
m_picker = new QtLocationPicker(this);
m_picker->setFileFilter(filter);
m_picker->setRelativeRootDirectory(m_settings->getProjectFileLocation());
QPushButton* button = new QPushButton("", this);
button->setObjectName("refreshButton");
@@ -108,11 +109,12 @@ void QtProjectWizzardContentBuildFile::save()
case QtProjectWizzardContentSelect::PROJECT_CDB:
{
FilePath path = m_picker->getText().toStdString();
if (!path.exists() || path.extension() != ".json")
FilePath absPath = m_settings->makePathAbsolute(m_settings->expandPath(path));
if (!absPath.exists() || absPath.extension() != ".json")
{
return;
}
cxxSettings->setCompilationDatabasePath(m_picker->getText().toStdString());
cxxSettings->setCompilationDatabasePath(path);
break;
}
}
@@ -129,7 +131,8 @@ bool QtProjectWizzardContentBuildFile::check()
case QtProjectWizzardContentSelect::PROJECT_CDB:
{
FilePath path = m_picker->getText().toStdString();
if (!path.exists() || path.extension() != ".json")
FilePath absPath = m_settings->makePathAbsolute(m_settings->expandPath(path));
if (!absPath.exists() || absPath.extension() != ".json")
{
QMessageBox msgBox;
msgBox.setText("Please enter a valid compilation database file (*.json).");
@@ -144,8 +147,9 @@ bool QtProjectWizzardContentBuildFile::check()
void QtProjectWizzardContentBuildFile::refreshClicked()
{
FilePath path = FilePath(m_picker->getText().toStdString());
if (!path.exists())
FilePath path = m_picker->getText().toStdString();
FilePath absPath = m_settings->makePathAbsolute(m_settings->expandPath(path));
if (!absPath.exists())
{
QMessageBox msgBox;
msgBox.setText("Please enter a valid file path.");