From 3d67be3023bf34eac7f93fa422f5ef569abb92a9 Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Wed, 17 Jul 2019 15:12:32 +0200 Subject: New upstream version 2.1.0+repack --- logbook/logbook.cpp | 48 ++++++++++++++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 18 deletions(-) (limited to 'logbook/logbook.cpp') diff --git a/logbook/logbook.cpp b/logbook/logbook.cpp index a154664d..96a8cb8e 100644 --- a/logbook/logbook.cpp +++ b/logbook/logbook.cpp @@ -32,7 +32,7 @@ void LogBook::match (QString const& call, QString const& mode, QString const& gr bool& ITUZoneB4, QString const& band) const { - if (call.length() > 0) + if (call.size() > 0) { auto const& mode_to_check = (config_ && !config_->highlight_by_mode ()) ? QString {} : mode; callB4 = worked_before_.call_worked (call, mode_to_check, band); @@ -77,30 +77,30 @@ QByteArray LogBook::QSOToADIF (QString const& hisCall, QString const& hisGrid, Q QString const& xSent, QString const& xRcvd) { QString t; - t = "" + hisCall; - t += " " + hisGrid; + t = "" + hisCall; + t += " " + hisGrid; if (mode != "FT4") { - t += " " + mode; + t += " " + mode; } else { - t += " MFSK " + mode; + t += " MFSK " + mode; } - t += " " + rptSent; - t += " " + rptRcvd; + t += " " + rptSent; + t += " " + rptRcvd; t += " " + dateTimeOn.date().toString("yyyyMMdd"); t += " " + dateTimeOn.time().toString("hhmmss"); t += " " + dateTimeOff.date().toString("yyyyMMdd"); t += " " + dateTimeOff.time().toString("hhmmss"); - t += " " + band; - t += " " + strDialFreq; - t += " " + myCall; - t += " " + myGrid; - if(txPower!="") t += " " + txPower; - if(comments!="") t += " " + comments; - if(name!="") t += " " + name; - if(operator_call!="") t+=" " + operator_call; + t += " " + band; + t += " " + strDialFreq; + t += " " + myCall; + t += " " + myGrid; + if(txPower!="") t += " " + txPower; + if(comments!="") t += " " + comments; + if(name!="") t += " " + name; + if(operator_call!="") t+=" " + operator_call; if (xSent.size ()) { auto words = xSent.split (' ', QString::SkipEmptyParts); @@ -131,16 +131,28 @@ QByteArray LogBook::QSOToADIF (QString const& hisCall, QString const& hisGrid, Q { if (words.at (1).toUInt ()) { - t += " " + words.at (1); + t += " " + words.at (1); } else if (words.at (0).toUInt () && words.at (0).size () > 3) // EU VHF contest exchange { // strip report and set SRX to serial - t += " " + words.at (0).mid (2); + t += " " + words.at (0).mid (2); } else { - t += " " + words.at (1); + if (Configuration::SpecialOperatingActivity::FIELD_DAY == config_->special_op_id ()) + { + // include DX as an ARRL_SECT value even though it is + // not in the ADIF spec ARRL_SECT enumeration, done + // because N1MM does the same + t += " ARRL-FIELD-DAY ' + xRcvd + + " ' + + words.at (0) + " ' + words.at (1); + } + else if (Configuration::SpecialOperatingActivity::RTTY == config_->special_op_id ()) + { + t += " " + words.at (1); + } } } } -- cgit v1.2.3