mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-17 23:28:50 -05:00
Unexplained segfault when saving Presets.
This commit is contained in:
parent
333976fa6d
commit
b41e83e0ad
@ -53,16 +53,19 @@ void ScopeWindow::resetToDefaults()
|
||||
QByteArray ScopeWindow::serialize() const
|
||||
{
|
||||
SimpleSerializer s(1);
|
||||
#if 0
|
||||
s.writeS32(1, m_displayData);
|
||||
s.writeS32(2, m_displayOrientation);
|
||||
s.writeS32(3, m_timeBase);
|
||||
s.writeS32(4, m_timeOffset);
|
||||
s.writeS32(5, m_amplification);
|
||||
#endif
|
||||
return s.final();
|
||||
}
|
||||
|
||||
bool ScopeWindow::deserialize(const QByteArray& data)
|
||||
{
|
||||
#if 0
|
||||
SimpleDeserializer d(data);
|
||||
|
||||
if(!d.isValid()) {
|
||||
@ -84,6 +87,10 @@ bool ScopeWindow::deserialize(const QByteArray& data)
|
||||
resetToDefaults();
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
resetToDefaults();
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
void ScopeWindow::on_amp_valueChanged(int value)
|
||||
|
@ -13,8 +13,8 @@ void Preset::resetToDefaults()
|
||||
m_centerFrequency = 0;
|
||||
m_spectrumConfig.clear();
|
||||
m_scopeConfig.clear();
|
||||
m_dcOffsetCorrection = true;
|
||||
m_iqImbalanceCorrection = true;
|
||||
m_dcOffsetCorrection = false;
|
||||
m_iqImbalanceCorrection = false;
|
||||
m_showScope = true;
|
||||
m_layout.clear();
|
||||
m_spectrumConfig.clear();
|
||||
@ -64,8 +64,8 @@ bool Preset::deserialize(const QByteArray& data)
|
||||
d.readBool(4, &m_showScope, true);
|
||||
d.readBlob(5, &m_layout);
|
||||
d.readBlob(6, &m_spectrumConfig);
|
||||
d.readBool(7, &m_dcOffsetCorrection, true);
|
||||
d.readBool(8, &m_iqImbalanceCorrection, true);
|
||||
d.readBool(7, &m_dcOffsetCorrection, false);
|
||||
d.readBool(8, &m_iqImbalanceCorrection, false);
|
||||
d.readBlob(9, &m_scopeConfig);
|
||||
d.readString(10, &m_source);
|
||||
d.readBlob(11, &m_sourceGeneralConfig);
|
||||
|
Loading…
Reference in New Issue
Block a user