mirror of
				https://github.com/f4exb/sdrangel.git
				synced 2025-10-30 12:30:20 -04: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 | QByteArray ScopeWindow::serialize() const | ||||||
| { | { | ||||||
| 	SimpleSerializer s(1); | 	SimpleSerializer s(1); | ||||||
|  | #if 0 | ||||||
| 	s.writeS32(1, m_displayData); | 	s.writeS32(1, m_displayData); | ||||||
| 	s.writeS32(2, m_displayOrientation); | 	s.writeS32(2, m_displayOrientation); | ||||||
| 	s.writeS32(3, m_timeBase); | 	s.writeS32(3, m_timeBase); | ||||||
| 	s.writeS32(4, m_timeOffset); | 	s.writeS32(4, m_timeOffset); | ||||||
| 	s.writeS32(5, m_amplification); | 	s.writeS32(5, m_amplification); | ||||||
|  | #endif | ||||||
| 	return s.final(); | 	return s.final(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| bool ScopeWindow::deserialize(const QByteArray& data) | bool ScopeWindow::deserialize(const QByteArray& data) | ||||||
| { | { | ||||||
|  | #if 0 | ||||||
| 	SimpleDeserializer d(data); | 	SimpleDeserializer d(data); | ||||||
| 
 | 
 | ||||||
| 	if(!d.isValid()) { | 	if(!d.isValid()) { | ||||||
| @ -84,6 +87,10 @@ bool ScopeWindow::deserialize(const QByteArray& data) | |||||||
| 		resetToDefaults(); | 		resetToDefaults(); | ||||||
| 		return false; | 		return false; | ||||||
| 	} | 	} | ||||||
|  | #else | ||||||
|  | 	resetToDefaults(); | ||||||
|  | 	return false; | ||||||
|  | #endif | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void ScopeWindow::on_amp_valueChanged(int value) | void ScopeWindow::on_amp_valueChanged(int value) | ||||||
|  | |||||||
| @ -13,8 +13,8 @@ void Preset::resetToDefaults() | |||||||
| 	m_centerFrequency = 0; | 	m_centerFrequency = 0; | ||||||
| 	m_spectrumConfig.clear(); | 	m_spectrumConfig.clear(); | ||||||
| 	m_scopeConfig.clear(); | 	m_scopeConfig.clear(); | ||||||
| 	m_dcOffsetCorrection = true; | 	m_dcOffsetCorrection = false; | ||||||
| 	m_iqImbalanceCorrection = true; | 	m_iqImbalanceCorrection = false; | ||||||
| 	m_showScope = true; | 	m_showScope = true; | ||||||
| 	m_layout.clear(); | 	m_layout.clear(); | ||||||
| 	m_spectrumConfig.clear(); | 	m_spectrumConfig.clear(); | ||||||
| @ -64,8 +64,8 @@ bool Preset::deserialize(const QByteArray& data) | |||||||
| 		d.readBool(4, &m_showScope, true); | 		d.readBool(4, &m_showScope, true); | ||||||
| 		d.readBlob(5, &m_layout); | 		d.readBlob(5, &m_layout); | ||||||
| 		d.readBlob(6, &m_spectrumConfig); | 		d.readBlob(6, &m_spectrumConfig); | ||||||
| 		d.readBool(7, &m_dcOffsetCorrection, true); | 		d.readBool(7, &m_dcOffsetCorrection, false); | ||||||
| 		d.readBool(8, &m_iqImbalanceCorrection, true); | 		d.readBool(8, &m_iqImbalanceCorrection, false); | ||||||
| 		d.readBlob(9, &m_scopeConfig); | 		d.readBlob(9, &m_scopeConfig); | ||||||
| 		d.readString(10, &m_source); | 		d.readString(10, &m_source); | ||||||
| 		d.readBlob(11, &m_sourceGeneralConfig); | 		d.readBlob(11, &m_sourceGeneralConfig); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user