From f7307771fd8b1cf45bbbda76ad650e3b0f93dba5 Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 3 Feb 2018 15:05:41 +0100 Subject: Fix subject guessing Well, as it says, this is pretty much guesswork. I didn't think that the subject itself could contain a ',', but reality proved me wrong. A common denominator seems to be 'yEnc,' at the end of the subject, so first check for that and split there before going for the default. Most likely it's not the last change to this function :( --- filewidget.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/filewidget.cpp b/filewidget.cpp index 96e8c19..8d04034 100644 --- a/filewidget.cpp +++ b/filewidget.cpp @@ -379,9 +379,14 @@ void FileWidget::readDescriptION(){ QTextStream in(&descFile); QString line; while(in.readLineInto(&line)){ - QStringList parts = line.split(','); - if(!parts.isEmpty()){ - mDescript << parts.at(0); + if(line.contains("yEnc,")){ + QString part = line.left(line.indexOf("yEnc,") + 4); + mDescript << part; + }else{ + QStringList parts = line.split(','); + if(!parts.isEmpty()){ + mDescript << parts.at(0); + } } } } -- cgit v1.2.3-70-g09d2