Skip to content

Commit

Permalink
Warnings removed
Browse files Browse the repository at this point in the history
  • Loading branch information
ea4k committed Oct 7, 2024
1 parent d897cee commit 940392d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/frequency.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@

Frequency::Frequency(){}

Frequency::Frequency(const Frequency &f){
freq = f.freq;
}
//Frequency::Frequency(const Frequency &f) {
// freq = f.freq;
//}

Frequency::Frequency(const double _f, FreqUnits _u)
{
Expand Down
3 changes: 2 additions & 1 deletion src/frequency.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ class Frequency: public QObject
public:
//Frequency() : freq(0.0), bandInMHz(""), tolerance(0.0) {};
Frequency();
Frequency(const Frequency &f);
//Frequency(const Frequency &f);
Frequency(const Frequency &f) : QObject(), freq(f.freq) {}
Frequency(const double _f, FreqUnits _u = MHz);
//Frequency(const QString &_parentName);
//Frequency(const QString &_parentName, const Frequency &_f);
Expand Down
13 changes: 10 additions & 3 deletions src/utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
* *
*****************************************************************************/
#include "utilities.h"
#include "dataproxy_sqlite.h"

#include <QRegularExpression>
//bool c;
Utilities::Utilities(const QString &_parentName)
{
Expand Down Expand Up @@ -1343,7 +1342,15 @@ bool Utilities::isValidGrid(const QString &_b)
bool Utilities::isValidGrid_ext(const QString &_b)
{// TODO: Implement the checks
// https://www.adif.org/314/ADIF_314.htm#QSO_Field_GRIDSQUARE_EXT
return true;
QString testLocator = _b.toUpper();
QRegularExpression rx;
rx.setPattern("^([A-X][A-X])([0-9][0-9])?$");
if (rx.match(testLocator).hasMatch())
{
//qDebug() << Q_FUNC_INFO << ": " << testLocator;
return true;
}
return false;
}

bool Utilities::isValidVUCCGrids(const QString &_b)
Expand Down

0 comments on commit 940392d

Please sign in to comment.