Correctly extract grid from reply to tailender in MSK144 contest exchange

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7399 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville 2016-12-18 22:20:07 +00:00
parent 2b5dc480f9
commit b6006dacca
1 changed files with 12 additions and 5 deletions

View File

@ -134,11 +134,18 @@ void DecodedText::deCallAndGrid(/*out*/QString& call, QString& grid)
{
auto msg = _string;
msg = msg.replace (QRegularExpression {" CQ ([A-Z]{2,2}|[0-9]{3,3}) "}, " CQ_\\1 ").mid (column_qsoText);
int i1 = msg.indexOf(" ");
call = msg.mid(i1+1);
int i2 = call.indexOf(" ");
grid = call.mid(i2+1,4);
call = call.mid(0,i2).replace(">","");
int i1 = msg.indexOf (" ");
call = msg.mid (i1 + 1);
int i2 = call.indexOf (" ");
if (" R " == call.mid (i2, 3)) // MSK144 contest mode report
{
grid = call.mid (i2 + 3, 4);
}
else
{
grid = call.mid (i2 + 1, 4);
}
call = call.left (i2).replace (">", "");
}
int DecodedText::timeInSeconds()