diff --git a/src/Changelog b/src/Changelog index 43da1ba9..925d05d7 100644 --- a/src/Changelog +++ b/src/Changelog @@ -2,6 +2,9 @@ TESTS to do before releasing: - ADIF log Import - LoTW log Import +- Edit QSO. Check how data comes from DB to the UI. + - Attention to name + - Receive QSOs from WSJTX: - check if they are properly imported to the log. - Test a dupe QSO, a message should be shown @@ -17,7 +20,7 @@ TBD - 2.4 - BugFix: Fixed the ISO name for Togo. - BugFix: Country fix read failed with complex prefixes. - Bugfix: CQ & ITU zones may be wrong for callsigns from specific DXCC if coming from WSJTX. - +- Bugfix: ClubLog date was not properly managed. Mar 2024 - 2.3.4 - BugFix: After Editing a QSO, lotw_qsl_rcvd is emptied (Closes #656, #659) (TNX N6PAZ, EA5WA) diff --git a/src/dataproxy_sqlite.cpp b/src/dataproxy_sqlite.cpp index 6cf8e6d4..f5d6b3bc 100644 --- a/src/dataproxy_sqlite.cpp +++ b/src/dataproxy_sqlite.cpp @@ -8288,7 +8288,7 @@ QString DataProxy_SQLite::getADIFFromQSOQuery(QSqlRecord rec, ExportMode _em, bo qso.setLoTWQSL_SENT(getADIFValueFromRec(rec, "lotw_qsl_sent")); aux = getADIFValueFromRec(rec, "clublog_qso_upload_date"); - qso.setClublogQSOUpdateDate(util->getDateFromSQliteString(aux)); + qso.setClubLogDate(util->getDateFromSQliteString(aux)); qso.setClubLogStatus(getADIFValueFromRec(rec, "clublog_qso_upload_status")); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index c2f2054e..f2a73ff9 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -4599,285 +4599,91 @@ void MainWindow::qsoToEdit (const int _qso) clearUIDX(true); readingTheUI = true; - int nameCol; - QString aux1; - double testValueDouble; // Variable just to test if the value is in the appropriate range setModifying(true); modifyingQSO = _qso; + QSO qsoE; + qsoE.fromDB(_qso); - //TODO: Optimize the following query. Maybe the * is not needed. - QString stringQuery = QString("SELECT * FROM log WHERE id ='%1' AND lognumber='%2'").arg(_qso).arg(currentLog); - //qDebug() << Q_FUNC_INFO << " - " << stringQuery ; - - QSqlQuery query(stringQuery); - bool sqlOK = query.exec(); - if (!sqlOK) + if ((clublogActive) && (clublogRealTime)) { - emit queryError(Q_FUNC_INFO, query.lastError().databaseText(), query.lastError().nativeErrorCode(), query.lastQuery()); + clublogPrevQSO = dataProxy->getClubLogRealTimeFromId(_qso); } - query.next(); - if (query.isValid()) - { - if ((clublogActive) && (clublogRealTime)) - { - clublogPrevQSO = dataProxy->getClubLogRealTimeFromId(_qso); - } + manualMode = true; // We stop hamlib & wsjtx receiving data while editing a QSO + mainQSOEntryWidget->setManualMode (manualMode); - QSqlRecord rec = query.record(); + // ** Start of SAT data - manualMode = true; // We stop hamlib & wsjtx receiving data while editing a QSO - mainQSOEntryWidget->setManualMode (manualMode); + //qDebug() << Q_FUNC_INFO << " - SATELLITE - satName" ; + satTabWidget->setFillingToEdit(true); + satTabWidget->setSatName(qsoE.getSatName()); + satTabWidget->setSatMode(qsoE.getSatMode()); - // ADD THE DATA THAT IS PRESENT IN ALL THE MODES - - // ** Start of SAT data - // ** BAND / MODE / Locator shoule be executed after SAT or may be removed - //qDebug() << Q_FUNC_INFO << " - SATELLITE - Start" ; - //qDebug() << Q_FUNC_INFO << " - SATELLITE - satName" ; - satTabWidget->setFillingToEdit(true); - nameCol = rec.indexOf("sat_name"); - aux1 = (query.value (nameCol)).toString(); - //qDebug() << Q_FUNC_INFO << " - SatName: " << aux1; - if (aux1.length()>0) - { - satTabWidget->setSatName(aux1); - } - else - { - satTabWidget->clear(); - } + mainQSOEntryWidget->setQRZ(qsoE.getCall()); - //qDebug() << Q_FUNC_INFO << " - Start SATELLITE - satMode" ; - nameCol = rec.indexOf("sat_mode"); - aux1 = (query.value (nameCol)).toString(); - if (aux1.length()>1) - { - satTabWidget->setSatMode(aux1); - } - else - { - satTabWidget->setSatMode("-CLEAR-"); - } - - //qDebug() << Q_FUNC_INFO << " - SATELLITE - end" ; - // END of SAT data - - - //QString currentQrz = dataProxy->getCallFromId(modifyingQSO); - nameCol = rec.indexOf("call"); - aux1 = (query.value (nameCol)).toString(); - //qDebug() << Q_FUNC_INFO << " - calling setQRZ-1" ; - mainQSOEntryWidget->setQRZ(aux1); - - QString currentQrz = aux1; + QString currentQrz = qsoE.getCall(); currentEntity = world->getQRZARRLId(currentQrz); - //qDebug() << Q_FUNC_INFO << " - currentEntity " << QString::number(currentEntity) ; - - nameCol = rec.indexOf("qso_date"); - aux1 = (query.value (nameCol)).toString(); - //qDebug() << Q_FUNC_INFO << " - date: " << aux1 ; - mainQSOEntryWidget->setDateTime(util->getDateTimeFromSQLiteString(aux1)); - //mainQSOEntryWidget->setDate(QDate::fromString(aux1, "yyyy/MM/dd")); - dateTimeTemp->setDate(util->getDateFromSQliteString(aux1)); - - //qDebug() << Q_FUNC_INFO << " - bandid" ; - nameCol = rec.indexOf("bandid"); - aux1 = (query.value (nameCol)).toString(); - stringQuery = QString("SELECT name FROM band WHERE id ='%1'").arg(aux1); - QSqlQuery queryAux(stringQuery); - - sqlOK = queryAux.exec(); - if (!sqlOK) - { - emit queryError(Q_FUNC_INFO, queryAux.lastError().databaseText(), queryAux.lastError().nativeErrorCode(), queryAux.lastQuery()); - } - - queryAux.next(); - if (queryAux.isValid()) - { - aux1 = (queryAux.value (0)).toString(); - //qDebug() << Q_FUNC_INFO << " - bandid-1 " << aux1 ; - //qDebug() << Q_FUNC_INFO << " - Changing from: " << mainQSOEntryWidget->getBand() ; - mainQSOEntryWidget->setBand(aux1); - //bandComboBox->setCurrentIndex(bandComboBox->findText(aux1, Qt::MatchCaseSensitive)); - //qDebug() << Q_FUNC_INFO << " - Changing to: " << mainQSOEntryWidget->getBand() ; - } - else - { - //qDebug() << Q_FUNC_INFO << " - bandid-NO " ; - mainQSOEntryWidget->setBand(dataProxy->getNameFromBandId(defaultBand)); - //bandComboBox->setCurrentIndex(bandComboBox->findText(dataProxy->getNameFromBandId(defaultBand), Qt::MatchCaseSensitive)); - //bandComboBox->setCurrentIndex(defaultBand); - } + mainQSOEntryWidget->setDateTime(qsoE.getDateTimeOn()); - //qDebug() << Q_FUNC_INFO << " - modeid" ; - nameCol = rec.indexOf("modeid"); - aux1 = (query.value (nameCol)).toString(); - //qDebug() << Q_FUNC_INFO << " - (aux1)-1: " << aux1 ; + dateTimeTemp->setDate(qsoE.getDate()); - aux1 = dataProxy->getNameFromSubModeId(aux1.toInt()); + mainQSOEntryWidget->setBand(qsoE.getBand()); //qDebug() << Q_FUNC_INFO << " - RST" ; - QSOTabWidget->setRSTToMode(aux1, readingTheUI); + QSOTabWidget->setRSTToMode(qsoE.getSubmode(), readingTheUI); + //qDebug() << Q_FUNC_INFO << " - modeid" ; - if (mainQSOEntryWidget->isModeExisting(aux1)) + if (mainQSOEntryWidget->isModeExisting(qsoE.getSubmode())) { - mainQSOEntryWidget->setMode(aux1); + mainQSOEntryWidget->setMode(qsoE.getSubmode()); } else { mainQSOEntryWidget->setMode(dataProxy->getNameFromSubModeId(defaultMode)); } - stringQuery = QString("SELECT submode FROM mode WHERE id ='%1'").arg(aux1); - sqlOK = queryAux.exec(stringQuery); - //qDebug() << Q_FUNC_INFO << " - After ALL Mode actions" ; - nameCol = rec.indexOf("rst_sent"); - aux1 = (query.value (nameCol)).toString(); - QSOTabWidget->setRSTTX (aux1); - //qDebug() << Q_FUNC_INFO << " - RST_SENT: " << aux1 ; - - nameCol = rec.indexOf("rst_rcvd"); - aux1 = (query.value (nameCol)).toString(); - QSOTabWidget->setRSTRX (aux1); - - //qDebug() << Q_FUNC_INFO << " - before switch" ; - - nameCol = rec.indexOf("qsl_via"); - aux1 = (query.value (nameCol)).toString(); - QSLTabWidget->setQSLVia(aux1); - - nameCol = rec.indexOf("qslmsg"); - aux1 = (query.value (nameCol)).toString(); - QSLTabWidget->setQSLMsg(aux1); - - //qslmsgTextEdit->setText(aux1); - nameCol = rec.indexOf("comment"); - aux1 = (query.value (nameCol)).toString(); - if (aux1.length()>0) - { - commentTabWidget->setData(aux1); - //commentLineEdit->setText(aux1); - } - else - { - commentTabWidget->clear(); - //commentLineEdit->clear(); - } - - nameCol = rec.indexOf("name"); - aux1 = (query.value (nameCol)).toString(); - //qDebug() << Q_FUNC_INFO << " - NAME: " << aux1 ; - - if (aux1.length()>0) - { - QSOTabWidget->setName (aux1); - } - else - { - QSOTabWidget->clearName (); - } - - nameCol = rec.indexOf("qth"); - aux1 = (query.value (nameCol)).toString(); - QSOTabWidget->setQTH (aux1); + QSOTabWidget->setRSTTX (qsoE.getRSTTX()); + //qDebug() << Q_FUNC_INFO << " - RST_SENT: " << aux1 ; + QSOTabWidget->setRSTRX (qsoE.getRSTRX()); + QSLTabWidget->setQSLVia(qsoE.getQSLVia()); + QSLTabWidget->setQSLMsg(qsoE.getQSLMsg()); - nameCol = rec.indexOf("gridsquare"); - aux1 = (query.value (nameCol)).toString(); - //qDebug() << Q_FUNC_INFO << " - GRIDSQUARE: " << aux1 ; - QSOTabWidget->setDXLocator(aux1); + commentTabWidget->setData(qsoE.getComment()); - nameCol = rec.indexOf("operator"); - aux1 = (query.value (nameCol)).toString(); - //qDebug() << Q_FUNC_INFO << " - OPERATOR: " << aux1 ; - myDataTabWidget->setOperator(aux1); + //qDebug() << Q_FUNC_INFO << " - NAME: " << aux1 ; - nameCol = rec.indexOf("station_callsign"); - aux1 = (query.value (nameCol)).toString(); - //qDebug() << Q_FUNC_INFO << " - STATIONQRZ: " << aux1 ; - myDataTabWidget->setStationCallsign(aux1); + QSOTabWidget->setName (qsoE.getName()); + QSOTabWidget->setQTH (qsoE.getQTH()); + QSOTabWidget->setDXLocator(qsoE.getGridSquare()); - nameCol = rec.indexOf("my_gridsquare"); - aux1 = (query.value (nameCol)).toString(); - myDataTabWidget->setMyLocator(aux1); + myDataTabWidget->setOperator(qsoE.getOperatorCallsign()); + myDataTabWidget->setStationCallsign(qsoE.getStationCallsign()); - nameCol = rec.indexOf("my_vucc_grids"); - aux1 = (query.value (nameCol)).toString(); - myDataTabWidget->setMyVUCCGrids(aux1); + myDataTabWidget->setMyLocator(qsoE.getMyGridSquare()); + myDataTabWidget->setMyVUCCGrids(qsoE.getMyVUCCGrids()); - nameCol = rec.indexOf("my_rig"); - aux1 = (query.value (nameCol)).toString(); - if (!aux1.isEmpty ()) - { - myDataTabWidget->setMyRig (aux1); - } + myDataTabWidget->setMyRig (qsoE.getMyRig()); + myDataTabWidget->setMyAntenna (qsoE.getMyAntenna()); + myDataTabWidget->setMySOTA (qsoE.getMySOTA_REF()); + myDataTabWidget->setMyPower(qsoE.getTXPwr()); - nameCol = rec.indexOf("my_antenna"); - aux1 = (query.value (nameCol)).toString(); - if (!aux1.isEmpty ()) - { - myDataTabWidget->setMyAntenna (aux1); - } + QSOTabWidget->setRXPwr(qsoE.getRXPwr()); - nameCol = rec.indexOf("my_sota_ref"); - aux1 = (query.value (nameCol)).toString(); - if (!aux1.isEmpty ()) - { - myDataTabWidget->setMySOTA (aux1); - } + //qDebug() << Q_FUNC_INFO << " - freq" ; + QSOTabWidget->setTXFreq (qsoE.getFreqTX()); + QSOTabWidget->setRXFreq (qsoE.getFreqRX()); - nameCol = rec.indexOf("tx_pwr"); - myDataTabWidget->setMyPower((query.value (nameCol)).toDouble()); - - nameCol = rec.indexOf("rx_pwr"); - aux1 = (query.value (nameCol)).toString(); - testValueDouble = aux1.toDouble(); - if (testValueDouble >=0) - { - QSOTabWidget->setRXPwr(testValueDouble); - } - else - { - QSOTabWidget->setRXPwr(0.0); - } - //qDebug() << Q_FUNC_INFO << " - freq" ; - nameCol = rec.indexOf("freq"); - aux1 = (query.value (nameCol)).toString(); - QSOTabWidget->setTXFreq (aux1.toDouble ()); - - //qDebug() << Q_FUNC_INFO << " - freq_rx" ; - nameCol = rec.indexOf("freq_rx"); - aux1 = (query.value (nameCol)).toString(); - QSOTabWidget->setRXFreq (aux1.toDouble ()); - - //QSL SENT - //qDebug() << Q_FUNC_INFO << " - qsl_sent" ; - nameCol = rec.indexOf("qsl_sent"); - aux1 = (query.value (nameCol)).toString(); - - QSLTabWidget->setQSLSenStatus(aux1); - //TODO: Depending on the Value a date should or not exist. - // This code may be importing dates when they should not exist. - nameCol = rec.indexOf("qslsdate"); - aux1 = (query.value (nameCol)).toString(); - - if (util->getDateFromSQliteString(aux1).isValid() ) - - //if ( (QDate::fromString(aux1, "yyyy/MM/dd")).isValid() ) - { - QSLTabWidget->setQSLSenDate(util->getDateFromSQliteString(aux1)); - } - - nameCol = rec.indexOf("qsl_sent_via"); - aux1 = (query.value (nameCol)).toString(); - QSLTabWidget->setQSLSenVia(aux1); + //QSL SENT + //qDebug() << Q_FUNC_INFO << " - qsl_sent" ; + QSLTabWidget->setQSLSenStatus(qsoE.getQSL_RCVD()); + QSLTabWidget->setQSLSenDate(qsoE.getQSLSDate()); + QSLTabWidget->setQSLSenVia(qsoE.getQSLSentVia()); //QSL RECEPTION @@ -4885,211 +4691,72 @@ void MainWindow::qsoToEdit (const int _qso) // tr("B-Bureau") << tr("D-Direct") << tr("E-Electronic") << tr("M-Manager"); //QSLRDATE: (only valid if QSL_RCVD is Y, I, or V) - nameCol = rec.indexOf("qsl_rcvd"); - aux1 = (query.value (nameCol)).toString(); - QSLTabWidget->setQSLRecStatus(aux1); - //TODO: Depending on the Value a date should or not exist. - // This code may be importing dates when they should not exist. - nameCol = rec.indexOf("qslrdate"); - aux1 = (query.value (nameCol)).toString(); - if (util->getDateFromSQliteString(aux1).isValid() ) - { - QSLTabWidget->setQSLRecDate(util->getDateFromSQliteString(aux1)); - } + QSLTabWidget->setQSLRecStatus(qsoE.getQSL_RCVD()); + QSLTabWidget->setQSLRecDate(qsoE.getQSLRDate()); + QSLTabWidget->setQSLRecVia(qsoE.getQSLRecVia()); - nameCol = rec.indexOf("qsl_rcvd_via"); - aux1 = (query.value (nameCol)).toString(); - QSLTabWidget->setQSLRecVia(aux1); + //TODO: BUG: When something is selected while modifying the QSL is deleted??? - //TODO: BUG: When something is selected while modifying the QSL is deleted??? + //CLUBLOG + eQSLTabWidget->setClubLogStatus(qsoE.getClubLogStatus()); + eQSLTabWidget->setClubLogDate(qsoE.getClubLogDate()); - //CLUBLOG - nameCol = rec.indexOf("clublog_qso_upload_status"); - aux1 = (query.value (nameCol)).toString(); - eQSLTabWidget->setClubLogStatus(aux1.toUpper()); + eQSLTabWidget->setEQSLSenStatus(qsoE.getEQSLQSL_SENT()); + eQSLTabWidget->setEQSLSenDate(qsoE.getEQSLQSLSDate()); - //TODO: Depending on the Value a date should or not exist. - // This code may be importing dates when they should not exist. - nameCol = rec.indexOf("clublog_qso_upload_date"); - aux1 = (query.value (nameCol)).toString(); - if (util->getDateFromSQliteString(aux1).isValid() ) - { - eQSLTabWidget->setClubLogDate(util->getDateFromSQliteString(aux1)); - } + eQSLTabWidget->setEQSLRecStatus(qsoE.getEQSLQSL_RCVD()); + eQSLTabWidget->setEQSLRecDate(qsoE.getEQSLQSLRDate()); - //CLUBLOG + eQSLTabWidget->setLOTWSenStatus(qsoE.getLoTWQSL_SENT()); + eQSLTabWidget->setLOTWSenDate(qsoE.getLoTWQSLSDate()); + eQSLTabWidget->setLOTWRecStatus(qsoE.getLoTWQSL_RCVD()); + eQSLTabWidget->setLOTWRecDate(qsoE.getLoTWQSLRDate()); - //EQSL_QSL_SENT: {Y, N, R, Q, I} - // tr("Y-Yes") << tr("N-No") << tr("R-Requested") << tr("Q-Queued") << tr("I-Ignore"); - //EQSL_QSLSDATE (only valid if EQSL_SENT is Y, Q, or I) + eQSLTabWidget->setQRZCOMStatus(qsoE.getQRZCOMStatus()); + eQSLTabWidget->setQRZCOMDate(qsoE.getQRZCOMDate()); - nameCol = rec.indexOf("eqsl_qsl_sent"); - aux1 = (query.value (nameCol)).toString(); - eQSLTabWidget->setEQSLSenStatus(aux1.toUpper()); + othersTabWidget->setSOTA (qsoE.getSOTA_REF()); + othersTabWidget->setAge (qsoE.getAge()); + othersTabWidget->setDistance(qsoE.getDistance()); + othersTabWidget->setVUCCGrids (qsoE.getVUCCGrids()); + othersTabWidget->setIOTA(qsoE.getIOTA()); - //TODO: Depending on the Value a date should or not exist. - // This code may be importing dates when they should not exist. - nameCol = rec.indexOf("eqsl_qslsdate"); - aux1 = (query.value (nameCol)).toString(); - if (util->getDateFromSQliteString(aux1).isValid() ) + //qDebug() << Q_FUNC_INFO << " - in default - 100: " << QString::number(currentEntity) ; + //qDebug() << Q_FUNC_INFO << " - Checking DXCC: " << aux1 << " - " << world->getEntityName(aux1.toInt()) ; + + if (qsoE.getDXCC()>=1) + { + if (qsoE.getDXCC() != util->getNormalizedDXCCValue (currentEntity)) { - eQSLTabWidget->setEQSLSenDate(util->getDateFromSQliteString(aux1)); + currentEntity = qsoE.getDXCC(); } + //qDebug() << Q_FUNC_INFO << " - in default - 101: " << QString::number(currentEntity) ; + } + else + { + currentEntity = world->getQRZARRLId(currentQrz); + //qDebug() << Q_FUNC_INFO << " - in default - 103: " << QString::number(currentEntity) ; + } + //qDebug() << Q_FUNC_INFO << " - in default - 104: " << QString::number(currentEntity) ; + othersTabWidget->setPropMode(qsoE.getPropMode(), false); + infoLabel2->setText(world->getEntityName(currentEntity)); + infoWidget->showEntityInfo(currentEntity); + othersTabWidget->setEntity(currentEntity); - //E-QSL RECEPTION - - // tr("Y-Yes") << tr("N-No") << tr("R-Requested") << tr("I-Ignore") << tr("V-Verified"); - // EQSL_QSL_RCVD: {Y, N, R, I, V} - // EQSL_QSLRDATE: (only valid if EQSL_RCVD is Y, I, or V) - - nameCol = rec.indexOf("eqsl_qsl_rcvd"); - aux1 = (query.value (nameCol)).toString(); - eQSLTabWidget->setEQSLRecStatus(aux1.toUpper()); - - //TODO: Depending on the Value a date should or not exist. - // This code may be importing dates when they should not exist. - nameCol = rec.indexOf("eqsl_qslrdate"); - aux1 = (query.value (nameCol)).toString(); - if (util->isValidDateFromString(aux1)) - { - eQSLTabWidget->setEQSLRecDate(util->getDateFromSQliteString(aux1)); - } - - //LOTW_QSL_SENT: {Y, N, R, Q, I} - // tr("Y-Yes") << tr("N-No") << tr("R-Requested") << tr("Q-Queued") << tr("I-Ignore"); - //LOTW_QSLSDATE (only valid if LOTW_SENT is Y, Q, or I) - - nameCol = rec.indexOf("lotw_qsl_sent"); - aux1 = (query.value (nameCol)).toString(); - eQSLTabWidget->setLOTWSenStatus(aux1.toUpper()); - //qDebug() << Q_FUNC_INFO << " LoTW Sent Status: " << aux1 ; - - //TODO: Depending on the Value a date should or not exist. - // This code may be importing dates when they should not exist. - nameCol = rec.indexOf("lotw_qslsdate"); - aux1 = (query.value (nameCol)).toString(); - - if ( util->isValidDateFromString(aux1) ) - { - eQSLTabWidget->setLOTWSenDate(util->getDateFromSQliteString(aux1)); - } - - //E-QSL RECEPTION - - // tr("Y-Yes") << tr("N-No") << tr("R-Requested") << tr("I-Ignore") << tr("V-Verified"); - // lotw_QSL_RCVD: {Y, N, R, I, V} - // lotw_QSLRDATE: (only valid if lotw_RCVD is Y, I, or V) - - nameCol = rec.indexOf("lotw_qsl_rcvd"); - aux1 = (query.value (nameCol)).toString(); - eQSLTabWidget->setLOTWRecStatus(aux1.toUpper()); - - //TODO: Depending on the Value a date should or not exist. - // This code may be importing dates when they should not exist. - nameCol = rec.indexOf("lotw_qslrdate"); - aux1 = (query.value (nameCol)).toString(); - if ( util->isValidDateFromString(aux1) ) - { - eQSLTabWidget->setLOTWRecDate(util->getDateFromSQliteString(aux1)); - } - - //QRZCOM - nameCol = rec.indexOf("qrzcom_qso_upload_status"); - aux1 = (query.value (nameCol)).toString(); - eQSLTabWidget->setQRZCOMStatus(aux1.toUpper()); - - //TODO: Depending on the Value a date should or not exist. - // This code may be importing dates when they should not exist. - nameCol = rec.indexOf("qrzcom_qso_upload_date"); - aux1 = (query.value (nameCol)).toString(); - if (util->getDateFromSQliteString(aux1).isValid() ) - { - eQSLTabWidget->setQRZCOMDate(util->getDateFromSQliteString(aux1)); - } - - //QRZCOM - - // OTHERS TAB - - nameCol = rec.indexOf("sota_ref"); - aux1 = (query.value (nameCol)).toString(); - if (!aux1.isEmpty ()) - { - othersTabWidget->setSOTA (aux1); - } - nameCol = rec.indexOf("age"); - aux1 = (query.value (nameCol)).toString(); - if (aux1.toDouble ()>0) - { - othersTabWidget->setAge (aux1.toDouble ()); - } - nameCol = rec.indexOf("distance"); - aux1 = (query.value (nameCol)).toString(); - if (aux1.toDouble ()>0) - { - othersTabWidget->setDistance(aux1.toDouble ()); - } - - nameCol = rec.indexOf("vucc_grids"); - aux1 = (query.value (nameCol)).toString(); - //qDebug() << Q_FUNC_INFO << " - VUCC_GRIDS: " << aux1; - if (util->isValidVUCCGrids (aux1)) - { - othersTabWidget->setVUCCGrids (aux1); - } - //qDebug() << Q_FUNC_INFO << " - just before IOTA" ; - - nameCol = rec.indexOf("iota"); - aux1 = (query.value (nameCol)).toString(); - - aux1 = awards->checkIfValidIOTA(aux1); - othersTabWidget->setIOTA(aux1); - - //qDebug() << Q_FUNC_INFO << " - in default - 100: " << QString::number(currentEntity) ; - - nameCol = rec.indexOf("dxcc"); - aux1 = (query.value (nameCol)).toString(); - - //qDebug() << Q_FUNC_INFO << " - Checking DXCC: " << aux1 << " - " << world->getEntityName(aux1.toInt()) ; - - if (aux1.toInt()>=1) - { - if (aux1.toInt() != util->getNormalizedDXCCValue (currentEntity)) - { - currentEntity = aux1.toInt(); - } - //qDebug() << Q_FUNC_INFO << " - in default - 101: " << QString::number(currentEntity) ; - } - else - { - currentEntity = world->getQRZARRLId(currentQrz); - //qDebug() << Q_FUNC_INFO << " - in default - 103: " << QString::number(currentEntity) ; - } - //qDebug() << Q_FUNC_INFO << " - in default - 104: " << QString::number(currentEntity) ; - - nameCol = rec.indexOf("prop_mode"); - aux1 = (query.value (nameCol)).toString(); - othersTabWidget->setPropMode(aux1, false); - infoLabel2->setText(world->getEntityName(currentEntity)); - infoWidget->showEntityInfo(currentEntity); - //qDebug() << Q_FUNC_INFO << " - " << QString::number(currentEntity) ; - othersTabWidget->setEntity(currentEntity); - //qDebug() << Q_FUNC_INFO << " - in default - 101" ; + //qDebug() << Q_FUNC_INFO << " - in default - 101" ; - QStringList _qs; //for the showStatusOfDXCC(const QStringList _qs) - _qs.clear(); - //TODO: The band sometimes fails here. Check + QStringList _qs; //for the showStatusOfDXCC(const QStringList _qs) + _qs.clear(); + //TODO: The band sometimes fails here. Check - _qs << QString::number(currentEntity) << QString::number(dataProxy->getIdFromBandName(mainQSOEntryWidget->getBand())) << QString::number(dataProxy->getIdFromBandName(mainQSOEntryWidget->getMode())) << QString::number(currentLog); + _qs << QString::number(currentEntity) << QString::number(dataProxy->getIdFromBandName(mainQSOEntryWidget->getBand())) << QString::number(dataProxy->getIdFromBandName(mainQSOEntryWidget->getMode())) << QString::number(currentLog); - //qDebug() << Q_FUNC_INFO << " - in default - 104" ; - //qDebug() << Q_FUNC_INFO << " - calling showStatusOfDXCC-05 " ; - showStatusOfDXCC(_qs); + //qDebug() << Q_FUNC_INFO << " - in default - 104" ; + //qDebug() << Q_FUNC_INFO << " - calling showStatusOfDXCC-05 " ; + showStatusOfDXCC(_qs); - //qDebug() << Q_FUNC_INFO << " - in default - 106" ; - } //Closes the next.isValid //qDebug() << Q_FUNC_INFO << " - in default - END" ; readingTheUI = false; satTabWidget->setFillingToEdit(false); diff --git a/src/qso.cpp b/src/qso.cpp index 9b3e113b..a85df3da 100644 --- a/src/qso.cpp +++ b/src/qso.cpp @@ -99,7 +99,6 @@ void QSO::clear() check = QString(); clase = QString(); clublogQSOUpdateDate = QDate(); - clublogDate = QDate(); clublog_status = QString(); county = QString(); comment = QString(); @@ -594,19 +593,19 @@ bool QSO::setClubLogDate(const QDate &_c) { if (_c.isValid()) { - clublogDate = _c; + clublogQSOUpdateDate = _c; return true; } else { - clublogDate = QDate(); + clublogQSOUpdateDate = QDate(); return false; } } QDate QSO::getClubLogDate() { - return clublogDate; + return clublogQSOUpdateDate ; } bool QSO::setQRZCOMStatus(const QString &_c) @@ -633,12 +632,12 @@ bool QSO::setQRZCOMDate(const QDate &_c) { if (_c.isValid()) { - clublogDate = _c; + QRZComDate = _c; return true; } else { - clublogDate = QDate(); + QRZComDate = QDate(); return false; } } @@ -1551,25 +1550,6 @@ QString QSO::getClass() return clase; } -bool QSO::setClublogQSOUpdateDate(const QDate &_c) -{ - if (_c.isValid()) - { - clublogQSOUpdateDate = _c; - return true; - } - else - { - clublogQSOUpdateDate = QDate(); - return false; - } -} - -QDate QSO::getClublogQSOUpdateDate() -{ - return clublogQSOUpdateDate; -} - bool QSO::setContinent(const QString &_c) { if (!util->isValidContinent (_c)) @@ -2601,7 +2581,7 @@ bool QSO::setFreqRX(const QString& data) { return setFreqRX(data.toDouble()); } bool QSO::setRXPwr(const QString& data){ return setRXPwr(data.toDouble()); } bool QSO::setTXPwr(const QString& data){ return setTXPwr(data.toDouble()); } -bool QSO::setClublogQSOUpdateDate(const QString& data) { return setClublogQSOUpdateDate(util->getDateFromADIFDateString(data)); } +bool QSO::setClubLogDate(const QString& data) { return setClubLogDate(util->getDateFromADIFDateString(data)); } bool QSO::setEQSLQSLRDate(const QString& data) { return setEQSLQSLRDate(util->getDateFromADIFDateString(data)); } bool QSO::setEQSLQSLSDate(const QString& data) { return setEQSLQSLSDate(util->getDateFromADIFDateString(data)); } bool QSO::setForceInit(const QString& data) { return setForceInit(util->QStringToBool(data)); } @@ -2650,7 +2630,7 @@ void QSO::InitializeHash() { {"CALL", decltype(std::mem_fn(&QSO::decltype_function))(&QSO::setCall)}, {"CHECK", decltype(std::mem_fn(&QSO::decltype_function))(&QSO::setCheck)}, {"CLASS", decltype(std::mem_fn(&QSO::decltype_function))(&QSO::setClass)}, - {"CLUBLOG_QSO_UPLOAD_DATE", decltype(std::mem_fn(&QSO::decltype_function))(&QSO::setClublogQSOUpdateDate)}, + {"CLUBLOG_QSO_UPLOAD_DATE", decltype(std::mem_fn(&QSO::decltype_function))(&QSO::setClubLogDate)}, {"CLUBLOG_QSO_UPLOAD_STATUS", decltype(std::mem_fn(&QSO::decltype_function))(&QSO::setClubLogStatus)}, {"CNTY", decltype(std::mem_fn(&QSO::decltype_function))(&QSO::setCounty)}, {"COMMENT", decltype(std::mem_fn(&QSO::decltype_function))(&QSO::setComment)}, @@ -2974,6 +2954,34 @@ int QSO::getBandIdFromBandName(bool _rxBand) return -1; } +QString QSO::getBandNameFromBandId(int bandId) +{ + qDebug() << Q_FUNC_INFO << ": " << QString::number(bandId); + QSqlQuery query; + //qDebug() << Q_FUNC_INFO << "Band: " << getBand(); + bool ok = query.prepare ("SELECT name FROM band WHERE id=:id"); + if (!ok) + { + return QString(); + //qDebug() << Q_FUNC_INFO << " - Query NOT prepared"; + } + query.bindValue (":id", bandId); + + if (!query.exec()) + { + emit queryError(Q_FUNC_INFO, query.lastError().databaseText(), query.lastError().nativeErrorCode(), query.lastQuery()); + return QString(); + } + + if (!query.next()) + return QString(); + if (!query.isValid()) + return QString(); + + qDebug() << Q_FUNC_INFO << ": " << (query.value(0)).toString(); + return (query.value(0)).toString(); +} + int QSO::getModeIdFromModeName() { // We need to save always the submode id @@ -3027,6 +3035,42 @@ int QSO::getModeIdFromModeName() return -3; } +QString QSO::getModeNameFromModeId(int _modeId, bool _submode) +{ + qDebug() << Q_FUNC_INFO << ": " << QString::number(_modeId); + QSqlQuery query; + bool ok; + if (_submode) + { + ok = query.prepare ("SELECT submode FROM mode WHERE id=:id"); + } + else + { + ok = query.prepare ("SELECT name FROM mode WHERE id=:id"); + } + + if (!ok) + { + return QString(); + //qDebug() << Q_FUNC_INFO << " - Query NOT prepared"; + } + query.bindValue (":id", _modeId); + + if (!query.exec()) + { + emit queryError(Q_FUNC_INFO, query.lastError().databaseText(), query.lastError().nativeErrorCode(), query.lastQuery()); + return QString(); + } + + if (!query.next()) + return QString(); + if (!query.isValid()) + return QString(); + + qDebug() << Q_FUNC_INFO << ": " << (query.value(0)).toString(); + return (query.value(0)).toString(); +} + QSqlQuery QSO::getPreparedQuery(const QString &_s) { QSqlQuery query; @@ -3066,7 +3110,7 @@ QSqlQuery QSO::getPreparedQuery(const QString &_s) query.bindValue(":band_rx", getBandIdFromBandName(true)); query.bindValue(":checkcontest", getCheck()); query.bindValue(":class", getClass()); - query.bindValue(":clublog_qso_upload_date", util->getDateSQLiteStringFromDate(getClublogQSOUpdateDate())); + query.bindValue(":clublog_qso_upload_date", util->getDateSQLiteStringFromDate(getClubLogDate())); query.bindValue(":clublog_qso_upload_status", getClubLogStatus()); query.bindValue(":cont", getContinent ()); @@ -3244,7 +3288,7 @@ QString QSO::getADIF() adifStr.append(adif->getADIFField ("class", clase)); adifStr.append(adif->getADIFField ("clublog_qso_upload_status", clublog_status )); - if ((clublogDate.isValid()) && ((clublog_status =="Y") || (clublog_status =="N"))) + if ((clublogQSOUpdateDate .isValid()) && ((clublog_status =="Y") || (clublog_status =="N"))) adifStr.append(adif->getADIFField ("clublog_qso_upload_date", util->getADIFDateFromQDate(clublogQSOUpdateDate) )); adifStr.append(adif->getADIFField ("cont", continent)); @@ -3461,3 +3505,225 @@ QString QSO::getBandNameFromFreq(const double _n) return QString(); } } + +bool QSO::fromDB(int _qsoId) +{ + logEvent (Q_FUNC_INFO, "Start", Debug); + QString queryString = "SELECT * FROM log WHERE id=:idQSO"; + QSqlQuery query; + query.prepare(queryString); + query.bindValue(":idQSO", _qsoId); + + if (!query.exec()) + { + emit queryError(Q_FUNC_INFO, query.lastError().databaseText(), query.lastError().nativeErrorCode(), query.lastQuery()); + query.finish(); + logEvent (Q_FUNC_INFO, "END-1", Debug); + return false; + } + if (!query.next()) + { + emit queryError(Q_FUNC_INFO, query.lastError().databaseText(), query.lastError().nativeErrorCode(), query.lastQuery()); + query.finish(); + logEvent (Q_FUNC_INFO, "END-2", Debug); + return false; + } + clear(); + QSqlRecord rec = query.record(); + + + QString data = (query.value(rec.indexOf("qso_date"))).toString(); + setDateTimeOn(util->getDateTimeFromSQLiteString(data)); + + data = (query.value(rec.indexOf("call"))).toString(); + setCall(data); + + data = (query.value(rec.indexOf("rst_sent"))).toString(); + setRSTTX(data); + + data = (query.value(rec.indexOf("rst_rcvd"))).toString(); + setRSTRX(data); + + data = (query.value(rec.indexOf("bandid"))).toString(); + data = getBandNameFromBandId(data.toInt()); + setBand(data); + + data = (query.value(rec.indexOf("band_rx"))).toString(); + data = getBandNameFromBandId(data.toInt()); + setBandRX(data); + + data = (query.value(rec.indexOf("modeid"))).toString(); + setMode(getModeNameFromModeId(data.toInt(), false)); + setSubmode(getModeNameFromModeId(data.toInt(), true)); + + setCQZone((query.value(rec.indexOf("cqz"))).toInt()); + setItuZone((query.value(rec.indexOf("ituz"))).toInt()); + setDXCC((query.value(rec.indexOf("dxcc"))).toInt()); + + setAddress((query.value(rec.indexOf("address"))).toString()); + setAge((query.value(rec.indexOf("age"))).toDouble()); + setCounty((query.value(rec.indexOf("cnty"))).toString()); + + setA_Index((query.value(rec.indexOf("a_index"))).toInt()); + setAnt_az((query.value(rec.indexOf("ant_az"))).toDouble()); + setAnt_el((query.value(rec.indexOf("ant_el"))).toDouble()); + setAnt_Path((query.value(rec.indexOf("ant_path"))).toString()); + + setARRL_Sect((query.value(rec.indexOf("arrl_sect"))).toString()); + setAwardSubmitted((query.value(rec.indexOf("award_submitted"))).toString()); + setAwardGranted((query.value(rec.indexOf("award_granted"))).toString()); + + setCheck((query.value(rec.indexOf("checkcontest"))).toString()); + setClass((query.value(rec.indexOf("class"))).toString()); + + data = (query.value(rec.indexOf("clublog_qso_upload_date"))).toString(); + setClubLogDate(util->getDateTimeFromSQLiteString(data).date()); + setClubLogStatus((query.value(rec.indexOf("clublog_qso_upload_status"))).toString()); + + setContinent((query.value(rec.indexOf("cont"))).toString()); + setContactedOperator((query.value(rec.indexOf("contacted_op"))).toString()); + setContestID((query.value(rec.indexOf("contest_id"))).toString()); + + setCountry((query.value(rec.indexOf("country"))).toString()); + setCreditSubmitted((query.value(rec.indexOf("credit_submitted"))).toString()); + setCreditGranted((query.value(rec.indexOf("credit_granted"))).toString()); + + setDarcDok((query.value(rec.indexOf("darc_dok"))).toString()); + setDistance((query.value(rec.indexOf("distance"))).toDouble()); + + setEmail((query.value(rec.indexOf("email"))).toString()); + setEQ_Call((query.value(rec.indexOf("eq_call"))).toString()); + + data = (query.value(rec.indexOf("eqsl_qslrdate"))).toString(); + setEQSLQSLRDate(util->getDateTimeFromSQLiteString(data).date()); + + data = (query.value(rec.indexOf("eqsl_qslsdate"))).toString(); + setEQSLQSLSDate(util->getDateTimeFromSQLiteString(data).date()); + + setEQSLQSL_RCVD((query.value(rec.indexOf("eqsl_qsl_rcvd"))).toString()); + setEQSLQSL_SENT((query.value(rec.indexOf("eqsl_qsl_sent"))).toString()); + + setFists((query.value(rec.indexOf("fists"))).toInt()); + setFistsCC((query.value(rec.indexOf("fists_cc"))).toInt()); + setForceInit(util->QStringToBool((query.value(rec.indexOf("force_init"))).toString())); + + setFreq((query.value(rec.indexOf("freq_tx"))).toDouble()); + setFreqRX((query.value(rec.indexOf("freq_rx"))).toDouble()); + setGridSquare((query.value(rec.indexOf("gridsquare"))).toString()); + + data = (query.value(rec.indexOf("hrdlog_qso_upload_date"))).toString(); + setHRDUpdateDate(util->getDateTimeFromSQLiteString(data).date()); + setHRDLogStatus((query.value(rec.indexOf("hrdlog_qso_upload_status"))).toString()); + + setIOTA((query.value(rec.indexOf("iota"))).toString()); + setIotaID((query.value(rec.indexOf("iota_island_id"))).toInt()); + setK_Index((query.value(rec.indexOf("k_index"))).toInt()); + + setLatitude((query.value(rec.indexOf("lat"))).toString()); + setLongitude((query.value(rec.indexOf("lon"))).toString()); + + data = (query.value(rec.indexOf("lotw_qslrdate"))).toString(); + setLoTWQSLRDate(util->getDateTimeFromSQLiteString(data).date()); + data = (query.value(rec.indexOf("lotw_qslsdate"))).toString(); + setLoTWQSLSDate(util->getDateTimeFromSQLiteString(data).date()); + + setLoTWQSL_RCVD((query.value(rec.indexOf("lotw_qsl_rcvd"))).toString()); + setLoTWQSL_SENT((query.value(rec.indexOf("lotw_qsl_sent"))).toString()); + + setMaxBursts((query.value(rec.indexOf("max_bursts"))).toInt()); + setMsShower((query.value(rec.indexOf("ms_shower"))).toString()); + setMyCity((query.value(rec.indexOf("my_city"))).toString()); + setMyCounty((query.value(rec.indexOf("my_cnty"))).toString()); + setMyCountry((query.value(rec.indexOf("my_country"))).toString()); + setMyCQZone((query.value(rec.indexOf("my_cq_zone"))).toInt()); + setMyITUZone((query.value(rec.indexOf("my_itu_zone"))).toInt()); + setMyDXCC((query.value(rec.indexOf("my_dxcc"))).toInt()); + setMyFists((query.value(rec.indexOf("my_fists"))).toInt()); + setMyGridSquare((query.value(rec.indexOf("my_gridsquare"))).toString()); + setMyIOTA((query.value(rec.indexOf("my_iota"))).toString()); + + setMyLatitude((query.value(rec.indexOf("my_lat"))).toString()); + setMyLongitude((query.value(rec.indexOf("my_lon"))).toString()); + + setMyName((query.value(rec.indexOf("my_name"))).toString()); + setMyPostalCode((query.value(rec.indexOf("my_postal_code"))).toString()); + setMyRig((query.value(rec.indexOf("my_rig"))).toString()); + setMySig((query.value(rec.indexOf("my_sig"))).toString()); + setMySigInfo((query.value(rec.indexOf("my_sig_info"))).toString()); + setMySOTA_REF((query.value(rec.indexOf("my_sota_ref"))).toString()); + setMyState((query.value(rec.indexOf("my_state"))).toString()); + setMyStreet((query.value(rec.indexOf("my_street"))).toString()); + setMyUsacaCounties((query.value(rec.indexOf("my_usaca_counties"))).toString()); + setMyVUCCGrids((query.value(rec.indexOf("my_vucc_grids"))).toString()); + + setName((query.value(rec.indexOf("name"))).toString()); + setNotes((query.value(rec.indexOf("notes"))).toString()); + + setNrBursts((query.value(rec.indexOf("nr_bursts"))).toInt()); + setNrPings((query.value(rec.indexOf("nr_pings"))).toInt()); + setOperatorCallsign((query.value(rec.indexOf("operator"))).toString()); + setOwnerCallsign((query.value(rec.indexOf("owner_callsign"))).toString()); + setPrefix((query.value(rec.indexOf("pfx"))).toString()); + setPrecedence((query.value(rec.indexOf("precedence"))).toString()); + setPropMode((query.value(rec.indexOf("prop_mode"))).toString()); + setPublicKey((query.value(rec.indexOf("public_key"))).toString()); + + data = (query.value(rec.indexOf("qrzcom_qso_upload_date"))).toString(); + setQRZCOMDate(util->getDateTimeFromSQLiteString(data).date()); + setQRZCOMStatus((query.value(rec.indexOf("qrzcom_qso_upload_status"))).toString()); + + setQSLMsg((query.value(rec.indexOf("qslmsg"))).toString()); + data = (query.value(rec.indexOf("qslrdate"))).toString(); + setQSLRDate(util->getDateTimeFromSQLiteString(data).date()); + data = (query.value(rec.indexOf("qslsdate"))).toString(); + setQSLSDate(util->getDateTimeFromSQLiteString(data).date()); + + setQSL_RCVD((query.value(rec.indexOf("qsl_rcvd"))).toString()); + setQSL_SENT((query.value(rec.indexOf("qsl_sent"))).toString()); + setQSLRecVia((query.value(rec.indexOf("qsl_rcvd_via"))).toString()); + setQSLSenVia((query.value(rec.indexOf("qsl_sent_via"))).toString()); + + setQSLVia((query.value(rec.indexOf("qsl_via"))).toString()); + setQSOComplete((query.value(rec.indexOf("qso_complete"))).toString()); + setQSORandom(util->QStringToBool((query.value(rec.indexOf("qso_random"))).toString())); + + setQTH((query.value(rec.indexOf("qth"))).toString()); + setRegion((query.value(rec.indexOf("region"))).toString()); + setRig((query.value(rec.indexOf("rig"))).toString()); + setRXPwr((query.value(rec.indexOf("rig"))).toDouble()); + + setSatName((query.value(rec.indexOf("sat_name"))).toString()); + setSatMode((query.value(rec.indexOf("sat_mode"))).toString()); + + setSFI((query.value(rec.indexOf("sfi"))).toInt()); + setSig((query.value(rec.indexOf("sig"))).toString()); + setSigInfo((query.value(rec.indexOf("sig_info"))).toString()); + + setSilentKey(util->QStringToBool((query.value(rec.indexOf("silent_key"))).toString())); + setSkcc((query.value(rec.indexOf("skcc"))).toString()); + + setSOTA_REF((query.value(rec.indexOf("sota_ref"))).toString()); + setSrxString((query.value(rec.indexOf("srx_string"))).toString()); + setSrx((query.value(rec.indexOf("srx"))).toInt()); + setStxString((query.value(rec.indexOf("stx_string"))).toString()); + setStx((query.value(rec.indexOf("stx"))).toInt()); + + setState((query.value(rec.indexOf("state"))).toString()); + setStationCallsign((query.value(rec.indexOf("station_callsign"))).toString()); + + setSwl(util->QStringToBool((query.value(rec.indexOf("swl"))).toString())); + setUksmg((query.value(rec.indexOf("uksmg"))).toString()); + setUsacaCounties((query.value(rec.indexOf("usaca_counties"))).toString()); + setVeProv((query.value(rec.indexOf("ve_prov"))).toString()); + setVUCCGrids((query.value(rec.indexOf("vucc_grids"))).toString()); + setTenTen((query.value(rec.indexOf("ten_ten"))).toInt()); + setTXPwr((query.value(rec.indexOf("tx_pwr"))).toDouble()); + + setWeb((query.value(rec.indexOf("web"))).toString()); + data = (query.value(rec.indexOf("qso_date_off"))).toString(); + setDateOff(util->getDateTimeFromSQLiteString(data).date()); + setLogId((query.value(rec.indexOf("lognumber"))).toInt()); + + logEvent (Q_FUNC_INFO, "END", Debug); + return false; +} diff --git a/src/qso.h b/src/qso.h index ac46a192..c1d6d1b9 100644 --- a/src/qso.h +++ b/src/qso.h @@ -124,11 +124,13 @@ class QSO : public QObject bool setQSLMsg(const QString &_qs); QString getQSLMsg(); - // eQSL tab - bool setClubLogStatus(const QString &_c); + bool setClubLogStatus(const QString &_c); QString getClubLogStatus(); + bool setClubLogDate(const QDate &_c); + bool setClubLogDate(const QString& data); + QDate getClubLogDate(); bool setEQSLQSL_RCVD(const QString &_c); @@ -224,8 +226,6 @@ class QSO : public QObject QString getCheck(); bool setClass(const QString &_c); QString getClass(); - bool setClublogQSOUpdateDate(const QDate &_c); - QDate getClublogQSOUpdateDate(); bool setContinent(const QString &_c); QString getContinent(); bool setDistance(const double _i); @@ -380,6 +380,7 @@ class QSO : public QObject bool setMyWwffRef(const QString &_c); QString getMyWwffRef(); int toDB(int _qsoId = 0); + bool fromDB(int _qsoId); //bool add(); //bool modify(const int _qsoId); bool isComplete(); @@ -398,7 +399,9 @@ class QSO : public QObject QString getModifyQueryString(); QSqlQuery getPreparedQuery(const QString &_s); int getBandIdFromBandName(bool _rxBand=false); // if rxBand = true, it will chec the bandRX - int getModeIdFromModeName(); + QString getBandNameFromBandId(int bandId); + int getModeIdFromModeName(); // It really returns submode + QString getModeNameFromModeId(int _modeId, bool _submode=true); void setBandFromFreq(const double _fr, bool TX = true); DataBase *db; @@ -421,7 +424,7 @@ class QSO : public QObject QDateTime qso_dateTime; QDate QSLRDate, QSLSDate, QSLLoTWRDate, QSLLoTWSDate, qso_date_off; - QDate eQSLRDate, eQSLSDate, clublogDate,clublogQSOUpdateDate, hrdlogUploadDate; + QDate eQSLRDate, eQSLSDate, clublogQSOUpdateDate, hrdlogUploadDate; QDate QRZComDate; bool backup, lotwUpdating, realTime, manualMode, silent_key; @@ -469,7 +472,6 @@ class QSO : public QObject bool setRXPwr(const QString& data); bool setTXPwr(const QString& data); - bool setClublogQSOUpdateDate(const QString& data); bool setEQSLQSLRDate(const QString& data); bool setEQSLQSLSDate(const QString& data); bool setForceInit(const QString& data); diff --git a/tests/tst_qso/tst_qso.cpp b/tests/tst_qso/tst_qso.cpp index 86e15987..73779b57 100644 --- a/tests/tst_qso/tst_qso.cpp +++ b/tests/tst_qso/tst_qso.cpp @@ -283,8 +283,8 @@ void tst_QSO::test_AdifCreation() QString getCheck(); bool setClass(const QString &_c); QString getClass(); - bool setClublogQSOUpdateDate(const QDate &_c); - QDate getClublogQSOUpdateDate(); + bool setClubLogDate(const QDate &_c); + QDate getClubLogDate(); bool setContinent(const QString &_c); QString getContinent(); bool setDistance(const double _i);