mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-02-03 09:44:24 -05:00
New MAP65 feature: read wsjtx.log to recognize EME contest dupes.
This commit is contained in:
parent
cb19944508
commit
dedc54e449
@ -19,7 +19,7 @@ int main(int argc, char *argv[])
|
||||
QApplication a {argc, argv};
|
||||
// Override programs executable basename as application name.
|
||||
a.setApplicationName ("MAP65");
|
||||
a.setApplicationVersion ("3.0.0");
|
||||
a.setApplicationVersion ("3.0.1");
|
||||
// switch off as we share an Info.plist file with WSJT-X
|
||||
a.setAttribute (Qt::AA_DontUseNativeMenuBar);
|
||||
MainWindow w;
|
||||
|
@ -1404,6 +1404,8 @@ void MainWindow::readFromStdout() //readFromStdout
|
||||
return;
|
||||
}
|
||||
|
||||
read_log();
|
||||
|
||||
if(t.indexOf("!") >= 0) {
|
||||
int n=t.length();
|
||||
int m=2;
|
||||
@ -2344,3 +2346,24 @@ bool MainWindow::isGrid4(QString g)
|
||||
if(g.mid(3,1)<'0' or g.mid(3,1)>'9') return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void MainWindow::read_log()
|
||||
{
|
||||
// Update "m_worked" by reading wsjtx.log
|
||||
m_worked.clear(); //Start from scratch
|
||||
QFile f("wsjtx.log");
|
||||
f.open(QIODevice::ReadOnly);
|
||||
if(f.isOpen()) {
|
||||
QTextStream in(&f);
|
||||
QString line,callsign;
|
||||
for(int i=0; i<99999; i++) {
|
||||
line=in.readLine();
|
||||
if(line.length()<=0) break;
|
||||
callsign=line.mid(40,6);
|
||||
int n=callsign.indexOf(",");
|
||||
if(n>0) callsign=callsign.left(n);
|
||||
m_worked[callsign]=true;
|
||||
}
|
||||
f.close();
|
||||
}
|
||||
}
|
||||
|
@ -294,6 +294,7 @@ private:
|
||||
void stub();
|
||||
bool isGrid4(QString g);
|
||||
bool subProcessFailed (QProcess *, int exit_code, QProcess::ExitStatus);
|
||||
void read_log();
|
||||
};
|
||||
|
||||
extern void getfile(QString fname, bool xpol, int idInt);
|
||||
|
Loading…
Reference in New Issue
Block a user