Make Project File use XML file format
Brought to you by:
dvillalobos
Originally created by: david.villalobos.c
Originally owned by: david.villalobos.c
Make Project File user XML file format
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: david.villalobos.c
// QFile files(fileName + ".xml");
// if(files.open(QIODevice::WriteOnly | QIODevice::Text)) {
// QXmlStreamWriter xmlStreamWriter(&files);
// xmlStreamWriter.setAutoFormatting(true);
// xmlStreamWriter.writeStartDocument();
// xmlStreamWriter.writeStartElement("Project");
// xmlStreamWriter.writeStartElement("Information");
// xmlStreamWriter.writeTextElement("Name", name());
// xmlStreamWriter.writeTextElement("Path", getProjectPath());
// xmlStreamWriter.writeEndElement(); // Information
// xmlStreamWriter.writeStartElement("Files");
// foreach (QString fileName, getProjectFileList())
// xmlStreamWriter.writeTextElement("File", fileName);
// xmlStreamWriter.writeEndElement(); // Files
// xmlStreamWriter.writeStartElement("DockMarks");
// foreach (QString projectFile, getProjectFileList()) {
// QString dockMarks(getFileSettings(projectFile)->join(","));
// if (!dockMarks.isEmpty()) {
// xmlStreamWriter.writeStartElement("DockMark");
// xmlStreamWriter.writeAttribute("FileName", projectFile);
// foreach (QString mark, dockMarks.split(","))
// xmlStreamWriter.writeTextElement("Value", mark);
// xmlStreamWriter.writeEndElement(); // Files
// }
// }
// xmlStreamWriter.writeEndElement(); // DockMarks
// xmlStreamWriter.writeEndElement(); // Project
// xmlStreamWriter.writeEndDocument();
// files.close();
// } else {
// emit statusBarMessage(tr("Cannot write file %1:\n%2.").arg(fileName).arg(files.errorString()));
// }
// QFile files(fileName + ".xml");
// if(files.open(QIODevice::ReadOnly | QIODevice::Text)) {
// QXmlStreamReader xmlStreamReader(&files);
// while (!xmlStreamReader.atEnd()) {
// xmlStreamReader.readNext();
// if (xmlStreamReader.error())
// emit statusBarMessage(tr("Cannot read file %1:\n%2.").arg(fileName).arg(xmlStreamReader.errorString()));
// else
// if (!xmlStreamReader.text().toString().trimmed().isEmpty())
// qDebug() << xmlStreamReader.name() << xmlStreamReader.text().toString().trimmed();
// }
// files.close();
// } else {
// emit statusBarMessage(tr("Cannot read file %1:\n%2.").arg(fileName).arg(files.errorString()));
// }
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: david.villalobos.c
Got a problem reading a saved file.
Diff: