Remove my new QHash stuff; adapt the existing logbook code instead.

We now display "new call on current band" as well as "new call on any band".
Something similar should be done for DXCCs and grids.
This commit is contained in:
Joe Taylor
2018-08-03 16:31:19 -04:00
parent 0d7cd3ed03
commit a292b2bb58
7 changed files with 76 additions and 154 deletions
+14 -16
View File
@@ -67,25 +67,23 @@ void LogBook::_setAlreadyWorkedFromLog()
void LogBook::match(/*in*/const QString call,
/*out*/ QString &countryName,
bool &callWorkedBefore,
bool &countryWorkedBefore) const
bool &countryWorkedBefore,
QString currentBand) const
{
if (call.length() > 0)
{
QString currentMode = "JT9"; // JT65 == JT9 in ADIF::match()
QString currentBand = ""; // match any band
callWorkedBefore = _log.match(call,currentBand,currentMode);
countryName = _countries.find(call);
// qDebug() << "B" << countryName;
if (call.length() > 0) {
QString currentMode = "JT9"; // JT65 == JT9 == FT8 in ADIF::match()
// QString currentBand = ""; // match any band
callWorkedBefore = _log.match(call,currentBand,currentMode);
countryName = _countries.find(call);
if (countryName.length() > 0) // country was found
countryWorkedBefore = _worked.getHasWorked(countryName);
else
{
countryName = "where?"; //error: prefix not found
countryWorkedBefore = false;
}
if (countryName.length() > 0) { // country was found
countryWorkedBefore = _worked.getHasWorked(countryName);
} else {
countryName = "where?"; //error: prefix not found
countryWorkedBefore = false;
}
//qDebug() << "Logbook:" << call << ":" << countryName << "Cty B4:" << countryWorkedBefore << "call B4:" << callWorkedBefore;
// qDebug() << "Logbook:" << call << currentBand << callWorkedBefore << countryName << countryWorkedBefore;
}
}
void LogBook::addAsWorked(const QString call, const QString band, const QString mode, const QString date)