Fix up regexp detecting trailing Q65 decode quality information

This commit is contained in:
Bill Somerville 2020-12-30 19:40:44 +00:00
parent 197fd6a5ba
commit 74f899677c
No known key found for this signature in database
GPG Key ID: D864B06D1E81618F

View File

@ -437,8 +437,7 @@ void DisplayText::displayDecodedText(DecodedText const& decodedText, QString con
{
extra += QString {"%1"}.arg (fSpread, 5, 'f', fSpread < 0.95 ? 3 : 2) + QChar {' '};
}
auto ap_pos = message.lastIndexOf (QRegularExpression {R"((?:\?\s)?a[0-9]$)"});
if(ap_pos<0) ap_pos = message.lastIndexOf("q"); //Check for "q" decodes (used in Q65 only)
auto ap_pos = message.lastIndexOf (QRegularExpression {R"((?:\?\s)?(?:a[0-9]|q[0-9][0-9*]?)$)"});
if (ap_pos >= 0)
{
extra += message.mid (ap_pos) + QChar {' '};