|
|
@ -27,8 +27,9 @@ void CSVModelWriter::addColumn(const QString &title, int column, int role) |
|
|
|
|
|
|
|
|
|
|
|
static void writeValue(QTextStream &f, const QString &value) |
|
|
|
static void writeValue(QTextStream &f, const QString &value) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// TODO: quoting if " or \n in string
|
|
|
|
QString escaped = value; |
|
|
|
f << "\"" << value << "\""; |
|
|
|
escaped.replace('"', "\"\""); |
|
|
|
|
|
|
|
f << "\"" << escaped << "\""; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static void writeSep(QTextStream &f) |
|
|
|
static void writeSep(QTextStream &f) |
|
|
|