From e90c1a7110083223a7d2960b22717457995f0f86 Mon Sep 17 00:00:00 2001 From: dridk Date: Fri, 7 Apr 2017 01:55:39 +0200 Subject: [PATCH] fix @bokic regression. Percent should be computed from rawFile (compressed) not by file(uncompress) --- analysis/analysisrunner.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/analysis/analysisrunner.cpp b/analysis/analysisrunner.cpp index 9269a2a..444fe3e 100644 --- a/analysis/analysisrunner.cpp +++ b/analysis/analysisrunner.cpp @@ -93,8 +93,7 @@ void AnalysisRunner::run() } else if (is_fastq(&rawFile)) { - rawFile.close(); - file = new QFile(mFilename); + file = &rawFile; } if (file == nullptr) @@ -145,7 +144,7 @@ void AnalysisRunner::run() // this is critcal and can decrease the speed. Send message only 1 sequence / 1000 if (mSequenceCount % 1000 == 0) { - int percentNow = qRound(static_cast(file->pos()) / fileInfo.size() * 100); + int percentNow = qRound(static_cast(rawFile.pos()) / fileInfo.size() * 100); // if percentNow is still null, return empty percent ... if ( (percentNow >= mProgression + 5) || (percentNow == 0)) { @@ -179,7 +178,7 @@ void AnalysisRunner::run() } file->close(); - delete file; + file->deleteLater(); }