From c5e029675d3074ced51ae50ed8d1544dd3adcd9e Mon Sep 17 00:00:00 2001 From: Charles Otto Date: Thu, 29 May 2014 17:12:47 -0400 Subject: [PATCH] Use QString::simplified to avoid extraneous newlines --- openbr/plugins/gallery.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openbr/plugins/gallery.cpp b/openbr/plugins/gallery.cpp index bf1174c..5ef58c1 100644 --- a/openbr/plugins/gallery.cpp +++ b/openbr/plugins/gallery.cpp @@ -591,7 +591,7 @@ class txtGallery : public Gallery for (qint64 i = 0; i < readBlockSize; i++) { QByteArray lineBytes = f.readLine(); - QString line(lineBytes); + QString line = QString::fromLocal8Bit(lineBytes).simplified(); if (!line.isEmpty()){ int splitIndex = line.lastIndexOf(' '); @@ -655,7 +655,7 @@ class flatGallery : public Gallery QByteArray line = f.readLine(); if (!line.isEmpty()) - templates.append(File(QString(line))); + templates.append(File(QString::fromLocal8Bit(line).simplified())); if (f.atEnd()) { *done=true; -- libgit2 0.21.4