GUI: indentation of cfg files
This commit is contained in:
parent
0e5f7fe567
commit
ddfc766375
|
@ -347,6 +347,7 @@ QString CppcheckLibraryData::toString() const
|
||||||
QString outputString;
|
QString outputString;
|
||||||
QXmlStreamWriter xmlWriter(&outputString);
|
QXmlStreamWriter xmlWriter(&outputString);
|
||||||
xmlWriter.setAutoFormatting(true);
|
xmlWriter.setAutoFormatting(true);
|
||||||
|
xmlWriter.setAutoFormattingIndent(2);
|
||||||
xmlWriter.writeStartDocument("1.0");
|
xmlWriter.writeStartDocument("1.0");
|
||||||
xmlWriter.writeStartElement("def");
|
xmlWriter.writeStartElement("def");
|
||||||
xmlWriter.writeAttribute("format","2");
|
xmlWriter.writeAttribute("format","2");
|
||||||
|
|
|
@ -80,7 +80,7 @@ void LibraryDialog::saveCfg()
|
||||||
QFile file(mFileName);
|
QFile file(mFileName);
|
||||||
if (file.open(QIODevice::WriteOnly | QIODevice::Text)) {
|
if (file.open(QIODevice::WriteOnly | QIODevice::Text)) {
|
||||||
QTextStream ts(&file);
|
QTextStream ts(&file);
|
||||||
ts << data.toString();
|
ts << data.toString() << '\n';
|
||||||
ui->buttonSave->setEnabled(false);
|
ui->buttonSave->setEnabled(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue