mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Remove support for Qt4 (part 7)
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									dbed94f12c
								
							
						
					
					
						commit
						e744fc5bba
					
				
					 1 changed files with 1 additions and 15 deletions
				
			
		
							
								
								
									
										16
									
								
								qt-gui.cpp
									
										
									
									
									
								
							
							
						
						
									
										16
									
								
								qt-gui.cpp
									
										
									
									
									
								
							|  | @ -25,26 +25,12 @@ void init_ui(void) | |||
| 	// note: on Linux, "system" == "environment variables"
 | ||||
| 	QNetworkProxyFactory::setUseSystemConfiguration(true); | ||||
| 
 | ||||
| #if QT_VERSION < 0x050000 | ||||
| 	// ask QString in Qt 4 to interpret all char* as UTF-8,
 | ||||
| 	// like Qt 5 does.
 | ||||
| 	// 106 is "UTF-8", this is faster than lookup by name
 | ||||
| 	// [http://www.iana.org/assignments/character-sets/character-sets.xml]
 | ||||
| 	QTextCodec::setCodecForCStrings(QTextCodec::codecForMib(106)); | ||||
| 	// and for reasons I can't understand, I need to do the same again for tr
 | ||||
| 	// even though that clearly uses C strings as well...
 | ||||
| 	QTextCodec::setCodecForTr(QTextCodec::codecForMib(106)); | ||||
| #ifdef Q_OS_WIN | ||||
| 	QFile::setDecodingFunction(decodeUtf8); | ||||
| 	QFile::setEncodingFunction(encodeUtf8); | ||||
| #endif | ||||
| #else | ||||
| 	// for Win32 and Qt5 we try to set the locale codec to UTF-8.
 | ||||
| 	// this makes QFile::encodeName() work.
 | ||||
| #ifdef Q_OS_WIN | ||||
| 	QTextCodec::setCodecForLocale(QTextCodec::codecForMib(106)); | ||||
| #endif | ||||
| #endif | ||||
| 
 | ||||
| 	QCoreApplication::setOrganizationName("Subsurface"); | ||||
| 	QCoreApplication::setOrganizationDomain("subsurface.hohndel.org"); | ||||
| 	QCoreApplication::setApplicationName("Subsurface"); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue