diff options
author | Arno <arno@disconnect.de> | 2018-02-03 15:05:41 +0100 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2018-02-03 15:05:41 +0100 |
commit | f7307771fd8b1cf45bbbda76ad650e3b0f93dba5 (patch) | |
tree | 9f9ba1baca2635c76d08b71ba3a118a5e23e462a /filewidget.cpp | |
parent | b4d24fbe6d4b65b4da551e380cc1fb89458b75b6 (diff) | |
download | ShemovCleaner-f7307771fd8b1cf45bbbda76ad650e3b0f93dba5.tar.gz ShemovCleaner-f7307771fd8b1cf45bbbda76ad650e3b0f93dba5.tar.bz2 ShemovCleaner-f7307771fd8b1cf45bbbda76ad650e3b0f93dba5.zip |
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 :(
Diffstat (limited to 'filewidget.cpp')
-rw-r--r-- | filewidget.cpp | 11 |
1 files 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); + } } } } |