GUI: Don't write empty elements to project file.
This commit is contained in:
parent
941c1a8eb8
commit
d2e6e3b49b
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue