GUI: Don't write empty elements to project file.

This commit is contained in:
Kimmo Varis 2010-07-08 20:06:03 +03:00
parent 941c1a8eb8
commit d2e6e3b49b
1 changed files with 20 additions and 2 deletions

View File

@ -114,9 +114,27 @@ void ProjectFileDialog::DialogAccepted()
void ProjectFileDialog::UpdateProjectFileData() void ProjectFileDialog::UpdateProjectFileData()
{ {
QStringList includes = mUI.mEditIncludePaths->text().split(";"); QString include = mUI.mEditIncludePaths->text();
QStringList includes;
if (!include.isEmpty())
{
include = include.trimmed();
if (include.indexOf(';') != -1)
includes = include.split(";");
else
includes.append(include);
}
mPFile->SetIncludes(includes); mPFile->SetIncludes(includes);
QStringList defines = mUI.mEditDefines->text().split(";"); QString define = mUI.mEditDefines->text();
QStringList defines;
if (!define.isEmpty())
{
define = define.trimmed();
if (define.indexOf(';') != -1)
defines = define.split(";");
else
defines.append(define);
}
mPFile->SetDefines(defines); mPFile->SetDefines(defines);
} }