logic: Fixed saving project name to ProjectSettings also sets project location to '/'

This commit is contained in:
Eberhard Graether
2017-06-19 23:38:39 +02:00
parent 05c2878eec
commit 652a55b4fb
5 changed files with 28 additions and 23 deletions
@@ -67,14 +67,9 @@ void QtProjectWizzard::newProjectFromCDB(const FilePath& filePath, const std::ve
m_projectSettings = std::make_shared<ProjectSettings>();
}
if (!m_projectSettings->getProjectName().size())
if (m_projectSettings->getProjectFilePath().empty())
{
m_projectSettings->setProjectName(filePath.withoutExtension().fileName());
}
if (m_projectSettings->getProjectFileLocation().empty())
{
m_projectSettings->setProjectFileLocation(filePath.parentDirectory());
m_projectSettings->setProjectFilePath(filePath.withoutExtension().fileName(), filePath.parentDirectory());
}
if (!m_contentWidget)
@@ -62,8 +62,10 @@ void QtProjectWizzardContentProjectData::load()
void QtProjectWizzardContentProjectData::save()
{
m_projectSettings->setProjectName(m_projectName->text().toStdString());
m_projectSettings->setProjectFileLocation(FilePath(m_projectFileLocation->getText().toStdString()));
m_projectSettings->setProjectFilePath(
m_projectName->text().toStdString(),
FilePath(m_projectFileLocation->getText().toStdString())
);
}
bool QtProjectWizzardContentProjectData::check()