From 598b65437ee30f2af4f84eb40b3500e3c9e75ea5 Mon Sep 17 00:00:00 2001 From: d Date: Sun, 3 Mar 2024 19:43:09 +0100 Subject: [PATCH 01/13] Qt6 migration begining --- .gitignore | 2 +- src/TODO | 47 ++++++++++++++++++++++++++++++++++++++-- src/database.cpp | 4 ++-- src/dataproxy_sqlite.cpp | 8 +++---- src/elogqrzlog.cpp | 2 +- src/locator.cpp | 14 ++++++------ src/src.pro | 3 +++ src/utilities.cpp | 19 +++++++++++----- src/world.cpp | 13 ++++++++--- src/world.h | 2 +- 10 files changed, 87 insertions(+), 27 deletions(-) diff --git a/.gitignore b/.gitignore index 7f9eac4f..5083e7b9 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,7 @@ src/object_* .DS_Store KLog.app *.qm - +.qtc_clangd *.autosave *.sh~ *.dmg diff --git a/src/TODO b/src/TODO index 9ad9031b..8b2f103c 100644 --- a/src/TODO +++ b/src/TODO @@ -1,3 +1,46 @@ +/*========== START Qt6 migration: +** +int DataProxy_SQLite::lotwUpdateQSLReception +I had to comment out: //else if (query.lastError().nativeErrorCode() == -1) + +** +bool DataBase::updateAwardDXCCTable() +nativeErrorCode seems to be a QChar now, I added the toInt +if ((query.lastError().nativeErrorCode()).toInt() == 19) + +** +bool DataBase::updateAwardWAZTable() +if (query.lastError().nativeErrorCode().toInt() == 19) + +** +Test locator.cpp +I had to change some code to make it compile. +QChar(QChar('0').unicode() + k); + +** +int Utilities::getNormalizedDXCCValue(const int _dxcc) +I had to replace rightRef by right + +** +bool Utilities::isValidEmail(const QString &_s) +QRegExp has been deprecated to QRegularExpresion. Check if it works well. + +** +void DataBase::compress() +qsqldatabase::exec is deprecated + +** +QList FileManager::adifLogExportReturnList(const QString& _fileName, const QString &_callsign, const QString &_grid, const QDate &_startDate, const QDate &_endDate, const int _logN, const ExportMode _em) +QSqlQuery is deprecated +writeQuery(query, out, _em, false, false, _logN); // JustMarked = false, onlyRequested = false + +** +** +**void eLogQrzLog::parseXMLAnswer(QXmlStreamReader &xml) +{ // Next line was commented out as it returns q QStringView instead of a QString + //showDebugLog (Q_FUNC_INFO, QString("Start: " + xml.text())); + +=============== END of Qt6 migratio BUG: KLog needs to update the Entity DB is shown on every start KLog should update ALWAYS when receiving from LoTW the QSL_LOTW_rcvd or add the QSO if not in local log. @@ -306,7 +349,7 @@ Mode U Mode U/V -> B -TODO: Code a way to sort the bands/modes in the "setuppagebandsmodes.cpp +TODO: Code a way to sort the bands/modes in the setuppagebandsmodes.cpp TODO: Create an "updateKLog" class to manage all the release updates so there is a way to detect the version of KLog and upgrade the DB to the latest. @@ -415,4 +458,4 @@ DONE: TODO: DXCluster: Connect, disconnect and connect again does not work DONE: TODO: Add a field in Mainwindow to manage RX_PWR DONE: TODO: slotclearbuttons->Colors to default DONE: GUI: Add in the input box a combobox to change the DXCC - +*/ diff --git a/src/database.cpp b/src/database.cpp index 1763f646..6ba4f66e 100644 --- a/src/database.cpp +++ b/src/database.cpp @@ -6613,7 +6613,7 @@ bool DataBase::updateAwardDXCCTable() if (!sqlOK) { //qDebug() << "DataBase::updateAwardDXCCTable: Error: " << QString::number(query.lastError().nativeErrorCode()) ; - if (query.lastError().nativeErrorCode() == 19) + if ((query.lastError().nativeErrorCode()).toInt() == 19) { // DUPLICATED RECORD: Means that there is already a record in the award... so this set is worked. QSL can be Y or N in the award but inthe log may be other options // We should only take into account if N or Y if (dxccStatusList.at(j).status!="1") @@ -6843,7 +6843,7 @@ bool DataBase::updateAwardWAZTable() if (!sqlOK) { //qDebug() << "DataBase::updateAwardWAZTable: Error: " << QString::number(query.lastError().nativeErrorCode()) ; - if (query.lastError().nativeErrorCode() == 19) + if (query.lastError().nativeErrorCode().toInt() == 19) { // DUPLICATED RECORD: Means that there is already a record in the award... so this set is worked. QSL can be Y or N in the award but inthe log may be other options // We should only take into account if N or Y if (dxccStatusList.at(j).status!="1") diff --git a/src/dataproxy_sqlite.cpp b/src/dataproxy_sqlite.cpp index c4fddd40..c33824e4 100644 --- a/src/dataproxy_sqlite.cpp +++ b/src/dataproxy_sqlite.cpp @@ -3532,11 +3532,11 @@ int DataProxy_SQLite::lotwUpdateQSLReception (const QString &_call, const QDateT return -5; } } - else if (query.lastError().nativeErrorCode() == -1) - { + //else if (query.lastError().nativeErrorCode() == -1) + //{ //qDebug() << "DataProxy_SQLite::lotwUpdateQSLReception QSO not found " << query.lastQuery(); - return -1; - } + // return -1; + //} else { //qDebug() << "DataProxy_SQLite::lotwUpdateQSLReception Unknown error " << query.lastQuery(); diff --git a/src/elogqrzlog.cpp b/src/elogqrzlog.cpp index d96bbed6..419c4162 100644 --- a/src/elogqrzlog.cpp +++ b/src/elogqrzlog.cpp @@ -163,7 +163,7 @@ void eLogQrzLog::slotManagerLogFinished(QNetworkReply *data) void eLogQrzLog::parseXMLAnswer(QXmlStreamReader &xml) { //qDebug() << Q_FUNC_INFO << xml.text(); - showDebugLog (Q_FUNC_INFO, "Start: " + xml.text()); + //showDebugLog (Q_FUNC_INFO, QString("Start: " + xml.text())); QString tdata = QString(); while (!xml.atEnd()) diff --git a/src/locator.cpp b/src/locator.cpp index 38b7233d..5b2b10c1 100644 --- a/src/locator.cpp +++ b/src/locator.cpp @@ -453,10 +453,10 @@ QStringList Locator::getAll(int _length) QChar letter1, letter2, letter3, letter4, num1, num2; for (int i = 0; i<18; i++) { - letter1 = 'A' + i; + letter1 = QChar(QChar('A').unicode() + i); for (int j = 0; j<18; j++) { - letter2 = 'A' + j; + letter2 = QChar(QChar('A').unicode() + j); if (_length<=2) { locator.append(letter1); @@ -469,10 +469,11 @@ QStringList Locator::getAll(int _length) { for (int k = 0; k<10; k++) { - num1 = '0' + k; + num1 = QChar(QChar('0').unicode() + k); + for (int l = 0; l<10; l++) { - num2 = '0' + l; + num2 = QChar(QChar('0').unicode() + l); if (_length<=4) { locator.append(letter1); @@ -487,10 +488,10 @@ QStringList Locator::getAll(int _length) { for (int m = 0; m<24; m++) { - letter3 = 'a' + m; + letter3 = QChar(QChar('a').unicode() + m); for (int n = 0; n<24; n++) { - letter4 = 'a' + n; + letter4 = QChar(QChar('a').unicode() + n); if (_length<=6) { locator.append(letter1); @@ -507,7 +508,6 @@ QStringList Locator::getAll(int _length) } } } - } } } diff --git a/src/src.pro b/src/src.pro index 5970515d..20b561ad 100644 --- a/src/src.pro +++ b/src/src.pro @@ -41,6 +41,7 @@ DEFINES += APP_NAME="$$APP_NAME" APP_UNIX_NAME = klog DEFINES += APP_UNIX_NAME="$$APP_UNIX_NAME" + message(Building $${APP_NAME} $${VERSION}) message(Qt $$[QT_VERSION] in $$[QT_INSTALL_PREFIX]) @@ -66,6 +67,8 @@ greaterThan(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 4) macx:QMAKE_LFLAGS += -Wl,-rpath,@executable_path/../Frameworks } +DEFINES += QT_DISABLE_DEPRECATED_UP_TO=0x050F00 + HEADERS += setupdialog.h \ aboutdialog.h \ adif.h \ diff --git a/src/utilities.cpp b/src/utilities.cpp index 05d79a14..8a2ecddd 100644 --- a/src/utilities.cpp +++ b/src/utilities.cpp @@ -652,7 +652,7 @@ int Utilities::getNormalizedDXCCValue(const int _dxcc) { if (_dxcc >1000) { - return ((QString::number(_dxcc)).rightRef(3)).toInt(); + return ((QString::number(_dxcc)).right(3)).toInt(); } else { @@ -2199,11 +2199,18 @@ bool Utilities::isValidPropMode(const QString &_s) bool Utilities::isValidEmail(const QString &_s) { - QRegExp mailREX("\\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}\\b"); - mailREX.setCaseSensitivity(Qt::CaseInsensitive); - mailREX.setPatternSyntax(QRegExp::RegExp); - return mailREX.exactMatch(_s); - //return ((_s.contains("@")) && (_s.contains("."))); + //QRegExp mailREX("\\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}\\b"); + QRegularExpression mailREX("\\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}\\b"); + mailREX.setPatternOptions(QRegularExpression::CaseInsensitiveOption); + + //mailREX.setCaseSensitivity(Qt::CaseInsensitive); + //mailREX.setPatternSyntax(QRegExp::RegExp) + + // match two digits followed by a space and a word + + QRegularExpressionMatch match = mailREX.match(_s); + return match.hasMatch(); // true + //return mailREX.exactMatch(_s); } diff --git a/src/world.cpp b/src/world.cpp index 6db5f186..0f81b264 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -341,13 +341,17 @@ QStringList World::readZones (const QString &pref, const int _cq, const int _itu QStringList result; int cq = _cq; int itu = _itu; - QString azone; + QString azone; // Special zones start with a [ QString aux = pref; if(aux.count('[')==1) // Check if has special CQz { //qDebug() << "World::readZones DETECTED [ !!!!"; - azone = (aux.midRef(aux.indexOf('[')+1)).toString(); + qsizetype pos = aux.indexOf('['); + azone = aux.sliced(pos, 1); + //Following line was migrated from qt5 + //azone = (aux.midRef(aux.indexOf('[')+1)).toString(); + //qDebug() << "World::readZones (ITU)-1: " << aux << " right of " << QString::number(aux.indexOf('[')) << " = " << azone; itu = (azone.left(azone.indexOf(']'))).toInt(); @@ -359,7 +363,10 @@ QStringList World::readZones (const QString &pref, const int _cq, const int _itu if(aux.count('(')==1) // Check if has special CQz { //qDebug() << "World::readZones DETECTED ( !!!!"; - azone = (aux.midRef(aux.indexOf('(')+1)).toString(); + qsizetype pos = aux.indexOf('['); + azone = aux.sliced(pos, 1); + //Following line was migrated from qt5 + //azone = (aux.midRef(aux.indexOf('(')+1)).toString(); cq = (azone.left(azone.indexOf(')'))).toInt(); aux = aux.left(aux.indexOf('(')); //qDebug() << "World::readZones (CQ): " << pref << "/" << QString::number(cq) << "/" << aux; diff --git a/src/world.h b/src/world.h index ea5bcb84..eded8eee 100644 --- a/src/world.h +++ b/src/world.h @@ -45,7 +45,7 @@ //#include "awards.h" -class QStringList; +//class QStringList; enum { From d3e3547af42b77d391345072cf8fbf41b5bc16df Mon Sep 17 00:00:00 2001 From: d Date: Sun, 3 Mar 2024 19:47:32 +0100 Subject: [PATCH 02/13] KLog compile with qt6 --- src/TODO | 5 ++++- src/elogqrzlog.cpp | 2 +- src/src.pro | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/TODO b/src/TODO index 8b2f103c..ede0f51e 100644 --- a/src/TODO +++ b/src/TODO @@ -40,7 +40,10 @@ writeQuery(query, out, _em, false, false, _logN); // JustMarked = false, onlyReq { // Next line was commented out as it returns q QStringView instead of a QString //showDebugLog (Q_FUNC_INFO, QString("Start: " + xml.text())); -=============== END of Qt6 migratio +=============== END of Qt6 migration + + + BUG: KLog needs to update the Entity DB is shown on every start KLog should update ALWAYS when receiving from LoTW the QSL_LOTW_rcvd or add the QSO if not in local log. diff --git a/src/elogqrzlog.cpp b/src/elogqrzlog.cpp index 419c4162..89e77efb 100644 --- a/src/elogqrzlog.cpp +++ b/src/elogqrzlog.cpp @@ -163,7 +163,7 @@ void eLogQrzLog::slotManagerLogFinished(QNetworkReply *data) void eLogQrzLog::parseXMLAnswer(QXmlStreamReader &xml) { //qDebug() << Q_FUNC_INFO << xml.text(); - //showDebugLog (Q_FUNC_INFO, QString("Start: " + xml.text())); + showDebugLog (Q_FUNC_INFO, QString("Start: ").append(xml.text())); QString tdata = QString(); while (!xml.atEnd()) diff --git a/src/src.pro b/src/src.pro index 20b561ad..b8c6ba4f 100644 --- a/src/src.pro +++ b/src/src.pro @@ -30,8 +30,8 @@ CONFIG -=depend_includepath #CONFIG += release TEMPLATE = app -PKGVERSION = 2.3.4 -VERSION = 2.3.4 +PKGVERSION = 2.4.0 +VERSION = 2.4.0 DEFINES += APP_VERSION=\\\"$$VERSION\\\" From c4e4a08963d3b27333793c0bb168c78a238ca9cb Mon Sep 17 00:00:00 2001 From: d Date: Sun, 3 Mar 2024 21:08:01 +0100 Subject: [PATCH 03/13] qComboBox signals updated --- src/TODO | 10 ++++++++++ src/charts/statsfieldperbandwidget.cpp | 2 +- src/inputwidgets/mainwindowmydatatab.cpp | 2 +- src/main.cpp | 13 ++++++++----- src/mainqsoentrywidget.cpp | 4 ++-- src/setuppages/setuppagehamlib.cpp | 2 +- src/widgets/map/mapwindowwidget.cpp | 8 ++++---- src/widgets/showkloglogwidget.cpp | 3 ++- 8 files changed, 29 insertions(+), 15 deletions(-) diff --git a/src/TODO b/src/TODO index ede0f51e..57385149 100644 --- a/src/TODO +++ b/src/TODO @@ -40,6 +40,16 @@ writeQuery(query, out, _em, false, false, _logN); // JustMarked = false, onlyReq { // Next line was commented out as it returns q QStringView instead of a QString //showDebugLog (Q_FUNC_INFO, QString("Start: " + xml.text())); +** +void ShowKLogLogWidget::createUI() +void StatsFieldPerBandWidget::createUI() +void SetupPageHamLib::createUI() +void MainWindowMyDataTab::createUI() (myUserADIFComboBox) +void MainQSOEntryWidget::createUI() (bandComboBox, modeComboBox) +void MapWindowWidget::createUI() (bandComboBox, modeComboBox, propComboBox, satNameComboBox) + + Test the combobox as currentIndexChanged was modified to currentTextChanged + =============== END of Qt6 migration diff --git a/src/charts/statsfieldperbandwidget.cpp b/src/charts/statsfieldperbandwidget.cpp index 5bdb8884..03b7e82c 100644 --- a/src/charts/statsfieldperbandwidget.cpp +++ b/src/charts/statsfieldperbandwidget.cpp @@ -76,7 +76,7 @@ void StatsFieldPerBandWidget::createUI() layout->addWidget(tableWidget); setLayout(layout); - connect(modeComboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(slotModeComboBoxChanged() ) ) ; + connect(modeComboBox, SIGNAL(currentTextChanged(QString)), this, SLOT(slotModeComboBoxChanged() ) ) ; } diff --git a/src/inputwidgets/mainwindowmydatatab.cpp b/src/inputwidgets/mainwindowmydatatab.cpp index 768ae41d..33a33d4a 100644 --- a/src/inputwidgets/mainwindowmydatatab.cpp +++ b/src/inputwidgets/mainwindowmydatatab.cpp @@ -121,7 +121,7 @@ void MainWindowMyDataTab::createUI() connect(operatorLineEdit, SIGNAL(textChanged(QString)), this, SLOT(slotOperatorTextChanged()) ); connect(stationCallSignLineEdit, SIGNAL(returnPressed()), this, SLOT(slotReturnPressed() ) ); connect(stationCallSignLineEdit, SIGNAL(textChanged(QString)), this, SLOT(slotStationCallSignTextChanged() ) ); - connect(myUserADIFComboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(slotMyUserADIFComboBoxChanged() ) ) ; + connect(myUserADIFComboBox, SIGNAL(currentTextChanged(QString)), this, SLOT(slotMyUserADIFComboBoxChanged() ) ) ; connect(myUserADIFLineEdit, SIGNAL(textChanged(QString)), this, SLOT(slotSetCurrentMyUSerData() ) ); logEvent (Q_FUNC_INFO, "END", Debug); diff --git a/src/main.cpp b/src/main.cpp index afe8b58f..909f24d3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -26,7 +26,7 @@ #include //#include #include -#include +//#include #include #include #include @@ -92,8 +92,10 @@ int main(int argc, char *argv[]) //qDebug() << Q_FUNC_INFO << " - Detected language: " << (QLocale::system().name()).left(2) << ".qm"; // Translations begin QTranslator qtTranslator; - qtTranslator.load("qt_" + QLocale::system().name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath)); /* Flawfinder: ignore */ - app.installTranslator(&qtTranslator); + bool translatorLoad = qtTranslator.load("qt_" + QLocale::system().name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath)); /* Flawfinder: ignore */ + if (translatorLoad) + app.installTranslator(&qtTranslator); + QTranslator myappTranslator; bool missingTranslation = false; @@ -121,10 +123,11 @@ int main(int argc, char *argv[]) //qDebug() << Q_FUNC_INFO << " - -20 - end WIN "; #elif defined(Q_OS_OSX) //qDebug() << Q_FUNC_INFO << " - OSX "; - if (QFile::exists(QCoreApplication::applicationDirPath() + "/translations/klog_" + (QLocale::system().name()).left(2) + ".qm") ) /* Flawfinder: ignore */ { - myappTranslator.load(QCoreApplication::applicationDirPath() + "/translations/klog_" + (QLocale::system().name()).left(2) + ".qm"); /* Flawfinder: ignore */ + translatorLoad = myappTranslator.load(QCoreApplication::applicationDirPath() + "/translations/klog_" + (QLocale::system().name()).left(2) + ".qm"); /* Flawfinder: ignore */ + if (!translatorLoad) + missingTranslation = true; } else if (((QLocale::system().name()).left(2)) == "en") /* Flawfinder: ignore */ { // If language is English, it will execute without showing message diff --git a/src/mainqsoentrywidget.cpp b/src/mainqsoentrywidget.cpp index 7f7bd5b5..4c9887d8 100644 --- a/src/mainqsoentrywidget.cpp +++ b/src/mainqsoentrywidget.cpp @@ -141,8 +141,8 @@ void MainQSOEntryWidget::createUI() connect(qrzLineEdit, SIGNAL(textChanged(QString)), this, SLOT(slotStartDelayInputTimer() ) ); connect(delayInputTimer, SIGNAL(timeout()), this, SLOT(slotDelayInputTimedOut() ) ); - connect(bandComboBox, SIGNAL(currentIndexChanged (QString)), this, SLOT(slotBandComboBoxChanged(QString) ) ) ; - connect(modeComboBox, SIGNAL(currentIndexChanged (QString)), this, SLOT(slotModeComboBoxChanged(QString) ) ) ; + connect(bandComboBox, SIGNAL(currentTextChanged (QString)), this, SLOT(slotBandComboBoxChanged(QString) ) ) ; + connect(modeComboBox, SIGNAL(currentTextChanged (QString)), this, SLOT(slotModeComboBoxChanged(QString) ) ) ; connect(OKButton, SIGNAL(clicked()), this, SLOT(slotOKButtonClicked())); connect(clearButton, SIGNAL(clicked()), this, SLOT(slotClearButtonClicked())); diff --git a/src/setuppages/setuppagehamlib.cpp b/src/setuppages/setuppagehamlib.cpp index 3edc5b14..e495e470 100644 --- a/src/setuppages/setuppagehamlib.cpp +++ b/src/setuppages/setuppagehamlib.cpp @@ -224,7 +224,7 @@ void SetupPageHamLib::createUI() connect(testHamlibPushButton, SIGNAL(clicked(bool)), this, SLOT(slotTestHamlib()) ); - connect(rigTypeComboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(slotRadioComboBoxChanged(QString)) ); + connect(rigTypeComboBox, SIGNAL(currentTextChanged(QString)), this, SLOT(slotRadioComboBoxChanged(QString)) ); //qDebug << Q_FUNC_INFO << " - END"; } diff --git a/src/widgets/map/mapwindowwidget.cpp b/src/widgets/map/mapwindowwidget.cpp index 7739e103..4641f290 100644 --- a/src/widgets/map/mapwindowwidget.cpp +++ b/src/widgets/map/mapwindowwidget.cpp @@ -101,10 +101,10 @@ void MapWindowWidget::createUI() mapWidget->init(); //qDebug() << Q_FUNC_INFO << "4"; - connect(bandComboBox, SIGNAL(currentIndexChanged (QString)), this, SLOT(slotBandsComboBoxChanged())); - connect(modeComboBox, SIGNAL(currentIndexChanged (QString)), this, SLOT(slotModesComboBoxChanged())); - connect(propComboBox, SIGNAL(currentIndexChanged (QString)), this, SLOT(slotPropComboBoxChanged())); - connect(satNameComboBox, SIGNAL(currentIndexChanged (QString)), this, SLOT(slotSatsComboBoxChanged())); + connect(bandComboBox, SIGNAL(currentTextChanged (QString)), this, SLOT(slotBandsComboBoxChanged())); + connect(modeComboBox, SIGNAL(currentTextChanged (QString)), this, SLOT(slotModesComboBoxChanged())); + connect(propComboBox, SIGNAL(currentTextChanged (QString)), this, SLOT(slotPropComboBoxChanged())); + connect(satNameComboBox, SIGNAL(currentTextChanged (QString)), this, SLOT(slotSatsComboBoxChanged())); connect(confirmedCheckBox, SIGNAL(clicked()), this, SLOT(slotConfirmedCheckBoxChanged())); //connect(locatorsCheckBox, SIGNAL(clicked()), this, SLOT(slotLocatorsCheckBoxChanged())); diff --git a/src/widgets/showkloglogwidget.cpp b/src/widgets/showkloglogwidget.cpp index 91055bc0..e9f444eb 100644 --- a/src/widgets/showkloglogwidget.cpp +++ b/src/widgets/showkloglogwidget.cpp @@ -44,6 +44,7 @@ ShowKLogLogWidget::~ShowKLogLogWidget() { delete(util); } + void ShowKLogLogWidget::createUI() { levelComboBox->clear(); @@ -55,7 +56,7 @@ void ShowKLogLogWidget::createUI() layout->addWidget(logsView); setLayout(layout); - connect(levelComboBox, SIGNAL(currentIndexChanged (QString)), this, SLOT(slotLevelComboBoxChanged(QString) ) ) ; + connect(levelComboBox, SIGNAL(currentTextChanged (QString)), this, SLOT(slotLevelComboBoxChanged(QString) ) ) ; } From 5ca14919b32ee221792eead87e666a0682cce31e Mon Sep 17 00:00:00 2001 From: d Date: Sun, 3 Mar 2024 22:18:11 +0100 Subject: [PATCH 04/13] Qt6 migration checks and fixes --- src/TODO | 23 ----------------------- src/locator.cpp | 18 ++++++++++++------ src/main.cpp | 2 +- src/mainwindow.cpp | 2 ++ src/utilities.cpp | 4 +++- src/widgets/map/mapwindowwidget.cpp | 2 +- 6 files changed, 19 insertions(+), 32 deletions(-) diff --git a/src/TODO b/src/TODO index 57385149..56938950 100644 --- a/src/TODO +++ b/src/TODO @@ -12,19 +12,6 @@ if ((query.lastError().nativeErrorCode()).toInt() == 19) bool DataBase::updateAwardWAZTable() if (query.lastError().nativeErrorCode().toInt() == 19) -** -Test locator.cpp -I had to change some code to make it compile. -QChar(QChar('0').unicode() + k); - -** -int Utilities::getNormalizedDXCCValue(const int _dxcc) -I had to replace rightRef by right - -** -bool Utilities::isValidEmail(const QString &_s) -QRegExp has been deprecated to QRegularExpresion. Check if it works well. - ** void DataBase::compress() qsqldatabase::exec is deprecated @@ -40,16 +27,6 @@ writeQuery(query, out, _em, false, false, _logN); // JustMarked = false, onlyReq { // Next line was commented out as it returns q QStringView instead of a QString //showDebugLog (Q_FUNC_INFO, QString("Start: " + xml.text())); -** -void ShowKLogLogWidget::createUI() -void StatsFieldPerBandWidget::createUI() -void SetupPageHamLib::createUI() -void MainWindowMyDataTab::createUI() (myUserADIFComboBox) -void MainQSOEntryWidget::createUI() (bandComboBox, modeComboBox) -void MapWindowWidget::createUI() (bandComboBox, modeComboBox, propComboBox, satNameComboBox) - - Test the combobox as currentIndexChanged was modified to currentTextChanged - =============== END of Qt6 migration diff --git a/src/locator.cpp b/src/locator.cpp index 5b2b10c1..c6b2fe8c 100644 --- a/src/locator.cpp +++ b/src/locator.cpp @@ -453,10 +453,12 @@ QStringList Locator::getAll(int _length) QChar letter1, letter2, letter3, letter4, num1, num2; for (int i = 0; i<18; i++) { - letter1 = QChar(QChar('A').unicode() + i); + letter1 = QChar('A' + i); + //qDebug() << Q_FUNC_INFO << ": L1: " << letter1; for (int j = 0; j<18; j++) { - letter2 = QChar(QChar('A').unicode() + j); + letter2 = QChar('A'+ j); + //qDebug() << Q_FUNC_INFO << ": L2: " << letter2; if (_length<=2) { locator.append(letter1); @@ -469,11 +471,13 @@ QStringList Locator::getAll(int _length) { for (int k = 0; k<10; k++) { - num1 = QChar(QChar('0').unicode() + k); + num1 = QChar('0' + k); + //qDebug() << Q_FUNC_INFO << ": N1: " << num1; for (int l = 0; l<10; l++) { - num2 = QChar(QChar('0').unicode() + l); + num2 = QChar('0' + l); + //qDebug() << Q_FUNC_INFO << ": N2: " << num2; if (_length<=4) { locator.append(letter1); @@ -488,10 +492,12 @@ QStringList Locator::getAll(int _length) { for (int m = 0; m<24; m++) { - letter3 = QChar(QChar('a').unicode() + m); + //letter3 = QChar('a' + m); + //qDebug() << Q_FUNC_INFO << ": L3: " << letter3; for (int n = 0; n<24; n++) { - letter4 = QChar(QChar('a').unicode() + n); + letter4 = QChar('a' + n); + //qDebug() << Q_FUNC_INFO << ": L4: " << letter4; if (_length<=6) { locator.append(letter1); diff --git a/src/main.cpp b/src/main.cpp index 909f24d3..6e93c540 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -122,7 +122,7 @@ int main(int argc, char *argv[]) } //qDebug() << Q_FUNC_INFO << " - -20 - end WIN "; #elif defined(Q_OS_OSX) - //qDebug() << Q_FUNC_INFO << " - OSX "; + //qDebug() << Q_FUNC_INFO << " - OSX: " << QLocale::system().name(); if (QFile::exists(QCoreApplication::applicationDirPath() + "/translations/klog_" + (QLocale::system().name()).left(2) + ".qm") ) /* Flawfinder: ignore */ { translatorLoad = myappTranslator.load(QCoreApplication::applicationDirPath() + "/translations/klog_" + (QLocale::system().name()).left(2) + ".qm"); /* Flawfinder: ignore */ diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 492e655f..6a05483a 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1183,6 +1183,8 @@ bool MainWindow::readQSOFromUI() qso->setRSTRX (QSOTabWidget->getRSTRX ()); int dxcc = world->getQRZARRLId(tqrz); + //qDebug() << Q_FUNC_INFO + QString(": %1 - %2").arg(tqrz).arg(dxcc); + //int dxcc2 = getDXCCFromComboBox(); int dxcc2 = othersTabWidget->getEntity(); diff --git a/src/utilities.cpp b/src/utilities.cpp index 8a2ecddd..6a43f6b3 100644 --- a/src/utilities.cpp +++ b/src/utilities.cpp @@ -650,9 +650,11 @@ QString Utilities::getCTYFile() int Utilities::getNormalizedDXCCValue(const int _dxcc) { + //qDebug() << Q_FUNC_INFO << QString(": %1").arg(_dxcc); if (_dxcc >1000) { - return ((QString::number(_dxcc)).right(3)).toInt(); + //qDebug() << Q_FUNC_INFO << QString(": Special: %1 / Normalized: %2").arg(_dxcc).arg(((QString::number(_dxcc)).last(3)).toInt()); + return ((QString::number(_dxcc)).last(3)).toInt(); } else { diff --git a/src/widgets/map/mapwindowwidget.cpp b/src/widgets/map/mapwindowwidget.cpp index 4641f290..e1d673ba 100644 --- a/src/widgets/map/mapwindowwidget.cpp +++ b/src/widgets/map/mapwindowwidget.cpp @@ -267,7 +267,7 @@ void MapWindowWidget::showFiltered() void MapWindowWidget::slotBandsComboBoxChanged() { - //qDebug() << Q_FUNC_INFO << " - Start"; + //qDebug() << Q_FUNC_INFO << " - Start"; showFiltered(); bandComboBox->setFocus(); //qDebug() << Q_FUNC_INFO << " - END"; From 7648d6755e73ef3da7402dc7d1e8527e290c2e90 Mon Sep 17 00:00:00 2001 From: ea4k Date: Sun, 3 Mar 2024 22:36:01 +0100 Subject: [PATCH 05/13] Qt6 migration fixes in windows --- src/klogdefinitions.h | 2 +- src/main.cpp | 9 +++++++-- src/utilities.cpp | 1 + 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/klogdefinitions.h b/src/klogdefinitions.h index 4821b53c..21398104 100644 --- a/src/klogdefinitions.h +++ b/src/klogdefinitions.h @@ -28,7 +28,7 @@ #include -using namespace std; +//using namespace std; enum ExportMode {ModeLotW, ModeADIF, ModeClubLog, ModeEQSL, ModeQRZ}; enum OnLineProvider {ClubLog, LoTW, eQSL, QRZ}; //, HamQTH, HRDLog diff --git a/src/main.cpp b/src/main.cpp index 909f24d3..ed21917c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -104,13 +104,18 @@ int main(int argc, char *argv[]) #if defined(Q_OS_WIN) //qDebug() << Q_FUNC_INFO << " - WIN "; //qDebug() << Q_FUNC_INFO << " - 20 - WIN"; + if (QFile::exists(QCoreApplication::applicationDirPath() + "/translations/klog_" + (QLocale::system().name()).left(2) + ".qm") ) /* Flawfinder: ignore */ { - myappTranslator.load(QCoreApplication::applicationDirPath() + "/translations/klog_" + (QLocale::system().name()).left(2) + ".qm"); /* Flawfinder: ignore */ + translatorLoad = myappTranslator.load(QCoreApplication::applicationDirPath() + "/translations/klog_" + (QLocale::system().name()).left(2) + ".qm"); /* Flawfinder: ignore */ + if (!translatorLoad) + missingTranslation = true; } else if (QFile::exists(QDir::homePath()+"/klog/klog_" + (QLocale::system().name()).left(2)+ ".qm") ) /* Flawfinder: ignore */ { - myappTranslator.load(QDir::homePath()+"/klog/klog_" + (QLocale::system().name())); /* Flawfinder: ignore */ + translatorLoad = myappTranslator.load(QDir::homePath()+"/klog/klog_" + (QLocale::system().name())); /* Flawfinder: ignore */ + if (!translatorLoad) + missingTranslation = true; } else if (((QLocale::system().name()).left(2)) == "en") /* Flawfinder: ignore */ { // If language is English, it will execute without showing message diff --git a/src/utilities.cpp b/src/utilities.cpp index 8a2ecddd..42866da7 100644 --- a/src/utilities.cpp +++ b/src/utilities.cpp @@ -2231,6 +2231,7 @@ void Utilities::openQrzcom(const QString _call) } void Utilities::printCommandHelp(){ + QTextStream cout(stdout); cout << "Usage: klog [OPTION]...\n"; cout << "Options:\n"; cout << " -? Display this help\n"; From c9f2c729620135d7fe27ce027156fa8ba72cb156 Mon Sep 17 00:00:00 2001 From: d Date: Sun, 3 Mar 2024 22:45:29 +0100 Subject: [PATCH 06/13] qt6 migration fixes --- src/TODO | 17 ++--------------- src/awards.cpp | 4 ++-- src/dataproxy_sqlite.cpp | 8 ++++---- src/filemanager.cpp | 4 +++- src/filemanager.h | 2 +- src/mainwindow.cpp | 10 +++++----- 6 files changed, 17 insertions(+), 28 deletions(-) diff --git a/src/TODO b/src/TODO index 56938950..30d62ef2 100644 --- a/src/TODO +++ b/src/TODO @@ -1,16 +1,4 @@ /*========== START Qt6 migration: -** -int DataProxy_SQLite::lotwUpdateQSLReception -I had to comment out: //else if (query.lastError().nativeErrorCode() == -1) - -** -bool DataBase::updateAwardDXCCTable() -nativeErrorCode seems to be a QChar now, I added the toInt -if ((query.lastError().nativeErrorCode()).toInt() == 19) - -** -bool DataBase::updateAwardWAZTable() -if (query.lastError().nativeErrorCode().toInt() == 19) ** void DataBase::compress() @@ -20,10 +8,9 @@ qsqldatabase::exec is deprecated QList FileManager::adifLogExportReturnList(const QString& _fileName, const QString &_callsign, const QString &_grid, const QDate &_startDate, const QDate &_endDate, const int _logN, const ExportMode _em) QSqlQuery is deprecated writeQuery(query, out, _em, false, false, _logN); // JustMarked = false, onlyRequested = false - -** +std::move(query); ** -**void eLogQrzLog::parseXMLAnswer(QXmlStreamReader &xml) +void eLogQrzLog::parseXMLAnswer(QXmlStreamReader &xml) { // Next line was commented out as it returns q QStringView instead of a QString //showDebugLog (Q_FUNC_INFO, QString("Start: " + xml.text())); diff --git a/src/awards.cpp b/src/awards.cpp index 3dc4ddf2..29e60c66 100644 --- a/src/awards.cpp +++ b/src/awards.cpp @@ -1183,11 +1183,11 @@ void Awards::recalculateAwards() Should go in a transaction */ - //qDebug() << "Awards::recalculateAwards"; + qDebug() << Q_FUNC_INFO; dataProxy->updateAwardDXCC(); emit awardDXCCUpdated(); dataProxy->updateAwardWAZ(); - //qDebug() << "Awards::recalculateAwards - END"; + qDebug() << Q_FUNC_INFO << " - END"; } int Awards::getQSOsInLog(const int _logNumber) diff --git a/src/dataproxy_sqlite.cpp b/src/dataproxy_sqlite.cpp index c33824e4..92b9b308 100644 --- a/src/dataproxy_sqlite.cpp +++ b/src/dataproxy_sqlite.cpp @@ -3532,11 +3532,11 @@ int DataProxy_SQLite::lotwUpdateQSLReception (const QString &_call, const QDateT return -5; } } - //else if (query.lastError().nativeErrorCode() == -1) - //{ + else if ((query.lastError().nativeErrorCode()).toInt() == -1) + { //qDebug() << "DataProxy_SQLite::lotwUpdateQSLReception QSO not found " << query.lastQuery(); - // return -1; - //} + return -1; + } else { //qDebug() << "DataProxy_SQLite::lotwUpdateQSLReception Unknown error " << query.lastQuery(); diff --git a/src/filemanager.cpp b/src/filemanager.cpp index 143adcd7..4edb922d 100644 --- a/src/filemanager.cpp +++ b/src/filemanager.cpp @@ -371,6 +371,8 @@ QList FileManager::adifLogExportReturnList(const QString& _fileName, const nameCol = rec.indexOf("id"); qsos.append((query.value(nameCol)).toInt()); writeQuery(query, out, _em, false, false, _logN); // JustMarked = false, onlyRequested = false + //Use std::move(query) instead of query? + // Copy queries is deprecated i++; //qDebug() << Q_FUNC_INFO << ": Start of isValid" ; @@ -4009,7 +4011,7 @@ void FileManager::writeADIFHeader(QTextStream &out, const ExportMode _em, const out << "\n"; } -void FileManager::writeQuery(QSqlQuery query, QTextStream &out, const ExportMode _em, const bool _justMarked, const bool _onlyRequested, const int _logN ) +void FileManager::writeQuery(QSqlQuery &query, QTextStream &out, const ExportMode _em, const bool _justMarked, const bool _onlyRequested, const int _logN ) { out << dataProxy->getADIFFromQSOQuery(query, _em, _justMarked, _onlyRequested, _logN); } diff --git a/src/filemanager.h b/src/filemanager.h index f4b40c35..52361a9d 100644 --- a/src/filemanager.h +++ b/src/filemanager.h @@ -122,7 +122,7 @@ class FileManager : public QWidget QStringList readAdifField (const QString &_field); // void writeAdifField(const QString &_field, const QString &_data); // It should possibly receive also the QTextStream - void writeQuery(QSqlQuery query, QTextStream &out, const ExportMode _em, const bool _justMarked, const bool _onlyRequested, const int _logN); + void writeQuery(QSqlQuery &query, QTextStream &out, const ExportMode _em, const bool _justMarked, const bool _onlyRequested, const int _logN); void writeADIFHeader(QTextStream &out, const ExportMode _em, const int _numberOfQsos); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 6a05483a..41a23570 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -5175,19 +5175,19 @@ void MainWindow::showDXMarathonNeeded(const int _dxcc, const int _cqz, const int void MainWindow::slotShowAwards() { //To be called from the logWindow & searchWidget - //qDebug() << "MainWindow::slotShowAwards" ; + qDebug() << Q_FUNC_INFO; logEvent(Q_FUNC_INFO, "Start", Debug); awards->recalculateAwards(); - //qDebug() << "MainWindow::slotShowAwards-1"; + qDebug() << Q_FUNC_INFO << " - 1"; //logWindow->refresh(); - //qDebug() << "MainWindow::slotShowAwards-2"; + qDebug() << Q_FUNC_INFO << " - 2"; awardsWidget->showAwards(); - //qDebug() << "MainWindow::slotShowAwards-3" ; + qDebug() << Q_FUNC_INFO << " - 3"; //dxccStatusWidget->refresh(); setMainWindowTitle(); logEvent(Q_FUNC_INFO, "END", Debug); - //qDebug() << "MainWindow::slotShowAwards-END" ; + qDebug() << Q_FUNC_INFO << " - END"; } void MainWindow::fillQSOData() From eeae4b01c9c4fdb0d727fc0408ae4421afc5a517 Mon Sep 17 00:00:00 2001 From: d Date: Tue, 5 Mar 2024 18:37:24 +0100 Subject: [PATCH 07/13] Qt6 migration fixes --- src/TODO | 9 +- src/awards.cpp | 20 +- src/database.cpp | 14 +- src/dataproxy_sqlite.cpp | 412 ++++++++++++++++-------- src/dataproxy_sqlite.h | 5 +- src/dxccstatuswidget.cpp | 2 +- src/dxcluster.cpp | 5 +- src/filemanager.cpp | 25 +- src/filemanager.h | 2 +- src/logwindow.cpp | 18 +- src/mainwindow.cpp | 27 +- src/setuppages/setupentitydialog.cpp | 2 +- src/world.cpp | 7 +- tests/tst_mainwindow/tst_mainwindow.cpp | 7 +- 14 files changed, 356 insertions(+), 199 deletions(-) diff --git a/src/TODO b/src/TODO index 30d62ef2..ac58e8c9 100644 --- a/src/TODO +++ b/src/TODO @@ -1,14 +1,13 @@ /*========== START Qt6 migration: +** +void tst_MainWindow::test_focusOrder() +Test: //QApplication::setActiveWindow(mainWindow); +I had to replace previews line. ** void DataBase::compress() qsqldatabase::exec is deprecated -** -QList FileManager::adifLogExportReturnList(const QString& _fileName, const QString &_callsign, const QString &_grid, const QDate &_startDate, const QDate &_endDate, const int _logN, const ExportMode _em) -QSqlQuery is deprecated -writeQuery(query, out, _em, false, false, _logN); // JustMarked = false, onlyRequested = false -std::move(query); ** void eLogQrzLog::parseXMLAnswer(QXmlStreamReader &xml) { // Next line was commented out as it returns q QStringView instead of a QString diff --git a/src/awards.cpp b/src/awards.cpp index 29e60c66..0cdb6277 100644 --- a/src/awards.cpp +++ b/src/awards.cpp @@ -40,11 +40,11 @@ Awards::Awards(DataProxy_SQLite *dp, const QString &_parentFunction) util = new Utilities(Q_FUNC_INFO); //world->create(); /* - newOneColor.setNamedColor("#ff0000"); - neededColor.setNamedColor("#ff8c00"); - workedColor.setNamedColor("#ffd700"); - confirmedColor.setNamedColor("#32cd32"); - defaultColor.setNamedColor("#00bfff"); + newOneColor.fromString("#ff0000"); + neededColor.fromString("#ff8c00"); + workedColor.fromString("#ffd700"); + confirmedColor.fromString("#32cd32"); + defaultColor.fromString("#00bfff"); */ //"Awards::setColors: " << _newOne << "/" << _needed << "/" << _worked << "/" << _confirmed << "/" << _default; //Awards::setColors: "#ff0000" / "#ff8c00" / "#ffd700" / "#32cd32" / "#00bfff" @@ -1146,27 +1146,27 @@ void Awards::setColors (const QString &_newOne, const QString &_needed, const QS if (defaultColor.isValid()) { - defaultColor.setNamedColor(_default.toUpper()); + defaultColor.fromString(_default.toUpper()); } if (neededColor.isValid()) { - neededColor.setNamedColor(_needed.toUpper()); + neededColor.fromString(_needed.toUpper()); } if (confirmedColor.isValid()) { - confirmedColor.setNamedColor(_confirmed.toUpper()); + confirmedColor.fromString(_confirmed.toUpper()); } if (newOneColor.isValid()) { - newOneColor.setNamedColor(_newOne.toUpper()); + newOneColor.fromString(_newOne.toUpper()); } if (workedColor.isValid()) { - workedColor.setNamedColor(_worked.toUpper()); + workedColor.fromString(_worked.toUpper()); } } diff --git a/src/database.cpp b/src/database.cpp index 6ba4f66e..46423d74 100644 --- a/src/database.cpp +++ b/src/database.cpp @@ -212,7 +212,8 @@ void DataBase::compress() } else { - db.exec("VACUUM;"); + QSqlQuery query("VACUUM;"); + query.exec("VACUUM;"); } logEvent(Q_FUNC_INFO, "END", Debug); } @@ -3708,7 +3709,7 @@ bool DataBase::updateModeIdFromSubModeId() int qsos; int i = 0; QString aux; - QSqlQuery query, query2; + QSqlQuery query; bool sqlOk = query.exec("SELECT COUNT (*) FROM log"); if (sqlOk) @@ -3763,6 +3764,7 @@ bool DataBase::updateModeIdFromSubModeId() //TODO The following query can be executed in: getModeIdFromSubMode() sq = QString("SELECT id FROM modetemp WHERE submode='%1'").arg(modetxt); // STEP-3 + QSqlQuery query2; sqlOk2 = query2.exec(sq); if (sqlOk2) @@ -3784,7 +3786,7 @@ bool DataBase::updateModeIdFromSubModeId() else { //queryErrorManagement(Q_FUNC_INFO, query3.lastError().databaseText(), query3.lastError().nativeErrorCode(), query3.lastQuery()); - //qDebug() << "DataBase::updateModeIdFromSubModeId: (STEP-4) ID: " << QString::number(id) << " NOT updated-2" ; + //qDebug() << "DataBase::updateModeIdFromSubModeId: (STEP-4) ID: " << QString::number(id) << " NOT updated-2" ; } } else @@ -3845,9 +3847,7 @@ bool DataBase::updateModeIdFromSubModeId() query.finish(); return false; } - //qDebug() << "DataBase::updateModeIdFromSubModeId: END" ; - query.finish(); return true; } @@ -3882,7 +3882,7 @@ bool DataBase::updateBandIdTableLogToNewOnes() int qsos; int i = 0; QString aux; - QSqlQuery query, query2; + QSqlQuery query; bool sqlOk = query.exec("SELECT COUNT (*) FROM log"); if (sqlOk) @@ -3931,7 +3931,7 @@ bool DataBase::updateBandIdTableLogToNewOnes() bandtxt = getBandNameFromNumber(bandFound); //qDebug() << "DataBase::updateBandIdTableLogToNewOnes: band found: " << bandtxt ; - + QSqlQuery query2; sq = QString("SELECT id FROM bandtemp WHERE name='%1'").arg(bandtxt); sqlOk2 = query2.exec(sq); diff --git a/src/dataproxy_sqlite.cpp b/src/dataproxy_sqlite.cpp index 92b9b308..8e27ed0b 100644 --- a/src/dataproxy_sqlite.cpp +++ b/src/dataproxy_sqlite.cpp @@ -8331,25 +8331,33 @@ QString DataProxy_SQLite::getADIFQSO(const int _qsoId, ExportMode _em) return QString(); if (!query.isValid()) return QString(); + QSqlRecord rec = query.record(); - return getADIFFromQSOQuery(query, _em, false, false, -1); + return getADIFFromQSOQuery(rec, _em, false, false, -1); } -QString DataProxy_SQLite::getADIFFromQSOQuery(QSqlQuery query, ExportMode _em, bool _justMarked, bool _onlyRequested, const int _logN ) +QString DataProxy_SQLite::getADIFFromQSOQuery(QSqlRecord rec, ExportMode _em, bool _justMarked, bool _onlyRequested, const int _logN ) { //qDebug() << Q_FUNC_INFO << ": " << query.lastQuery(); + qDebug() << Q_FUNC_INFO << ": START"; int nameCol; QString aux; //bool propsat = false; // Reset the QSO in case it is a Satellite QSO - QSqlRecord rec = query.record(); + + //for(int i=0;icheckAndFixASCIIinADIF(aux); + field = rec.field(nameCol); + aux = (field.value()).toString(); + aux = util->checkAndFixASCIIinADIF(aux); if ( aux !="R" ) { return QString(); } } + + nameCol = rec.indexOf("call"); + if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); + field = rec.field(nameCol); + aux = (field.value()).toString(); + //aux = (query.value(nameCol)).toString(); qso.setCall(aux); } @@ -8377,7 +8392,9 @@ QString DataProxy_SQLite::getADIFFromQSOQuery(QSqlQuery query, ExportMode _em, b QDateTime tDateTime; if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); + field = rec.field(nameCol); + aux = (field.value()).toString(); + //aux = (query.value(nameCol)).toString(); tDateTime = util->getDateTimeFromSQLiteString(aux); qso.setDateTimeOn(tDateTime); } @@ -8386,7 +8403,8 @@ QString DataProxy_SQLite::getADIFFromQSOQuery(QSqlQuery query, ExportMode _em, b QString bandst = QString(); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); + field = rec.field(nameCol); +aux = (field.value()).toString(); //qDebug() << Q_FUNC_INFO << ": -Band-1: " << aux; aux = util->checkAndFixASCIIinADIF(aux); @@ -8397,7 +8415,8 @@ QString DataProxy_SQLite::getADIFFromQSOQuery(QSqlQuery query, ExportMode _em, b nameCol = rec.indexOf("freq"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); + field = rec.field(nameCol); +aux = (field.value()).toString(); //qDebug() << Q_FUNC_INFO << ": FREQ_TX-1: " << aux; aux = util->checkAndFixASCIIinADIF(aux); //qDebug() << Q_FUNC_INFO << ": FREQ_TX-2: " << aux; @@ -8408,7 +8427,8 @@ QString DataProxy_SQLite::getADIFFromQSOQuery(QSqlQuery query, ExportMode _em, b QString bandrxst = QString(); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); aux = getNameFromBandId(aux.toInt()); qso.setBandRX(aux); @@ -8417,7 +8437,8 @@ QString DataProxy_SQLite::getADIFFromQSOQuery(QSqlQuery query, ExportMode _em, b nameCol = rec.indexOf("freq_rx"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setFreqRX(aux.toDouble()); } @@ -8425,7 +8446,8 @@ QString DataProxy_SQLite::getADIFFromQSOQuery(QSqlQuery query, ExportMode _em, b nameCol = rec.indexOf("modeid"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); // get SubModeId to check if it is the same or not from modeid QString aux2 = getSubModeFromId(aux.toInt()); @@ -8437,7 +8459,8 @@ QString DataProxy_SQLite::getADIFFromQSOQuery(QSqlQuery query, ExportMode _em, b nameCol = rec.indexOf("prop_mode"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setPropMode(aux); //qDebug() << Q_FUNC_INFO << ": PROP_MODE" ; } @@ -8445,7 +8468,8 @@ QString DataProxy_SQLite::getADIFFromQSOQuery(QSqlQuery query, ExportMode _em, b nameCol = rec.indexOf("sat_name"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setSatName(aux); //qDebug() << Q_FUNC_INFO << ": SAT_NAME" ; } @@ -8453,28 +8477,32 @@ QString DataProxy_SQLite::getADIFFromQSOQuery(QSqlQuery query, ExportMode _em, b nameCol = rec.indexOf("gridsquare"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setGridSquare(aux); } nameCol = rec.indexOf("my_gridsquare"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setMyGridSquare(aux); } nameCol = rec.indexOf("station_callsign"); if ((nameCol>=0) && (_em != ModeEQSL)) { - aux = (query.value(nameCol)).toString(); + field = rec.field(nameCol); +aux = (field.value()).toString(); qso.setStationCallsign(aux); } nameCol = rec.indexOf("qso_date_off"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); tDateTime = util->getDateTimeFromSQLiteString(aux); qso.setDateOff(tDateTime.date()); @@ -8484,7 +8512,8 @@ QString DataProxy_SQLite::getADIFFromQSOQuery(QSqlQuery query, ExportMode _em, b nameCol = rec.indexOf("srx"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setSrx(aux.toInt ()); } @@ -8492,21 +8521,24 @@ QString DataProxy_SQLite::getADIFFromQSOQuery(QSqlQuery query, ExportMode _em, b nameCol = rec.indexOf("srx_string"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setSrxString(aux); } nameCol = rec.indexOf("stx"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setStx(aux.toInt ()); } nameCol = rec.indexOf("stx_string"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setStxString(aux); } @@ -8514,14 +8546,16 @@ QString DataProxy_SQLite::getADIFFromQSOQuery(QSqlQuery query, ExportMode _em, b nameCol = rec.indexOf("cqz"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setCQZone(aux.toInt()); } nameCol = rec.indexOf("ituz"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setItuZone(aux.toInt()); } @@ -8529,77 +8563,88 @@ QString DataProxy_SQLite::getADIFFromQSOQuery(QSqlQuery query, ExportMode _em, b nameCol = rec.indexOf("dxcc"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setDXCC(aux.toInt()); } nameCol = rec.indexOf("address"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setAddress(aux); } nameCol = rec.indexOf("age"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setAge(aux.toInt()); } nameCol = rec.indexOf("cnty"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setCounty(aux); } nameCol = rec.indexOf("comment"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setComment(aux); } nameCol = rec.indexOf("a_index"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setA_Index(aux.toInt()); } nameCol = rec.indexOf("ant_az"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setAnt_az(aux.toDouble()); } nameCol = rec.indexOf("ant_el"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setAnt_el(aux.toDouble()); } nameCol = rec.indexOf("ant_path"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setAnt_Path(aux); } nameCol = rec.indexOf("arrl_sect"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setARRL_Sect(aux); } nameCol = rec.indexOf("checkcontest"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setCheck(aux); } @@ -8607,77 +8652,88 @@ QString DataProxy_SQLite::getADIFFromQSOQuery(QSqlQuery query, ExportMode _em, b nameCol = rec.indexOf("class"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setClass(aux); } nameCol = rec.indexOf("cont"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setContinent(aux); } nameCol = rec.indexOf("contacted_op"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setContactedOperator(aux); } nameCol = rec.indexOf("contest_id"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setContestID(aux); } nameCol = rec.indexOf("country"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setCountry(aux); } nameCol = rec.indexOf("credit_submitted"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setCreditSubmitted(aux); } nameCol = rec.indexOf("credit_granted"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setCreditGranted(aux); } nameCol = rec.indexOf("distance"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setDistance(aux.toDouble ()); } nameCol = rec.indexOf("darc_dok"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setDarcDok(aux); } nameCol = rec.indexOf("eq_call"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setEQ_Call(aux); } nameCol = rec.indexOf("email"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setEmail(aux); } @@ -8685,7 +8741,8 @@ QString DataProxy_SQLite::getADIFFromQSOQuery(QSqlQuery query, ExportMode _em, b QDate date; if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); + field = rec.field(nameCol); +aux = (field.value()).toString(); date = util->getDateFromSQliteString(aux); qso.setEQSLQSLRDate(date); } @@ -8693,7 +8750,8 @@ QString DataProxy_SQLite::getADIFFromQSOQuery(QSqlQuery query, ExportMode _em, b nameCol = rec.indexOf("eqsl_qslsdate"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); + field = rec.field(nameCol); +aux = (field.value()).toString(); date = util->getDateFromSQliteString(aux); qso.setEQSLQSLSDate(date); } @@ -8701,42 +8759,48 @@ QString DataProxy_SQLite::getADIFFromQSOQuery(QSqlQuery query, ExportMode _em, b nameCol = rec.indexOf("eqsl_qsl_rcvd"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setEQSLQSL_RCVD(aux); } nameCol = rec.indexOf("eqsl_qsl_sent"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setEQSLQSL_SENT(aux); } nameCol = rec.indexOf("fists"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setFists(aux.toInt()); } nameCol = rec.indexOf("fists_cc"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setFistsCC(aux.toInt()); } nameCol = rec.indexOf("force_init"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setForceInit(util->QStringToBool(aux)); } nameCol = rec.indexOf("hrdlog_qso_upload_date"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); + field = rec.field(nameCol); +aux = (field.value()).toString(); date = util->getDateFromSQliteString(aux); qso.setHRDUpdateDate(date); } @@ -8744,7 +8808,8 @@ QString DataProxy_SQLite::getADIFFromQSOQuery(QSqlQuery query, ExportMode _em, b nameCol = rec.indexOf("hrdlog_qso_upload_status"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); //TODO: Add a isValidUploadStatus qso.setHRDLogStatus(aux); } @@ -8754,97 +8819,111 @@ QString DataProxy_SQLite::getADIFFromQSOQuery(QSqlQuery query, ExportMode _em, b if (nameCol>=0) { //qDebug() << Q_FUNC_INFO << ": my_antenna-1"; - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setMyAntenna(aux); } //qDebug() << Q_FUNC_INFO << ": my_antenna-99"; nameCol = rec.indexOf("my_dxcc"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setMyDXCC(aux.toInt()); } nameCol = rec.indexOf("my_fists"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setMyFists(aux.toInt()); } nameCol = rec.indexOf("iota"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setIOTA(aux); } nameCol = rec.indexOf("iota_island_id"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setIotaID(aux.toInt()); } nameCol = rec.indexOf("my_iota"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setMyIOTA(aux); } nameCol = rec.indexOf("my_iota_island_id"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setMyIotaID(aux.toInt()); } nameCol = rec.indexOf("k_index"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setK_Index(aux.toInt()); } nameCol = rec.indexOf("my_itu_zone"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setMyITUZone(aux.toInt()); } nameCol = rec.indexOf("lat"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setLatitude(aux); } nameCol = rec.indexOf("lon"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setLongitude(aux); } nameCol = rec.indexOf("my_lat"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setMyLatitude(aux); } nameCol = rec.indexOf("my_lon"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setMyLongitude(aux); } nameCol = rec.indexOf("lotw_qslrdate"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); + field = rec.field(nameCol); +aux = (field.value()).toString(); date = util->getDateFromSQliteString(aux); qso.setLoTWQSLRDate(date); } @@ -8852,7 +8931,8 @@ QString DataProxy_SQLite::getADIFFromQSOQuery(QSqlQuery query, ExportMode _em, b nameCol = rec.indexOf("lotw_qslsdate"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); + field = rec.field(nameCol); +aux = (field.value()).toString(); date = util->getDateFromSQliteString(aux); qso.setLoTWQSLSDate(date); } @@ -8860,21 +8940,24 @@ QString DataProxy_SQLite::getADIFFromQSOQuery(QSqlQuery query, ExportMode _em, b nameCol = rec.indexOf("lotw_qsl_rcvd"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setLoTWQSL_RCVD(aux); } nameCol = rec.indexOf("lotw_qsl_sent"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setLoTWQSL_SENT(aux); } nameCol = rec.indexOf("clublog_qso_upload_date"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); + field = rec.field(nameCol); +aux = (field.value()).toString(); date = util->getDateFromSQliteString(aux); qso.setClublogQSOUpdateDate(date); } @@ -8882,365 +8965,424 @@ QString DataProxy_SQLite::getADIFFromQSOQuery(QSqlQuery query, ExportMode _em, b nameCol = rec.indexOf("clublog_qso_upload_status"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setClubLogStatus(aux); } nameCol = rec.indexOf("qrzcom_qso_upload_date"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); + field = rec.field(nameCol); +aux = (field.value()).toString(); date = util->getDateFromSQliteString(aux); qso.setQRZCOMDate(date); } nameCol = rec.indexOf("qrzcom_qso_upload_status"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setQRZCOMStatus(aux); } nameCol = rec.indexOf("max_bursts"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setMaxBursts(aux.toInt()); } nameCol = rec.indexOf("ms_shower"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setMsShower(aux); } nameCol = rec.indexOf("my_city"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setMyCity(aux); } nameCol = rec.indexOf("my_cnty"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setMyCounty(aux); } nameCol = rec.indexOf("my_country"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setMyCountry(aux); } nameCol = rec.indexOf("my_cq_zone"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setMyCQZone(aux.toInt()); } nameCol = rec.indexOf("my_name"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setMyName(aux); } nameCol = rec.indexOf("name"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setName(aux); } nameCol = rec.indexOf("operator"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setOperatorCallsign(aux); } nameCol = rec.indexOf("owner_callsign"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setOwnerCallsign(aux); } nameCol = rec.indexOf("my_postal_code"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setMyPostalCode(aux); } nameCol = rec.indexOf("my_rig"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setMyRig(aux); } nameCol = rec.indexOf("my_sig"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setMySig(aux); } nameCol = rec.indexOf("my_sota_ref"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setMySOTA_REF(aux); } nameCol = rec.indexOf("my_state"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setMyState(aux); } nameCol = rec.indexOf("my_street"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setMyStreet(aux); } nameCol = rec.indexOf("notes"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setNotes(aux); } nameCol = rec.indexOf("nr_bursts"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setNrBursts(aux.toInt()); } nameCol = rec.indexOf("nr_pings"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setNrPings(aux.toInt()); } nameCol = rec.indexOf("pfx"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setPrefix(aux); } nameCol = rec.indexOf("precedence"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setPrecedence(aux); } nameCol = rec.indexOf("public_key"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setPublicKey(aux); } nameCol = rec.indexOf("qslmsg"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setQSLMsg(aux); } nameCol = rec.indexOf("qslrdate"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); + field = rec.field(nameCol); +aux = (field.value()).toString(); date = util->getDateFromSQliteString(aux); qso.setQSLRDate(date); } nameCol = rec.indexOf("qslsdate"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); + field = rec.field(nameCol); +aux = (field.value()).toString(); date = util->getDateFromSQliteString(aux); qso.setQSLSDate(date); } nameCol = rec.indexOf("qsl_rcvd"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setQSL_RCVD(aux); } nameCol = rec.indexOf("qsl_rcvd_via"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setQSLRecVia(aux); } nameCol = rec.indexOf("qsl_sent"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setQSL_SENT(aux); } nameCol = rec.indexOf("qsl_sent_via"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setQSLSenVia(aux); } nameCol = rec.indexOf("qsl_via"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setQSLVia(aux); } nameCol = rec.indexOf("qso_complete"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setQSOComplete(util->getADIFQSO_CompleteFromDB(aux)); } nameCol = rec.indexOf("qso_random"); if (nameCol>=0) { //TODO: Check wether it makes sense to use this field for ALL QSOs or just when it is not random. - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setQSORandom(util->QStringToBool(aux)); } nameCol = rec.indexOf("qth"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setQTH(aux); } nameCol = rec.indexOf("rst_sent"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setRSTTX(aux); } nameCol = rec.indexOf("rst_rcvd"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setRSTRX(aux); } nameCol = rec.indexOf("region"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setRegion(aux); } nameCol = rec.indexOf("rig"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setRig(aux); } nameCol = rec.indexOf("rx_pwr"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setRXPwr(aux.toDouble()); } nameCol = rec.indexOf("tx_pwr"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setTXPwr(aux.toDouble()); } nameCol = rec.indexOf("sat_mode"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setSatMode(aux); } nameCol = rec.indexOf("sfi"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setSFI(aux.toInt()); } nameCol = rec.indexOf("sig"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setSig(aux); } nameCol = rec.indexOf("sig_info"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setSigInfo(aux); } nameCol = rec.indexOf("silent_key"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setSilentKey(util->QStringToBool(aux)); } nameCol = rec.indexOf("skcc"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setSkcc(aux); } nameCol = rec.indexOf("sota_ref"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setSOTA_REF(aux); } nameCol = rec.indexOf("state"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setState(aux); } nameCol = rec.indexOf("swl"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setSwl(util->QStringToBool(aux)); } nameCol = rec.indexOf("ten_ten"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setTenTen(aux.toInt()); } nameCol = rec.indexOf("uksmg"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setUksmg(aux.toInt()); } nameCol = rec.indexOf("ve_prov"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setVeProv(aux); } nameCol = rec.indexOf("my_usaca_counties"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setMyUsacaCounties(aux); } nameCol = rec.indexOf("usaca_counties"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setUsacaCounties(aux); } nameCol = rec.indexOf("vucc_grids"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setVUCCGrids(aux); } nameCol = rec.indexOf("my_vucc_grids"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setMyVUCCGrids(aux); } nameCol = rec.indexOf("web"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setWeb(aux); } if (_logN == -1) @@ -9248,7 +9390,8 @@ QString DataProxy_SQLite::getADIFFromQSOQuery(QSqlQuery query, ExportMode _em, b nameCol = rec.indexOf("lognumber"); if (nameCol>=0) { - aux = (query.value(nameCol)).toString(); aux = util->checkAndFixASCIIinADIF(aux); + field = rec.field(nameCol); +aux = (field.value()).toString(); aux = util->checkAndFixASCIIinADIF(aux); qso.setLogId(aux.toInt()); } } @@ -9256,7 +9399,6 @@ QString DataProxy_SQLite::getADIFFromQSOQuery(QSqlQuery query, ExportMode _em, b return qso.getADIF(); } - bool DataProxy_SQLite::showInvalidCallMessage(const QString &_call){ QMessageBox msgBox; msgBox.setIcon(QMessageBox::Warning); @@ -9635,6 +9777,7 @@ int DataProxy_SQLite::getFieldInBand(ValidFieldsForStats _field, const QString & return 0; } +/* int DataProxy_SQLite::addQSOQuery(const QSqlQuery &_q) { QSqlQuery query = _q; @@ -9652,6 +9795,7 @@ int DataProxy_SQLite::addQSOQuery(const QSqlQuery &_q) return -1; } } +*/ int DataProxy_SQLite::addQSO(QSO &_qso) {//TODO: Check if I can simply remove this function diff --git a/src/dataproxy_sqlite.h b/src/dataproxy_sqlite.h index 6686d92b..e1f594bc 100644 --- a/src/dataproxy_sqlite.h +++ b/src/dataproxy_sqlite.h @@ -112,7 +112,7 @@ class DataProxy_SQLite : public QObject int addQSOFromLoTW(const QString &_call, const QDateTime _datetime, const QString &_mode, const QString &_band, const double _freq, const QDate _qslrdate, const QString &_stationcallsign, const int _logn); int addQSO(QSO &_qso); - int addQSOQuery(const QSqlQuery &_q); + //int addQSOQuery(const QSqlQuery &_q); bool deleteQSO(const int _qsoId); int isWorkedB4(const QString &_qrz, const int _currentLog); @@ -319,7 +319,8 @@ class DataProxy_SQLite : public QObject //void getFoundInLog(const QString &_txt, const int _log=-1); QString getADIFQSO(const int _qsoId, ExportMode _em = ModeADIF); - QString getADIFFromQSOQuery(QSqlQuery query, ExportMode _em = ModeADIF, bool _justMarked = false, bool _onlyRequested = false, int _logN = -1); + QString getADIFFromQSOQuery(QSqlRecord _rec, ExportMode _em = ModeADIF, bool _justMarked = false, bool _onlyRequested = false, int _logN = -1); + //QString getADIFFromQSOQuery2(QSqlRecord _rec, ExportMode _em = ModeADIF, bool _justMarked = false, bool _onlyRequested = false, int _logN = -1); bool showInvalidCallMessage(const QString &_call); diff --git a/src/dxccstatuswidget.cpp b/src/dxccstatuswidget.cpp index 96469438..2ac0ab72 100644 --- a/src/dxccstatuswidget.cpp +++ b/src/dxccstatuswidget.cpp @@ -805,7 +805,7 @@ void DXCCStatusWidget::slotRightButton(const QPoint& pos) int row = (dxccView->indexAt(pos)).row(); showDXCCWikipediaAct = new QAction(tr("&Wikipedia"), this); - showDXCCWikipediaAct->setShortcut(Qt::CTRL + Qt::Key_W); + showDXCCWikipediaAct->setShortcut(Qt::CTRL | Qt::Key_W); showDXCCWikipediaAct->setStatusTip(tr("Show this DXCC in Wikipedia")); connect(showDXCCWikipediaAct, SIGNAL(triggered()), this, SLOT(slotWikipedia())); diff --git a/src/dxcluster.cpp b/src/dxcluster.cpp index 554eb8e0..10a59060 100644 --- a/src/dxcluster.cpp +++ b/src/dxcluster.cpp @@ -110,7 +110,7 @@ void DXClusterWidget::createActions() { //qDebug() << Q_FUNC_INFO; checkQRZCOMFromLogAct = new QAction(tr("Check in QRZ.com"), this); - //checkQRZCOMFromLogAct->setShortcut(Qt::CTRL + Qt::Key_Q); + //checkQRZCOMFromLogAct->setShortcut(Qt::CTRL | Qt::Key_Q); checkQRZCOMFromLogAct->setStatusTip(tr("Check this callsign in QRZ.com")); connect(checkQRZCOMFromLogAct, SIGNAL(triggered()), this, SLOT( slotCheckQRZCom() )); @@ -119,7 +119,8 @@ void DXClusterWidget::createActions() void DXClusterWidget::init() { //qDebug() << Q_FUNC_INFO; - dxSpotColor.setNamedColor("slategrey"); + dxSpotColor.fromString("slategrey"); + //dxSpotColor.fromString("slategrey"); dxClusterConnected = false; dxClusterAlreadyConnected = false; showDxMarathon = false; diff --git a/src/filemanager.cpp b/src/filemanager.cpp index 4edb922d..12362ed4 100644 --- a/src/filemanager.cpp +++ b/src/filemanager.cpp @@ -358,19 +358,20 @@ QList FileManager::adifLogExportReturnList(const QString& _fileName, const return qsos; } - QSqlRecord rec = query.record(); + int nameCol; //qDebug() << Q_FUNC_INFO << ": Entering the While..." ; - + QSqlRecord rec; while ( (query.next()) && (!noMoreQso) ) { //qDebug() << Q_FUNC_INFO << ": Start of While" ; if (query.isValid()) { + rec = query.record(); nameCol = rec.indexOf("id"); qsos.append((query.value(nameCol)).toInt()); - writeQuery(query, out, _em, false, false, _logN); // JustMarked = false, onlyRequested = false + writeQuery(rec, out, _em, false, false, _logN); // JustMarked = false, onlyRequested = false //Use std::move(query) instead of query? // Copy queries is deprecated @@ -518,13 +519,15 @@ bool FileManager::adifQSOsExport(const QString& _fileName, QList _qsos) progress.setWindowTitle(tr("Export progress")); int currentQso = 0; int step = util->getProgresStepForDialog(numberOfQSOs); + QSqlRecord rec; while ( (query.next()) && (!noMoreQso) ) { //qDebug() << "FileManager::adifLogExportToFile - Just in the While"; if (query.isValid()) { + rec = query.record(); //qDebug() << "FileManager::adifLogExportToFile - Query is Valid"; - writeQuery(query, out, ModeADIF, false, false, -1); + writeQuery(rec, out, ModeADIF, false, false, -1); } // Closes the isValid else { //qDebug() << "FileManager::adifLogExportToFile - Query is NOT Valid"; @@ -638,13 +641,15 @@ bool FileManager::adifQSOsExport2(const QString& _fileName, const QString& _fiel progress.setWindowTitle(tr("Export progress")); int currentQso = 0; int step = util->getProgresStepForDialog(numberOfQSOs); + QSqlRecord rec; while ( (query.next()) && (!noMoreQso) ) { //qDebug() << Q_FUNC_INFO << " - Just in the While"; if (query.isValid()) { + rec = query.record(); //qDebug() << Q_FUNC_INFO << " - Query is Valid"; - writeQuery(query, out, ModeADIF, false, false, -1); + writeQuery(rec, out, ModeADIF, false, false, -1); } // Closes the isValid else { //qDebug() << Q_FUNC_INFO << " - Query is NOT Valid"; @@ -835,17 +840,17 @@ bool FileManager::adifLogExportToFile(const QString& _fileName, const int _logN, progress.setWindowModality(Qt::ApplicationModal); progress.setWindowTitle(tr("Export progress")); - QSqlRecord rec = query.record(); QDateTime date; //qDebug() << Q_FUNC_INFO << " - 50"; - + QSqlRecord rec; while ( (query.next()) && (!noMoreQso) ) { //qDebug() << Q_FUNC_INFO << " - 50.1"; if (query.isValid()) { - writeQuery(query, out, ModeADIF, exportJustMarkedQSO, exportOnlyQSLRequested, _logN); + rec = query.record(); + writeQuery(rec, out, ModeADIF, exportJustMarkedQSO, exportOnlyQSLRequested, _logN); //qDebug() << Q_FUNC_INFO << " - 50.2"; } // Closes the isValid @@ -4011,7 +4016,7 @@ void FileManager::writeADIFHeader(QTextStream &out, const ExportMode _em, const out << "\n"; } -void FileManager::writeQuery(QSqlQuery &query, QTextStream &out, const ExportMode _em, const bool _justMarked, const bool _onlyRequested, const int _logN ) +void FileManager::writeQuery(QSqlRecord &rec, QTextStream &out, const ExportMode _em, const bool _justMarked, const bool _onlyRequested, const int _logN ) { - out << dataProxy->getADIFFromQSOQuery(query, _em, _justMarked, _onlyRequested, _logN); + out << dataProxy->getADIFFromQSOQuery(rec, _em, _justMarked, _onlyRequested, _logN); } diff --git a/src/filemanager.h b/src/filemanager.h index 52361a9d..99676e81 100644 --- a/src/filemanager.h +++ b/src/filemanager.h @@ -122,7 +122,7 @@ class FileManager : public QWidget QStringList readAdifField (const QString &_field); // void writeAdifField(const QString &_field, const QString &_data); // It should possibly receive also the QTextStream - void writeQuery(QSqlQuery &query, QTextStream &out, const ExportMode _em, const bool _justMarked, const bool _onlyRequested, const int _logN); + void writeQuery(QSqlRecord &rec, QTextStream &out, const ExportMode _em, const bool _justMarked, const bool _onlyRequested, const int _logN); void writeADIFHeader(QTextStream &out, const ExportMode _em, const int _numberOfQsos); diff --git a/src/logwindow.cpp b/src/logwindow.cpp index 3eb5923d..5028d662 100644 --- a/src/logwindow.cpp +++ b/src/logwindow.cpp @@ -344,47 +344,47 @@ void LogWindow::showMenuRightButtonFromLogCreateActions() //qDebug() << "LogWindow::showMenuRightButtonFromLogCreateActions"; delQSOFromLogAct = new QAction(tr("&Delete"), this); - delQSOFromLogAct->setShortcut(Qt::CTRL + Qt::Key_D); + delQSOFromLogAct->setShortcut(Qt::CTRL | Qt::Key_D); delQSOFromLogAct->setStatusTip(tr("Delete a QSO")); connect(delQSOFromLogAct, SIGNAL(triggered()), this, SLOT(slotQsoDeleteFromLog())); qsoToEditFromLogAct = new QAction(tr("&Edit QSO"), this); - qsoToEditFromLogAct->setShortcut(Qt::CTRL + Qt::Key_E); + qsoToEditFromLogAct->setShortcut(Qt::CTRL | Qt::Key_E); qsoToEditFromLogAct->setStatusTip(tr("Edit this QSO")); connect(qsoToEditFromLogAct, SIGNAL(triggered()), this, SLOT(slotQSOToEditFromLog())); qslSentViaBureauFromLogAct = new QAction(tr("Via &bureau"), this); - qslSentViaBureauFromLogAct->setShortcut(Qt::CTRL + Qt::Key_B); + qslSentViaBureauFromLogAct->setShortcut(Qt::CTRL | Qt::Key_B); qslSentViaBureauFromLogAct->setStatusTip(tr("Send this QSL via bureau")); connect(qslSentViaBureauFromLogAct, SIGNAL(triggered()), this, SLOT( slotQSLSentViaBureauFromLog() )); qslSentViaDirectFromLogAct = new QAction(tr("D&irect"), this); - qslSentViaDirectFromLogAct->setShortcut(Qt::CTRL + Qt::Key_I); + qslSentViaDirectFromLogAct->setShortcut(Qt::CTRL | Qt::Key_I); qslSentViaDirectFromLogAct->setStatusTip(tr("Send this QSL via direct")); connect(qslSentViaDirectFromLogAct, SIGNAL(triggered()), this, SLOT( slotQSLSentViaDirectFromLog() )); qslRecViaBureauFromLogAct = new QAction(tr("Via bureau"), this); - qslRecViaBureauFromLogAct->setShortcut(Qt::CTRL + Qt::Key_R); + qslRecViaBureauFromLogAct->setShortcut(Qt::CTRL | Qt::Key_R); qslRecViaBureauFromLogAct->setStatusTip(tr("QSL &received via bureau")); connect(qslRecViaBureauFromLogAct, SIGNAL(triggered()), this, SLOT( slotQSLRecViaBureauFromLog() )); qslRecViaDirectFromLogAct = new QAction(tr("Direct"), this); - qslRecViaDirectFromLogAct->setShortcut(Qt::CTRL + Qt::Key_T); + qslRecViaDirectFromLogAct->setShortcut(Qt::CTRL | Qt::Key_T); qslRecViaDirectFromLogAct->setStatusTip(tr("QSL received via direc&t")); connect(qslRecViaDirectFromLogAct, SIGNAL(triggered()), this, SLOT( slotQSLRecViaDirectFromLog() )); checkQRZCOMFromLogAct = new QAction(tr("Check in QRZ.com"), this); - checkQRZCOMFromLogAct->setShortcut(Qt::CTRL + Qt::Key_Q); + checkQRZCOMFromLogAct->setShortcut(Qt::CTRL | Qt::Key_Q); checkQRZCOMFromLogAct->setStatusTip(tr("Check this callsign in QRZ.com")); connect(checkQRZCOMFromLogAct, SIGNAL(triggered()), this, SLOT( slotCheckQRZCom() )); checkDXHeatFromLogAct = new QAction(tr("Check in DXHeat.com"), this); - checkDXHeatFromLogAct->setShortcut(Qt::CTRL + Qt::Key_Q); + checkDXHeatFromLogAct->setShortcut(Qt::CTRL | Qt::Key_Q); checkDXHeatFromLogAct->setStatusTip(tr("Check this callsign in DXHeat.com")); connect(checkDXHeatFromLogAct, SIGNAL(triggered()), this, SLOT( slotCheckDXHeatCom() )); multipleDelQSOsFromLogAct = new QAction(tr("Delete selected QSOs"), this); - //multipleDelQSOsFromLogAct->setShortcut(Qt::CTRL + Qt::Key_D); + //multipleDelQSOsFromLogAct->setShortcut(Qt::CTRL | Qt::Key_D); multipleDelQSOsFromLogAct->setStatusTip(tr("Delete the selected QSOs")); connect(multipleDelQSOsFromLogAct, SIGNAL(triggered()), this, SLOT(slotQSOsDeleteFromLog())); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 41a23570..739fe8a5 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -451,18 +451,19 @@ void MainWindow::init() //qDebug() << Q_FUNC_INFO << " - 50" << (QTime::currentTime()).toString("HH:mm:ss") ; selectedYear = (dateTime->currentDateTime()).date().year(); - loggWinAct->setShortcut(Qt::CTRL + Qt::Key_L); + loggWinAct->setShortcut(Qt::CTRL | Qt::Key_L); + palRed.setColor(QPalette::Text, Qt::red); palBlack.setColor(QPalette::Text, Qt::black); clublogAnswer = -1; - defaultColor.setNamedColor("slategrey"); - neededColor.setNamedColor("yellow"); - workedColor.setNamedColor("blue"); - confirmedColor.setNamedColor("red"); - newOneColor.setNamedColor("green"); + defaultColor.fromString("slategrey"); + neededColor.fromString("yellow"); + workedColor.fromString("blue"); + confirmedColor.fromString("red"); + newOneColor.fromString("green"); //qDebug() << Q_FUNC_INFO << " - 60" << (QTime::currentTime()).toString("HH:mm:ss") ; bool existingData = QFile::exists(util->getKLogDBFile()); @@ -2366,7 +2367,7 @@ void MainWindow::createMenusCommon() printLogAct = new QAction(tr("&Print Log ..."), this); fileMenu->addAction(printLogAct); - printLogAct->setShortcut(Qt::CTRL + Qt::Key_P); + printLogAct->setShortcut(Qt::CTRL | Qt::Key_P); printLogAct->setToolTip(tr("Print your log.")); connect(printLogAct, SIGNAL(triggered()), this, SLOT(slotFilePrint())); @@ -2389,7 +2390,7 @@ void MainWindow::createMenusCommon() exitAct = new QAction(tr("E&xit"), this); fileMenu->addAction(exitAct); //exitAct->setMenuRole(QAction::QuitRole); - exitAct->setShortcut(Qt::CTRL + Qt::Key_X); + exitAct->setShortcut(Qt::CTRL | Qt::Key_X); //connect(exitAct, SIGNAL(triggered()), this, SLOT(close())); connect(exitAct, SIGNAL(triggered()), this, SLOT(slotFileClose())); @@ -6912,11 +6913,11 @@ bool MainWindow::loadSettings() //qDebug() << Q_FUNC_INFO << " - 60 - colors"; settings.beginGroup ("Colors"); - newOneColor.setNamedColor(settings.value ("NewOneColor", "#FF0000").toString ()); - neededColor.setNamedColor(settings.value ("NeededColor","#FF8C00").toString ()); - workedColor.setNamedColor(settings.value ("WorkedColor", "#FFD700").toString ()); - confirmedColor.setNamedColor(settings.value ("ConfirmedColor", "#32CD32").toString ()); - defaultColor.setNamedColor(settings.value ("DefaultColor", "#00BFFF").toString ()); + newOneColor.fromString(settings.value ("NewOneColor", "#FF0000").toString ()); + neededColor.fromString(settings.value ("NeededColor","#FF8C00").toString ()); + workedColor.fromString(settings.value ("WorkedColor", "#FFD700").toString ()); + confirmedColor.fromString(settings.value ("ConfirmedColor", "#32CD32").toString ()); + defaultColor.fromString(settings.value ("DefaultColor", "#00BFFF").toString ()); settings.endGroup (); setupDialog->loadDarkMode (); diff --git a/src/setuppages/setupentitydialog.cpp b/src/setuppages/setupentitydialog.cpp index 7f8adb34..a195ff90 100644 --- a/src/setuppages/setupentitydialog.cpp +++ b/src/setuppages/setupentitydialog.cpp @@ -45,7 +45,7 @@ SetupEntityDialog::SetupEntityDialog(){ //paletteWrong = new QPalette(); //*paletteWrong->setColor(QPalette::WindowText, Qt::red); - //paletteWrong.setColor(QPalette::WindowText, color.setNamedColor("red")); + //paletteWrong.setColor(QPalette::WindowText, color.fromString("red")); palw.setColor(QPalette::Text, Qt::red); //pal.setColor(QPalette::Text, Qt::black); diff --git a/src/world.cpp b/src/world.cpp index 0f81b264..0d366baf 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -688,7 +688,10 @@ bool World::readCTYCSV(const QString &_worldFile) if (stringList.size()>=8 ) { //(id, name, cqz, ituz, continent, latitude, longitude, utc, dxcc, mainprefix) - query.addBindValue(QVariant(QVariant::Int)); + //query.prepare("INSERT INTO entity (id, name, cqz, ituz, continent, latitude, longitude, utc, dxcc, mainprefix) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"); + + //query.addBindValue(QVariant(QVariant::Int)); + query.addBindValue( QVariant(int())); query.addBindValue(stringList.at(1)); // name query.addBindValue(stringList.at(4)); // CQ query.addBindValue(stringList.at(5)); // ITU @@ -744,7 +747,7 @@ bool World::readCTYCSV(const QString &_worldFile) // 0 1 2 3 4 // (id, prefix, dxcc, cqz, ituz) //qDebug() << "World::readCTYCSV(): Prefix: " << stringListPrefixes.at(i); - queryP.addBindValue(QVariant(QVariant::Int)); + queryP.addBindValue(QVariant(int())); //readZones (const QString &pref, const int _cq, const int _itu) diff --git a/tests/tst_mainwindow/tst_mainwindow.cpp b/tests/tst_mainwindow/tst_mainwindow.cpp index 5bfd6ac1..845818ab 100644 --- a/tests/tst_mainwindow/tst_mainwindow.cpp +++ b/tests/tst_mainwindow/tst_mainwindow.cpp @@ -127,7 +127,8 @@ void tst_MainWindow::init() void tst_MainWindow::test_focusOrder() { - QApplication::setActiveWindow(mainWindow); + //QApplication::setActiveWindow(mainWindow); + mainWindow->activateWindow(); mainWindow->mainQSOEntryWidget->setFocus(); QVERIFY2(mainWindow->mainQSOEntryWidget->hasFocus(), "mainQSOEntriWidget didn't get focus"); } @@ -249,7 +250,9 @@ void tst_MainWindow::test_QSOEntry() QCOMPARE(spy1.count(), 1); QList args = spy1.takeFirst(); - QVERIFY(args.at(0).type() == QVariant::Bool); + + //QVERIFY(args.at(0).type() == QMetaType::Bool); + QVERIFY(args.at(0).typeId() == QMetaType::Bool); if (mainQSOEntryWidget->getManualMode() == true) { QVERIFY2(args.at(0).toBool () == true, "Manual mode has been enabled"); From 3ca8c26076e7395eb1ede2e1caae4ba04578907e Mon Sep 17 00:00:00 2001 From: ea4k Date: Thu, 7 Mar 2024 22:13:21 +0100 Subject: [PATCH 08/13] Create c-cpp.yml --- .github/workflows/c-cpp.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/c-cpp.yml diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml new file mode 100644 index 00000000..a383a524 --- /dev/null +++ b/.github/workflows/c-cpp.yml @@ -0,0 +1,23 @@ +name: C/C++ CI + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: configure + run: ./configure + - name: make + run: make + - name: make check + run: make check + - name: make distcheck + run: make distcheck From d4127c4935ea7ad9345ecc1c33deb06809e0137f Mon Sep 17 00:00:00 2001 From: ea4k Date: Thu, 7 Mar 2024 22:26:24 +0100 Subject: [PATCH 09/13] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index a383a524..265e88d3 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -13,11 +13,11 @@ jobs: steps: - uses: actions/checkout@v3 - - name: configure - run: ./configure + - name: apt update + run: sudo apt-get update + - name: Install dependencies + run: sudo apt install -y --fix-missing g++ make qt5-qmake qtbase5-dev qttools5-dev libqt5charts5-dev libqt5sql5-sqlite libhamlib++-dev libqt5serialport5-dev qtdeclarative5-dev qtpositioning5-dev + - name: qmake + run: qmake src.pro - name: make run: make - - name: make check - run: make check - - name: make distcheck - run: make distcheck From 3ad7459fb74085d794ca912ca2e4b168c77ae988 Mon Sep 17 00:00:00 2001 From: ea4k Date: Thu, 7 Mar 2024 23:08:26 +0100 Subject: [PATCH 10/13] Update INSTALL-linux Update the build dependencies for Qt6 --- src/INSTALL-linux | 39 ++++++++++++++------------------------- 1 file changed, 14 insertions(+), 25 deletions(-) diff --git a/src/INSTALL-linux b/src/INSTALL-linux index 9e20ac4d..4c746655 100644 --- a/src/INSTALL-linux +++ b/src/INSTALL-linux @@ -3,7 +3,7 @@ Follow these steps to build KLog. KLog requires Qt5 to be built. Currently, many distributions are still distributing Qt4 as a default Qt -version so it may be needed that you install Qt5 to be able to build KLog in +version so it may be needed that you install Qt6 to be able to build KLog in your system. install may depend on your distribution, however, check for similar names & @@ -18,12 +18,12 @@ details in the AUTHORS file). There are dependencies to build KLog and dependencies to run KLog. The dependencies to build KLog are: - - g++, make, qt5-qmake, qtbase5-dev, qttools5-dev, libqt5charts5-dev, libqt5sql5-sqlite, libqt5serialport5-dev, qtdeclarative5-dev, qtpositioning5-dev & libhamlib-dev packages + - make qmake6 qt6-base-dev qt6-declarative-dev libhamlib-dev build-essential libgl1-mesa-dev qt6-serialport-dev qt6-positioning-dev qt6-charts-dev qt6-l10n-tools In Debian it is done with: - apt-get install g++ make qt5-qmake qtbase5-dev qttools5-dev libqt5charts5-dev libqt5sql5-sqlite libhamlib++-dev libqt5serialport5-dev qtdeclarative5-dev qtpositioning5-dev + apt install -y --fix-missing make qmake6 qt6-base-dev qt6-declarative-dev libhamlib-dev build-essential libgl1-mesa-dev qt6-serialport-dev qt6-positioning-dev qt6-charts-dev qt6-l10n-tools -The dependencies to run KLog once installed are: +*** TO BE UPDATED: The dependencies to run KLog once installed are: - libqt5sql5-sqlite, qml-module-qtquick-window2, qml-module-qtlocation, qml-module-qtpositioning, qml-module-qtquick2 & qml-module-qtquick-controls2 Again in Debian, it is done with: @@ -35,28 +35,17 @@ If your are using the Debian KLog package the dependencies to run KLog will be a In your distribution, you should know how to install new packages :-) -Make sure you have qt5 available. You can do it with the qtchooser command. +Make sure you have qt6 available. You can do it with the qtchooser command. The output should be something like: - user@debian:~$ qtchooser -l - 4 - 5 - default - qt4-i386-linux-gnu - qt4 - qt5-i386-linux-gnu - qt5 - user@debian:~$ + user@debian:~$ qmake6 -v + QMake version 3.1 + Using Qt version 6.4.2 in /usr/lib/x86_64-linux-gnu +If Qt is not at least Qt6, check your instalallation as one of the previous packages may be missing. -It should return the list of qt versions available, qt5 must be one of them. -If qt5 is still not there, check your instalallation as one of the previous packages may be missing. -2.- Select the appropriate Qt version (Qt5) - - export QT_SELECT=qt5 - -3.- Untar klog +2.- Untar klog tar xvzf klog-version.tar.gz @@ -65,18 +54,18 @@ If qt5 is still not there, check your instalallation as one of the previous pack cd klog-version -4.- Generate the Makefile +3.- Generate the Makefile cd src - qmake PREFIX=/usr/local src.pro + qmake6 PREFIX=/usr/local src.pro -5. Make everything. +4. Make everything. make If everything goes OK, you should have the klog executable in the folder. -6.- To install KLog, execute the following from the root account. +5.- To install KLog, execute the following from the root account. make install From 33abc6a5fdfbdb5ddf104e8d03f80fb71668fab8 Mon Sep 17 00:00:00 2001 From: ea4k Date: Thu, 7 Mar 2024 23:09:14 +0100 Subject: [PATCH 11/13] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 265e88d3..46878299 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -16,8 +16,8 @@ jobs: - name: apt update run: sudo apt-get update - name: Install dependencies - run: sudo apt install -y --fix-missing g++ make qt5-qmake qtbase5-dev qttools5-dev libqt5charts5-dev libqt5sql5-sqlite libhamlib++-dev libqt5serialport5-dev qtdeclarative5-dev qtpositioning5-dev + run: sudo apt install -y --fix-missing make qmake6 qt6-base-dev qt6-declarative-dev libhamlib-dev build-essential libgl1-mesa-dev qt6-serialport-dev qt6-positioning-dev qt6-charts-dev qt6-l10n-tool - name: qmake - run: qmake src.pro + run: qmake6 src.pro - name: make run: make From 6f10c6a1e7eee5568f00283ea67fde5b0b90c9d8 Mon Sep 17 00:00:00 2001 From: ea4k Date: Thu, 7 Mar 2024 23:11:59 +0100 Subject: [PATCH 12/13] Update README.md Removed the LGTM badges --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 6c1d0394..05c170c8 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,6 @@ [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) Twitter Follow [![](https://tokei.rs/b1/github/ea4k/klog)](https://github.com/ea4k/klog). -[![Total alerts](https://img.shields.io/lgtm/alerts/g/ea4k/klog.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/ea4k/klog/alerts/) -[![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/ea4k/klog.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/ea4k/klog/context:cpp) [![Build status](https://ci.appveyor.com/api/projects/status/4hfa3npj88v2reqs/branch/master?svg=true)](https://ci.appveyor.com/project/ea4k/klog/branch/master) [![Coverity Scan Build Status](https://scan.coverity.com/projects/23857/badge.svg)](https://scan.coverity.com/projects/ea4k-klog) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/5879/badge)](https://bestpractices.coreinfrastructure.org/projects/5879) From 2338c1dfdd52fd09a2f0bfed678c132d852a30b5 Mon Sep 17 00:00:00 2001 From: ea4k Date: Thu, 7 Mar 2024 23:14:31 +0100 Subject: [PATCH 13/13] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 05c170c8..abf3aff7 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,6 @@ GitHub release [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) Twitter Follow -[![](https://tokei.rs/b1/github/ea4k/klog)](https://github.com/ea4k/klog). [![Build status](https://ci.appveyor.com/api/projects/status/4hfa3npj88v2reqs/branch/master?svg=true)](https://ci.appveyor.com/project/ea4k/klog/branch/master) [![Coverity Scan Build Status](https://scan.coverity.com/projects/23857/badge.svg)](https://scan.coverity.com/projects/ea4k-klog) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/5879/badge)](https://bestpractices.coreinfrastructure.org/projects/5879)