GUI: indentation of cfg files

This commit is contained in:
Daniel Marjamäki 2015-09-06 09:10:45 +02:00
parent 0e5f7fe567
commit ddfc766375
2 changed files with 2 additions and 1 deletions

View File

@ -347,6 +347,7 @@ QString CppcheckLibraryData::toString() const
QString outputString;
QXmlStreamWriter xmlWriter(&outputString);
xmlWriter.setAutoFormatting(true);
xmlWriter.setAutoFormattingIndent(2);
xmlWriter.writeStartDocument("1.0");
xmlWriter.writeStartElement("def");
xmlWriter.writeAttribute("format","2");

View File

@ -80,7 +80,7 @@ void LibraryDialog::saveCfg()
QFile file(mFileName);
if (file.open(QIODevice::WriteOnly | QIODevice::Text)) {
QTextStream ts(&file);
ts << data.toString();
ts << data.toString() << '\n';
ui->buttonSave->setEnabled(false);
}
}