mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-09-03 05:38:01 -04:00
Merged from trunk:
------------------------------------------------------------------------ r8081 | bsomervi | 2017-09-09 23:59:06 +0100 (Sat, 09 Sep 2017) | 1 line Add a helpful comment ------------------------------------------------------------------------ r8082 | bsomervi | 2017-09-09 23:59:13 +0100 (Sat, 09 Sep 2017) | 3 lines Enhance the ADIF parser to accept newlines between fields ADIF allows any characters between fields to aid readability. ------------------------------------------------------------------------ git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx-1.8@8083 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
d095744efd
commit
61ea1a0803
@ -59,14 +59,25 @@ void ADIF::load()
|
|||||||
if (inputFile.open(QIODevice::ReadOnly))
|
if (inputFile.open(QIODevice::ReadOnly))
|
||||||
{
|
{
|
||||||
QTextStream in(&inputFile);
|
QTextStream in(&inputFile);
|
||||||
|
QString record;
|
||||||
|
|
||||||
|
// skip header record
|
||||||
|
while (!in.atEnd () && !record.contains ("<EOH>", Qt::CaseInsensitive))
|
||||||
|
{
|
||||||
|
record += in.readLine ();
|
||||||
|
}
|
||||||
while ( !in.atEnd() )
|
while ( !in.atEnd() )
|
||||||
{
|
{
|
||||||
QString line = in.readLine();
|
record.clear ();
|
||||||
|
while (!in.atEnd () && !record.contains ("<EOR>", Qt::CaseInsensitive))
|
||||||
|
{
|
||||||
|
record += in.readLine ();
|
||||||
|
}
|
||||||
QSO q;
|
QSO q;
|
||||||
q.call = _extractField(line,"CALL:");
|
q.call = _extractField(record,"CALL:");
|
||||||
q.band = _extractField(line,"BAND:");
|
q.band = _extractField(record,"BAND:");
|
||||||
q.mode = _extractField(line,"MODE:");
|
q.mode = _extractField(record,"MODE:");
|
||||||
q.date = _extractField(line,"QSO_DATE:");
|
q.date = _extractField(record,"QSO_DATE:");
|
||||||
if (q.call != "")
|
if (q.call != "")
|
||||||
_data.insert(q.call,q);
|
_data.insert(q.call,q);
|
||||||
}
|
}
|
||||||
|
@ -4158,6 +4158,8 @@ void MainWindow::genStdMsgs(QString rpt, bool unconditional)
|
|||||||
msgtype(t0 + "R" + rpt, ui->tx3);
|
msgtype(t0 + "R" + rpt, ui->tx3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// don't use short codes here as in a sked with a type 2
|
||||||
|
// prefix we would never send out prefix/suffix
|
||||||
msgtype(t + "73", ui->tx5->lineEdit ());
|
msgtype(t + "73", ui->tx5->lineEdit ());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user