Skip to content

Commit

Permalink
Fixed ADI parser/cache.
Browse files Browse the repository at this point in the history
  • Loading branch information
hmatuschek committed Jul 21, 2020
1 parent 43f420d commit 00b2045
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ add_subdirectory(src)
# Source distribution packages:
set(CPACK_PACKAGE_VERSION_MAJOR "1")
set(CPACK_PACKAGE_VERSION_MINOR "0")
set(CPACK_PACKAGE_VERSION_PATCH "5")
set(CPACK_PACKAGE_VERSION_PATCH "6")
set(CPACK_SOURCE_GENERATOR "TGZ")
set(CPACK_SOURCE_PACKAGE_FILE_NAME
"${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
Expand Down
2 changes: 1 addition & 1 deletion shared/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<body>
<center>
<h1>RBN Client</h1>
<h3>version 1.0.5</h3>
<h3>version 1.0.6</h3>
<h4><h ref="https://dm3mat.darc.de/rbn">https://dm3mat.darc.de/rbn</a></h4>
<h5><i>Copyright (C) 2019 Hannes Matuschek, DM3MAT, dm3mat[at]darc[dot]de</i></h5>
</center>
Expand Down
2 changes: 1 addition & 1 deletion snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: rbnc
version: git
grade: devel
#version: 1.0.5
#version: 1.0.6
#grade: stable
summary: Reverse-Beacon-Network Desktop-Client
description: |
Expand Down
2 changes: 2 additions & 0 deletions src/adi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ LogFile::insert(const Record &qso) {
int dxcc = dxcc_from_call(qso.call);
if (! _DXCCs.contains(dxcc)) {
_DXCCs.insert(dxcc, DXCCRecord(qso.band, qso.mode));
} else {
_DXCCs[dxcc].insert(qso.band, qso.mode);
}
}

Expand Down
1 change: 1 addition & 0 deletions src/adi.hh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef ADI_HH
#define ADI_HH

#include <QObject>
#include <QFile>
#include <QString>
#include <QDateTime>
Expand Down
5 changes: 4 additions & 1 deletion src/dxcc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,9 @@ DXCCList::addRule(const Rule &rule) {

int
DXCCList::dxcc(const QString &call) {
if (_dxcc_cache.contains(call))
if (_dxcc_cache.contains(call)) {
return _dxcc_cache[call];
}

int match_len = 0;
Rule match;
Expand All @@ -342,7 +343,9 @@ DXCCList::dxcc(const QString &call) {

QString
DXCCList::dxcc_name(const QString &call) {
// get DXCC ID from call
int nr = dxcc(call);
// get name by ID
if (! _dxcc_name.contains(nr))
return "Unknown DXCC";
return _dxcc_name[nr];
Expand Down
1 change: 1 addition & 0 deletions src/dxcc.hh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define DXCC_HH

#include "webfile.hh"
#include <QObject>
#include <QString>
#include <QRegularExpression>

Expand Down

0 comments on commit 00b2045

Please sign in to comment.