From 9588d533272439103c82378315e763f01543b2a2 Mon Sep 17 00:00:00 2001 From: f4exb Date: Wed, 31 Jul 2019 23:56:23 +0200 Subject: [PATCH] Removed obsolete fields of Preferences class --- sdrbase/settings/preferences.cpp | 3 --- sdrbase/settings/preferences.h | 7 ++----- swagger/sdrangel/api/swagger/include/Preferences.yaml | 8 ++++---- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/sdrbase/settings/preferences.cpp b/sdrbase/settings/preferences.cpp index 467444245..98b6ca284 100644 --- a/sdrbase/settings/preferences.cpp +++ b/sdrbase/settings/preferences.cpp @@ -8,7 +8,6 @@ Preferences::Preferences() void Preferences::resetToDefaults() { - m_sourceType.clear(); m_sourceDevice.clear(); m_audioType.clear(); m_audioDevice.clear(); @@ -24,7 +23,6 @@ void Preferences::resetToDefaults() QByteArray Preferences::serialize() const { SimpleSerializer s(1); - s.writeString(1, m_sourceType); s.writeString(2, m_sourceDevice); s.writeString(3, m_audioType); s.writeString(4, m_audioDevice); @@ -51,7 +49,6 @@ bool Preferences::deserialize(const QByteArray& data) if(d.getVersion() == 1) { - d.readString(1, &m_sourceType); d.readString(2, &m_sourceDevice); d.readString(3, &m_audioType); d.readString(4, &m_audioDevice); diff --git a/sdrbase/settings/preferences.h b/sdrbase/settings/preferences.h index 5fef43012..cf8d72b96 100644 --- a/sdrbase/settings/preferences.h +++ b/sdrbase/settings/preferences.h @@ -13,8 +13,6 @@ public: QByteArray serialize() const; bool deserialize(const QByteArray& data); - void setSourceType(const QString& value) { m_sourceType = value; } - const QString& getSourceType() const { return m_sourceType; } void setSourceDevice(const QString& value) { m_sourceDevice= value; } const QString& getSourceDevice() const { return m_sourceDevice; } void setSourceIndex(const int value) { m_sourceIndex = value; } @@ -40,9 +38,8 @@ public: const QString& getLogFileName() const { return m_logFileName; } protected: - QString m_sourceType; - QString m_sourceDevice; - int m_sourceIndex; + QString m_sourceDevice; //!< Identification of the source used in R0 tab (GUI flavor) at startup + int m_sourceIndex; //!< Index of the source used in R0 tab (GUI flavor) at startup QString m_audioType; QString m_audioDevice; diff --git a/swagger/sdrangel/api/swagger/include/Preferences.yaml b/swagger/sdrangel/api/swagger/include/Preferences.yaml index 96b1c9289..271ddd6f3 100644 --- a/swagger/sdrangel/api/swagger/include/Preferences.yaml +++ b/swagger/sdrangel/api/swagger/include/Preferences.yaml @@ -1,16 +1,16 @@ Preferences: description: Repreents a Prefernce object properties: - sourceType: - type: string sourceDevice: + description: Identification of the source used in R0 tab (GUI flavor) at startup type: string + sourceIndex: + description: Index of the source used in R0 tab (GUI flavor) at startup + type: integer audioType: type: string audioDevice: type: string - sourceIndex: - type: integer latitude: type: number format: float