mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	mobile: fix broken undo stack initialization
We would dereference the undoAction before the command infrastructure was initialized which led to a crash in the mobile app. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									56068f51cb
								
							
						
					
					
						commit
						ccda4f557c
					
				
					 1 changed files with 1 additions and 2 deletions
				
			
		|  | @ -207,13 +207,11 @@ QMLManager::QMLManager() : | |||
| 	m_initialized(false), | ||||
| 	m_pluggedInDeviceName(""), | ||||
| 	m_showNonDiveComputers(false), | ||||
| 	undoAction(Command::undoAction(this)), | ||||
| 	m_oldStatus(qPrefCloudStorage::CS_UNKNOWN) | ||||
| { | ||||
| 	m_instance = this; | ||||
| 	m_lastDevicePixelRatio = qApp->devicePixelRatio(); | ||||
| 	timer.start(); | ||||
| 
 | ||||
| 	// make upload signals available in QML
 | ||||
| 	// Remark: signal - signal connect
 | ||||
| 	connect(uploadDiveLogsDE::instance(), &uploadDiveLogsDE::uploadFinish, | ||||
|  | @ -334,6 +332,7 @@ QMLManager::QMLManager() : | |||
| 
 | ||||
| 	// setup Command infrastructure
 | ||||
| 	Command::init(); | ||||
| 	undoAction = Command::undoAction(this); | ||||
| } | ||||
| 
 | ||||
| void QMLManager::applicationStateChanged(Qt::ApplicationState state) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue