mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	cleanup: move initialization of ThemeInterface
The ThemeInterface was initialized and connected to QML in the register_qml_types() function. However, it is not a type. Move the initialization to a place where we create the other global QML objects. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
		
							parent
							
								
									9d485f9626
								
							
						
					
					
						commit
						2db6b16a70
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -110,6 +110,7 @@ void run_ui()
 | 
			
		|||
 | 
			
		||||
	ctxt->setContextProperty("connectionListModel", &connectionListModel);
 | 
			
		||||
	ctxt->setContextProperty("logModel", MessageHandlerModel::self());
 | 
			
		||||
	ctxt->setContextProperty("subsurfaceTheme", ThemeInterface::instance());
 | 
			
		||||
 | 
			
		||||
	qmlRegisterUncreatableType<QMLManager>("org.subsurfacedivelog.mobile",1,0,"ExportType","Enum is not a type");
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -199,7 +200,6 @@ void register_qml_types(QQmlEngine *engine)
 | 
			
		|||
 | 
			
		||||
		// Register qml interface classes
 | 
			
		||||
		QMLInterface::setup(ct);
 | 
			
		||||
		ct->setContextProperty("subsurfaceTheme", ThemeInterface::instance());
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	REGISTER_TYPE(QMLManager, "QMLManager");
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue