diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml
new file mode 100644
index 000000000..468782996
--- /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: apt update
+ run: sudo apt-get update
+ - name: Install dependencies
+ 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: qmake6 src.pro
+ - name: make
+ run: make
diff --git a/.gitignore b/.gitignore
index f6ad10a7e..02e0b1949 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,7 +9,7 @@ src/object_*
.DS_Store
KLog.app
*.qm
-
+.qtc_clangd
*.autosave
*.sh~
*.dmg
diff --git a/README.md b/README.md
index 6c1d03941..abf3aff76 100644
--- a/README.md
+++ b/README.md
@@ -6,9 +6,6 @@
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
-[![](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)
diff --git a/src/INSTALL-linux b/src/INSTALL-linux
index 9e20ac4d0..4c746655d 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
diff --git a/src/TODO b/src/TODO
index 9ad9031b7..ac58e8c98 100644
--- a/src/TODO
+++ b/src/TODO
@@ -1,3 +1,22 @@
+/*========== 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
+
+**
+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 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.
@@ -306,7 +325,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 +434,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/awards.cpp b/src/awards.cpp
index 3dc4ddf23..0cdb6277c 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());
}
}
@@ -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/charts/statsfieldperbandwidget.cpp b/src/charts/statsfieldperbandwidget.cpp
index 5bdb88844..03b7e82c8 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/database.cpp b/src/database.cpp
index 1763f6469..46423d740 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);
@@ -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 c4fddd404..8e27ed0bb 100644
--- a/src/dataproxy_sqlite.cpp
+++ b/src/dataproxy_sqlite.cpp
@@ -3532,7 +3532,7 @@ 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;
@@ -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 6686d92b8..e1f594bcc 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 964694388..2ac0ab726 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 554eb8e0a..10a590608 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/elogqrzlog.cpp b/src/elogqrzlog.cpp
index d96bbed65..89e77efbe 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: ").append(xml.text()));
QString tdata = QString();
while (!xml.atEnd())
diff --git a/src/filemanager.cpp b/src/filemanager.cpp
index 143adcd75..12362ed47 100644
--- a/src/filemanager.cpp
+++ b/src/filemanager.cpp
@@ -358,19 +358,22 @@ 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
i++;
//qDebug() << Q_FUNC_INFO << ": Start of isValid" ;
@@ -516,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";
@@ -636,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";
@@ -833,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
@@ -4009,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 f4b40c35e..99676e81f 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/inputwidgets/mainwindowmydatatab.cpp b/src/inputwidgets/mainwindowmydatatab.cpp
index 768ae41d6..33a33d4af 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/klogdefinitions.h b/src/klogdefinitions.h
index 4821b53cc..213981044 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/locator.cpp b/src/locator.cpp
index 38b7233de..c6b2fe8c9 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 = 'A' + i;
+ letter1 = QChar('A' + i);
+ //qDebug() << Q_FUNC_INFO << ": L1: " << letter1;
for (int j = 0; j<18; j++)
{
- letter2 = 'A' + j;
+ letter2 = QChar('A'+ j);
+ //qDebug() << Q_FUNC_INFO << ": L2: " << letter2;
if (_length<=2)
{
locator.append(letter1);
@@ -469,10 +471,13 @@ QStringList Locator::getAll(int _length)
{
for (int k = 0; k<10; k++)
{
- num1 = '0' + k;
+ num1 = QChar('0' + k);
+ //qDebug() << Q_FUNC_INFO << ": N1: " << num1;
+
for (int l = 0; l<10; l++)
{
- num2 = '0' + l;
+ num2 = QChar('0' + l);
+ //qDebug() << Q_FUNC_INFO << ": N2: " << num2;
if (_length<=4)
{
locator.append(letter1);
@@ -487,10 +492,12 @@ QStringList Locator::getAll(int _length)
{
for (int m = 0; m<24; m++)
{
- letter3 = 'a' + m;
+ //letter3 = QChar('a' + m);
+ //qDebug() << Q_FUNC_INFO << ": L3: " << letter3;
for (int n = 0; n<24; n++)
{
- letter4 = 'a' + n;
+ letter4 = QChar('a' + n);
+ //qDebug() << Q_FUNC_INFO << ": L4: " << letter4;
if (_length<=6)
{
locator.append(letter1);
@@ -507,7 +514,6 @@ QStringList Locator::getAll(int _length)
}
}
}
-
}
}
}
diff --git a/src/logwindow.cpp b/src/logwindow.cpp
index 3eb5923dc..5028d662a 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/main.cpp b/src/main.cpp
index afe8b58ff..06b76f9aa 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;
@@ -102,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
@@ -120,11 +127,12 @@ 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 */
{
- 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 7f7bd5b5f..4c9887d87 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/mainwindow.cpp b/src/mainwindow.cpp
index 492e655fd..739fe8a50 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());
@@ -1183,6 +1184,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();
@@ -2364,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()));
@@ -2387,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()));
@@ -5173,19 +5176,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()
@@ -6910,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 7f8adb34d..a195ff904 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/setuppages/setuppagehamlib.cpp b/src/setuppages/setuppagehamlib.cpp
index 3edc5b149..e495e470d 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/src.pro b/src/src.pro
index 5970515df..b8c6ba4f7 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\\\"
@@ -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 05d79a142..165318e29 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)).rightRef(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
{
@@ -2199,11 +2201,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);
}
@@ -2224,6 +2233,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";
diff --git a/src/widgets/map/mapwindowwidget.cpp b/src/widgets/map/mapwindowwidget.cpp
index 7739e1035..e1d673ba9 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()));
@@ -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";
diff --git a/src/widgets/showkloglogwidget.cpp b/src/widgets/showkloglogwidget.cpp
index 91055bc05..e9f444ebf 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) ) ) ;
}
diff --git a/src/world.cpp b/src/world.cpp
index 6db5f1862..0d366bafc 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;
@@ -681,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
@@ -737,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/src/world.h b/src/world.h
index ea5bcb841..eded8eee2 100644
--- a/src/world.h
+++ b/src/world.h
@@ -45,7 +45,7 @@
//#include "awards.h"
-class QStringList;
+//class QStringList;
enum
{
diff --git a/tests/tst_mainwindow/tst_mainwindow.cpp b/tests/tst_mainwindow/tst_mainwindow.cpp
index 5bfd6ac1e..845818ab8 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");