Commit dc4eaa32739324f883cc8fcfc4cf0b896f2ccb04
1 parent
fa185e82
Fixed newLine regular expression
Showing
2 changed files
with
2 additions
and
2 deletions
openbr/core/qtutils.cpp
| ... | ... | @@ -80,7 +80,7 @@ void readFile(const QString &file, QStringList &lines) |
| 80 | 80 | { |
| 81 | 81 | QByteArray data; |
| 82 | 82 | readFile(file, data); |
| 83 | - lines = QString(data).split(QRegularExpression("[\n|\r\n|\r]"), QString::SkipEmptyParts); | |
| 83 | + lines = QString(data).split(QRegularExpression("(\n|\r\n|\r)"), QString::SkipEmptyParts); | |
| 84 | 84 | for (int i=0; i<lines.size(); i++) |
| 85 | 85 | lines[i] = lines[i].simplified(); |
| 86 | 86 | } | ... | ... |
openbr/plugins/format.cpp
| ... | ... | @@ -162,7 +162,7 @@ class csvFormat : public Format |
| 162 | 162 | { |
| 163 | 163 | QFile f(file.name); |
| 164 | 164 | f.open(QFile::ReadOnly); |
| 165 | - QStringList lines(QString(f.readAll()).split(QRegularExpression("[\n|\r\n|\r]"), QString::SkipEmptyParts)); | |
| 165 | + QStringList lines(QString(f.readAll()).split(QRegularExpression("(\n|\r\n|\r)"), QString::SkipEmptyParts)); | |
| 166 | 166 | f.close(); |
| 167 | 167 | |
| 168 | 168 | bool isUChar = true; | ... | ... |