Skip to content

Commit b72f170

Browse files
committed
Fix rawFile regression
1 parent 141d873 commit b72f170

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

analysis/analysisrunner.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ void AnalysisRunner::run()
9393
}
9494
else if (is_fastq(&rawFile))
9595
{
96-
file = &rawFile;
96+
rawFile.close();
97+
file = new QFile(mFilename);
9798
}
9899

99100
if (file == nullptr)
@@ -144,7 +145,7 @@ void AnalysisRunner::run()
144145
// this is critcal and can decrease the speed. Send message only 1 sequence / 1000
145146
if (mSequenceCount % 1000 == 0)
146147
{
147-
int percentNow = (float)(rawFile.pos()) / fileInfo.size() * 100;
148+
int percentNow = qRound(static_cast<qreal>(file->pos()) / fileInfo.size() * 100);
148149
// if percentNow is still null, return empty percent ...
149150
if ( (percentNow >= mProgression + 5) || (percentNow == 0))
150151
{

0 commit comments

Comments
 (0)