From fbdb72ceb4589a3ae94358e11205a5c309e31ea8 Mon Sep 17 00:00:00 2001 From: f4exb Date: Wed, 31 Jul 2019 23:33:22 +0200 Subject: [PATCH] Removed obsolete fields of Preset class --- sdrbase/resources/webapi/doc/html2/index.html | 11 +-- .../webapi/doc/swagger/include/Preset.yaml | 6 -- sdrbase/settings/preset.cpp | 2 - sdrbase/settings/preset.h | 5 -- .../sdrangel/api/swagger/include/Preset.yaml | 6 -- swagger/sdrangel/code/html2/index.html | 11 +-- .../sdrangel/code/qt5/client/SWGPreset.cpp | 67 ------------------- swagger/sdrangel/code/qt5/client/SWGPreset.h | 18 ----- 8 files changed, 2 insertions(+), 124 deletions(-) diff --git a/sdrbase/resources/webapi/doc/html2/index.html b/sdrbase/resources/webapi/doc/html2/index.html index 82af98929..bea0b2ace 100644 --- a/sdrbase/resources/webapi/doc/html2/index.html +++ b/sdrbase/resources/webapi/doc/html2/index.html @@ -4408,15 +4408,6 @@ margin-bottom: 20px; "type" : "integer", "description" : "boolean" }, - "sourceId" : { - "type" : "string" - }, - "sourceSerial" : { - "type" : "string" - }, - "sourceSequence" : { - "type" : "integer" - }, "channelConfigs" : { "type" : "array", "items" : { @@ -26969,7 +26960,7 @@ except ApiException as e:
- Generated 2019-07-31T22:51:22.964+02:00 + Generated 2019-07-31T23:30:54.359+02:00
diff --git a/sdrbase/resources/webapi/doc/swagger/include/Preset.yaml b/sdrbase/resources/webapi/doc/swagger/include/Preset.yaml index b2a9faa86..9d70461af 100644 --- a/sdrbase/resources/webapi/doc/swagger/include/Preset.yaml +++ b/sdrbase/resources/webapi/doc/swagger/include/Preset.yaml @@ -43,12 +43,6 @@ Preset: iqImbalanceCorrection: description: boolean type: integer - sourceId: - type: string - sourceSerial: - type: string - sourceSequence: - type: integer channelConfigs: type: array items: diff --git a/sdrbase/settings/preset.cpp b/sdrbase/settings/preset.cpp index 7f8672c02..d5f99a2ff 100644 --- a/sdrbase/settings/preset.cpp +++ b/sdrbase/settings/preset.cpp @@ -17,10 +17,8 @@ void Preset::resetToDefaults() m_spectrumConfig.clear(); m_layout.clear(); m_channelConfigs.clear(); - m_sourceId.clear(); m_dcOffsetCorrection = false; m_iqImbalanceCorrection = false; - m_sourceSequence = 0; } QByteArray Preset::serialize() const diff --git a/sdrbase/settings/preset.h b/sdrbase/settings/preset.h index 9d5c03aa5..c10b00830 100644 --- a/sdrbase/settings/preset.h +++ b/sdrbase/settings/preset.h @@ -113,11 +113,6 @@ protected: bool m_dcOffsetCorrection; bool m_iqImbalanceCorrection; - // sample source and sample source configuration TODO: obsolete? - QString m_sourceId; - QString m_sourceSerial; - int m_sourceSequence; - // channels and configurations ChannelConfigs m_channelConfigs; diff --git a/swagger/sdrangel/api/swagger/include/Preset.yaml b/swagger/sdrangel/api/swagger/include/Preset.yaml index 7d5f287e3..7a99bcd1d 100644 --- a/swagger/sdrangel/api/swagger/include/Preset.yaml +++ b/swagger/sdrangel/api/swagger/include/Preset.yaml @@ -43,12 +43,6 @@ Preset: iqImbalanceCorrection: description: boolean type: integer - sourceId: - type: string - sourceSerial: - type: string - sourceSequence: - type: integer channelConfigs: type: array items: diff --git a/swagger/sdrangel/code/html2/index.html b/swagger/sdrangel/code/html2/index.html index 82af98929..bea0b2ace 100644 --- a/swagger/sdrangel/code/html2/index.html +++ b/swagger/sdrangel/code/html2/index.html @@ -4408,15 +4408,6 @@ margin-bottom: 20px; "type" : "integer", "description" : "boolean" }, - "sourceId" : { - "type" : "string" - }, - "sourceSerial" : { - "type" : "string" - }, - "sourceSequence" : { - "type" : "integer" - }, "channelConfigs" : { "type" : "array", "items" : { @@ -26969,7 +26960,7 @@ except ApiException as e:
- Generated 2019-07-31T22:51:22.964+02:00 + Generated 2019-07-31T23:30:54.359+02:00
diff --git a/swagger/sdrangel/code/qt5/client/SWGPreset.cpp b/swagger/sdrangel/code/qt5/client/SWGPreset.cpp index 47e73b725..178b3eae4 100644 --- a/swagger/sdrangel/code/qt5/client/SWGPreset.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGPreset.cpp @@ -42,12 +42,6 @@ SWGPreset::SWGPreset() { m_dc_offset_correction_isSet = false; iq_imbalance_correction = 0; m_iq_imbalance_correction_isSet = false; - source_id = nullptr; - m_source_id_isSet = false; - source_serial = nullptr; - m_source_serial_isSet = false; - source_sequence = 0; - m_source_sequence_isSet = false; channel_configs = nullptr; m_channel_configs_isSet = false; device_configs = nullptr; @@ -76,12 +70,6 @@ SWGPreset::init() { m_dc_offset_correction_isSet = false; iq_imbalance_correction = 0; m_iq_imbalance_correction_isSet = false; - source_id = new QString(""); - m_source_id_isSet = false; - source_serial = new QString(""); - m_source_serial_isSet = false; - source_sequence = 0; - m_source_sequence_isSet = false; channel_configs = new QList(); m_channel_configs_isSet = false; device_configs = new QList(); @@ -105,13 +93,6 @@ SWGPreset::cleanup() { } - if(source_id != nullptr) { - delete source_id; - } - if(source_serial != nullptr) { - delete source_serial; - } - if(channel_configs != nullptr) { auto arr = channel_configs; for(auto o: *arr) { @@ -156,12 +137,6 @@ SWGPreset::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(&iq_imbalance_correction, pJson["iqImbalanceCorrection"], "qint32", ""); - ::SWGSDRangel::setValue(&source_id, pJson["sourceId"], "QString", "QString"); - - ::SWGSDRangel::setValue(&source_serial, pJson["sourceSerial"], "QString", "QString"); - - ::SWGSDRangel::setValue(&source_sequence, pJson["sourceSequence"], "qint32", ""); - ::SWGSDRangel::setValue(&channel_configs, pJson["channelConfigs"], "QList", "SWGChannelConfig"); @@ -205,15 +180,6 @@ SWGPreset::asJsonObject() { if(m_iq_imbalance_correction_isSet){ obj->insert("iqImbalanceCorrection", QJsonValue(iq_imbalance_correction)); } - if(source_id != nullptr && *source_id != QString("")){ - toJsonValue(QString("sourceId"), source_id, obj, QString("QString")); - } - if(source_serial != nullptr && *source_serial != QString("")){ - toJsonValue(QString("sourceSerial"), source_serial, obj, QString("QString")); - } - if(m_source_sequence_isSet){ - obj->insert("sourceSequence", QJsonValue(source_sequence)); - } if(channel_configs->size() > 0){ toJsonArray((QList*)channel_configs, obj, "channelConfigs", "SWGChannelConfig"); } @@ -297,36 +263,6 @@ SWGPreset::setIqImbalanceCorrection(qint32 iq_imbalance_correction) { this->m_iq_imbalance_correction_isSet = true; } -QString* -SWGPreset::getSourceId() { - return source_id; -} -void -SWGPreset::setSourceId(QString* source_id) { - this->source_id = source_id; - this->m_source_id_isSet = true; -} - -QString* -SWGPreset::getSourceSerial() { - return source_serial; -} -void -SWGPreset::setSourceSerial(QString* source_serial) { - this->source_serial = source_serial; - this->m_source_serial_isSet = true; -} - -qint32 -SWGPreset::getSourceSequence() { - return source_sequence; -} -void -SWGPreset::setSourceSequence(qint32 source_sequence) { - this->source_sequence = source_sequence; - this->m_source_sequence_isSet = true; -} - QList* SWGPreset::getChannelConfigs() { return channel_configs; @@ -369,9 +305,6 @@ SWGPreset::isSet(){ if(m_spectrum_config != nullptr && m_spectrum_config->isSet()){ isObjectUpdated = true; break;} if(m_dc_offset_correction_isSet){ isObjectUpdated = true; break;} if(m_iq_imbalance_correction_isSet){ isObjectUpdated = true; break;} - if(source_id != nullptr && *source_id != QString("")){ isObjectUpdated = true; break;} - if(source_serial != nullptr && *source_serial != QString("")){ isObjectUpdated = true; break;} - if(m_source_sequence_isSet){ isObjectUpdated = true; break;} if(channel_configs->size() > 0){ isObjectUpdated = true; break;} if(device_configs->size() > 0){ isObjectUpdated = true; break;} if(layout != nullptr && *layout != QString("")){ isObjectUpdated = true; break;} diff --git a/swagger/sdrangel/code/qt5/client/SWGPreset.h b/swagger/sdrangel/code/qt5/client/SWGPreset.h index 9537d2f85..ab4803902 100644 --- a/swagger/sdrangel/code/qt5/client/SWGPreset.h +++ b/swagger/sdrangel/code/qt5/client/SWGPreset.h @@ -67,15 +67,6 @@ public: qint32 getIqImbalanceCorrection(); void setIqImbalanceCorrection(qint32 iq_imbalance_correction); - QString* getSourceId(); - void setSourceId(QString* source_id); - - QString* getSourceSerial(); - void setSourceSerial(QString* source_serial); - - qint32 getSourceSequence(); - void setSourceSequence(qint32 source_sequence); - QList* getChannelConfigs(); void setChannelConfigs(QList* channel_configs); @@ -110,15 +101,6 @@ private: qint32 iq_imbalance_correction; bool m_iq_imbalance_correction_isSet; - QString* source_id; - bool m_source_id_isSet; - - QString* source_serial; - bool m_source_serial_isSet; - - qint32 source_sequence; - bool m_source_sequence_isSet; - QList* channel_configs; bool m_channel_configs_isSet;