From 981c4030f9cd63ae35ca8f77384a412e9199a8e5 Mon Sep 17 00:00:00 2001 From: bhklein Date: Wed, 16 Mar 2022 21:37:47 +0000 Subject: [PATCH] just close the file --- openbr/plugins/gallery/csv.cpp | 21 --------------------- 1 file changed, 0 insertions(+), 21 deletions(-) diff --git a/openbr/plugins/gallery/csv.cpp b/openbr/plugins/gallery/csv.cpp index ef873d8..8645470 100644 --- a/openbr/plugins/gallery/csv.cpp +++ b/openbr/plugins/gallery/csv.cpp @@ -127,32 +127,11 @@ class csvGallery : public FileGallery Q_PROPERTY(bool combineFiles READ get_combineFiles WRITE set_combineFiles RESET reset_combineFiles STORED false) BR_PROPERTY(bool, combineFiles, false) - FileList files; CSVHeaderList headers; ~csvGallery() { f.close(); - if (files.isEmpty()) return; - - QSet samples; - foreach (const File &file, files) - foreach (const QString &key, file.localKeys()) - samples.insert(key); - - QStringList lines; - lines.reserve(files.size()+1); - - // Make header - headers = CSVHeaderList(samples.values()); - headers.sort(); - lines.append(QStringList(QStringList("File") + headers.keys()).join(",")); - - // Make table - foreach (const File &file, files) - lines.append(lineFromFile(file)); - - QtUtils::writeFile(file, lines); } void setValuesFromHeaders(File &f, const CSVHeaderList &headers, const QVariantList &values) -- libgit2 0.21.4