 Skycoder42
					
					7 years ago
						Skycoder42
					
					7 years ago
					
				 
				
			 
		 
		
			
				
					
					No known key found for this signature in database
					
						
							GPG Key ID: 8E01AD9EF0578D2B
						
					
				
			
		
		
		
	
		
			
				 6 changed files with 
7 additions and 
1 deletions
			 
			
		 
		
			
				- 
					
					
					 
					tools/settingsgenerator/cppsettingsgenerator.cpp
				
- 
					
					
					 
					tools/settingsgenerator/cppsettingsgenerator.h
				
- 
					
					
					 
					tools/settingsgenerator/qmlsettingsgenerator.cpp
				
- 
					
					
					 
					tools/settingsgenerator/qmlsettingsgenerator.h
				
- 
					
					
					 
					tools/settingsgenerator/settingsgeneratorimpl.h
				
- 
					
					
					 
					tools/settingsgenerator/settingstranslator.cpp
				
				
				
					
						
							
								
									
	
		
			
				
					|  |  | @ -23,11 +23,13 @@ void CppSettingsGenerator::process(const QString &inPath) | 
			
		
	
		
			
				
					|  |  |  | 	if(!_hdrFile.open(QIODevice::WriteOnly | QIODevice::Text)) | 
			
		
	
		
			
				
					|  |  |  | 		throw FileException{_hdrFile}; | 
			
		
	
		
			
				
					|  |  |  | 	writeHeader(settings); | 
			
		
	
		
			
				
					|  |  |  | 	_hdr.flush(); | 
			
		
	
		
			
				
					|  |  |  | 	_hdrFile.close(); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 	if(!_srcFile.open(QIODevice::WriteOnly | QIODevice::Text)) | 
			
		
	
		
			
				
					|  |  |  | 		throw FileException{_srcFile}; | 
			
		
	
		
			
				
					|  |  |  | 	writeSource(settings); | 
			
		
	
		
			
				
					|  |  |  | 	_src.flush(); | 
			
		
	
		
			
				
					|  |  |  | 	_srcFile.close(); | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  | 
 | 
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
			
				
					|  |  | @ -2,6 +2,7 @@ | 
			
		
	
		
			
				
					|  |  |  | #define CPPSETTINGSGENERATOR_H | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | #include "settingsgeneratorimpl.h" | 
			
		
	
		
			
				
					|  |  |  | #include <QTextStream> | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | class CppSettingsGenerator : public SettingsGeneratorImpl | 
			
		
	
		
			
				
					|  |  |  | { | 
			
		
	
	
		
			
				
					|  |  | 
 | 
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
			
				
					|  |  | @ -24,11 +24,13 @@ void QmlSettingsGenerator::process(const QString &inPath) | 
			
		
	
		
			
				
					|  |  |  | 	if(!_hdrFile.open(QIODevice::WriteOnly | QIODevice::Text)) | 
			
		
	
		
			
				
					|  |  |  | 		throw FileException{_hdrFile}; | 
			
		
	
		
			
				
					|  |  |  | 	auto typeNum = writeHeader(settings, QFileInfo{inPath}.completeBaseName() + QStringLiteral(".h")); | 
			
		
	
		
			
				
					|  |  |  | 	_hdr.flush(); | 
			
		
	
		
			
				
					|  |  |  | 	_hdrFile.close(); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 	if(!_srcFile.open(QIODevice::WriteOnly | QIODevice::Text)) | 
			
		
	
		
			
				
					|  |  |  | 		throw FileException{_srcFile}; | 
			
		
	
		
			
				
					|  |  |  | 	writeSource(settings, typeNum); | 
			
		
	
		
			
				
					|  |  |  | 	_src.flush(); | 
			
		
	
		
			
				
					|  |  |  | 	_srcFile.close(); | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  | 
 | 
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
			
				
					|  |  | @ -4,6 +4,7 @@ | 
			
		
	
		
			
				
					|  |  |  | #include "settingsgeneratorimpl.h" | 
			
		
	
		
			
				
					|  |  |  | #include <tuple> | 
			
		
	
		
			
				
					|  |  |  | #include <QSet> | 
			
		
	
		
			
				
					|  |  |  | #include <QTextStream> | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | class QmlSettingsGenerator : public SettingsGeneratorImpl | 
			
		
	
		
			
				
					|  |  |  | { | 
			
		
	
	
		
			
				
					|  |  | 
 | 
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
			
				
					|  |  | @ -2,7 +2,6 @@ | 
			
		
	
		
			
				
					|  |  |  | #define SETTINGSGENERATOR_H | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | #include <QFile> | 
			
		
	
		
			
				
					|  |  |  | #include <QTextStream> | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | #include "qsettingsgenerator.h" | 
			
		
	
		
			
				
					|  |  |  | #include "settingsconfigimpl_p.h" | 
			
		
	
	
		
			
				
					|  |  | 
 | 
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
			
				
					|  |  | @ -51,6 +51,7 @@ void SettingsTranslator::writeTranslations(const SettingsConfigType &settings, c | 
			
		
	
		
			
				
					|  |  |  | 	_src << "}\n\n" | 
			
		
	
		
			
				
					|  |  |  | 		 << "}\n"; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 	_src.flush(); | 
			
		
	
		
			
				
					|  |  |  | 	_srcFile.close(); | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  | 
 |