diff --git a/data/Data.h b/data/Data.h index 89a22d50..6c39333b 100644 --- a/data/Data.h +++ b/data/Data.h @@ -119,10 +119,10 @@ class Data : public QObject DxccStatus dxccStatus(int dxcc, const QString &band, const QString &mode); QStringList contestList(); - QStringList propagationModesList() { return propagationModes.values(); } - QStringList propagationModesIDList() { return propagationModes.keys(); } - QString propagationModeTextToID(const QString &propagationText) { return propagationModes.key(propagationText);} - QString propagationModeIDToText(const QString &propagationID) { return propagationModes.value(propagationID);} + QStringList propagationModesList() const { return QStringList{""} + propagationModes.values(); } + QStringList propagationModesIDList() const { return QStringList{""} + propagationModes.keys(); } + QString propagationModeTextToID(const QString &propagationText) const { return propagationModes.key(propagationText);} + QString propagationModeIDToText(const QString &propagationID) const { return propagationModes.value(propagationID);} DxccEntity lookupDxcc(const QString &callsign); DxccEntity lookupDxccID(const int dxccID); SOTAEntity lookupSOTA(const QString &SOTACode); diff --git a/ui/LogbookWidget.cpp b/ui/LogbookWidget.cpp index e67100d6..744f2160 100644 --- a/ui/LogbookWidget.cpp +++ b/ui/LogbookWidget.cpp @@ -122,7 +122,7 @@ LogbookWidget::LogbookWidget(QWidget *parent) : ui->contactTable->setItemDelegateForColumn(LogbookModel::COLUMN_NR_PINGS, new UnitFormatDelegate("", 0, 1, ui->contactTable)); ui->contactTable->setItemDelegateForColumn(LogbookModel::COLUMN_NOTES_INTL, new TextBoxDelegate(this)); ui->contactTable->setItemDelegateForColumn(LogbookModel::COLUMN_NOTES, new TextBoxDelegate(this)); - ui->contactTable->setItemDelegateForColumn(LogbookModel::COLUMN_PROP_MODE, new ComboFormatDelegate(QStringList()<<" "<< Data::instance()->propagationModesIDList(), ui->contactTable)); + ui->contactTable->setItemDelegateForColumn(LogbookModel::COLUMN_PROP_MODE, new ComboFormatDelegate(Data::instance()->propagationModesIDList(), ui->contactTable)); ui->contactTable->setItemDelegateForColumn(LogbookModel::COLUMN_QRZCOM_QSO_UPLOAD_DATE, new DateFormatDelegate()); ui->contactTable->setItemDelegateForColumn(LogbookModel::COLUMN_QRZCOM_QSO_UPLOAD_STATUS, new ComboFormatDelegate(Data::instance()->uploadStatusEnum, ui->contactTable)); ui->contactTable->setItemDelegateForColumn(LogbookModel::COLUMN_QSO_COMPLETE, new ComboFormatDelegate(Data::instance()->qsoCompleteEnum, ui->contactTable)); diff --git a/ui/NewContactWidget.cpp b/ui/NewContactWidget.cpp index 3511b867..e9f286ed 100644 --- a/ui/NewContactWidget.cpp +++ b/ui/NewContactWidget.cpp @@ -172,9 +172,7 @@ NewContactWidget::NewContactWidget(QWidget *parent) : /**********************/ /* Propagation Combo */ /**********************/ - QStringList propagationModeList = Data::instance()->propagationModesList(); - propagationModeList.prepend(""); - QStringListModel* propagationModeModel = new QStringListModel(propagationModeList, this); + QStringListModel* propagationModeModel = new QStringListModel(Data::instance()->propagationModesList(), this); ui->propagationModeEdit->setModel(propagationModeModel); /***************/ diff --git a/ui/QSODetailDialog.cpp b/ui/QSODetailDialog.cpp index 3847e2ff..6f3f7ef1 100644 --- a/ui/QSODetailDialog.cpp +++ b/ui/QSODetailDialog.cpp @@ -242,9 +242,7 @@ QSODetailDialog::QSODetailDialog(const QSqlRecord &qso, ui->qslSentViaBox->addItem(tr("Electronic"), QVariant("E")); /* Propagation */ - QStringList propagationModeList = Data::instance()->propagationModesList(); - propagationModeList.prepend(""); - QStringListModel* propagationModeModel = new QStringListModel(propagationModeList, this); + QStringListModel* propagationModeModel = new QStringListModel(Data::instance()->propagationModesList(), this); ui->propagationModeEdit->setModel(propagationModeModel); /* Sat Modes & sat names */