mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Cleanup: Implicitly free QApplication
Instead of deleting the Application explicitly in exit_ui(), use a unique_ptr to have the instance automatically freed. This is the pattern given in the Qt-docs: https://doc.qt.io/qt-5/qapplication.html Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
		
							parent
							
								
									1e1f33c0f5
								
							
						
					
					
						commit
						7343fe4cc6
					
				
					 3 changed files with 2 additions and 4 deletions
				
			
		|  | @ -43,7 +43,7 @@ int main(int argc, char **argv) | |||
| 	int i; | ||||
| 	bool no_filenames = true; | ||||
| 	QLoggingCategory::setFilterRules(QStringLiteral("qt.bluetooth* = true")); | ||||
| 	new QApplication(argc, argv); | ||||
| 	std::unique_ptr<QApplication> app(new QApplication(argc, argv)); | ||||
| 	QStringList files; | ||||
| 	QStringList importedFiles; | ||||
| 	QStringList arguments = QCoreApplication::arguments(); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue