Commit c5e029675d3074ced51ae50ed8d1544dd3adcd9e
1 parent
571e977f
Use QString::simplified to avoid extraneous newlines
QTextStream is apparently somewhat better behaved about these things than QFile.
Showing
1 changed file
with
2 additions
and
2 deletions
openbr/plugins/gallery.cpp
| ... | ... | @@ -591,7 +591,7 @@ class txtGallery : public Gallery |
| 591 | 591 | for (qint64 i = 0; i < readBlockSize; i++) |
| 592 | 592 | { |
| 593 | 593 | QByteArray lineBytes = f.readLine(); |
| 594 | - QString line(lineBytes); | |
| 594 | + QString line = QString::fromLocal8Bit(lineBytes).simplified(); | |
| 595 | 595 | |
| 596 | 596 | if (!line.isEmpty()){ |
| 597 | 597 | int splitIndex = line.lastIndexOf(' '); |
| ... | ... | @@ -655,7 +655,7 @@ class flatGallery : public Gallery |
| 655 | 655 | QByteArray line = f.readLine(); |
| 656 | 656 | |
| 657 | 657 | if (!line.isEmpty()) |
| 658 | - templates.append(File(QString(line))); | |
| 658 | + templates.append(File(QString::fromLocal8Bit(line).simplified())); | |
| 659 | 659 | |
| 660 | 660 | if (f.atEnd()) { |
| 661 | 661 | *done=true; | ... | ... |