Fixed compilation under windows/qt5

Wed, 10 Jul 2013 02:17:23 +0300

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Wed, 10 Jul 2013 02:17:23 +0300
changeset 373
91bea18bd77a
parent 372
95f0ffd128ff
child 374
6c30af56af11

Fixed compilation under windows/qt5

src/configDialog.cpp file | annotate | diff | comparison | revisions
src/file.cpp file | annotate | diff | comparison | revisions
src/main.cpp file | annotate | diff | comparison | revisions
src/misc.cpp file | annotate | diff | comparison | revisions
--- a/src/configDialog.cpp	Wed Jul 10 01:53:33 2013 +0300
+++ b/src/configDialog.cpp	Wed Jul 10 02:17:23 2013 +0300
@@ -645,7 +645,10 @@
 		for( const extProgInfo & info : g_extProgInfo )
 		{
 			*info.path = info.input->text();
+			
+#ifndef _WIN32
 			*info.wine = info.wineBox->isChecked();
+#endif // _WIN32
 		}
 		
 		// Save the config
--- a/src/file.cpp	Wed Jul 10 01:53:33 2013 +0300
+++ b/src/file.cpp	Wed Jul 10 02:17:23 2013 +0300
@@ -626,10 +626,10 @@
 		return new LDEmpty;
 	}
 	
-	if( tokens[0].length() != 1 )
-		return new LDGibberish (line, "Illogical line code");
+	if( tokens[0].length() != 1 || tokens[0][0].isDigit() == false )
+		return new LDGibberish( line, "Illogical line code" );
 	
-	int num = tokens[0][0].toAscii() - '0';
+	int num = tokens[0][0].digitValue();
 	switch( num )
 	{
 	case 0:
--- a/src/main.cpp	Wed Jul 10 01:53:33 2013 +0300
+++ b/src/main.cpp	Wed Jul 10 02:17:23 2013 +0300
@@ -52,8 +52,8 @@
 		doPrint (g_file_stdout, args);
 	elif (fp == stderr)
 		doPrint (g_file_stderr, args);
-	
-	fatal ("unknown FILE* argument");
+	else
+		fatal ("unknown FILE* argument");
 }
 
 // =============================================================================
--- a/src/misc.cpp	Wed Jul 10 01:53:33 2013 +0300
+++ b/src/misc.cpp	Wed Jul 10 02:17:23 2013 +0300
@@ -294,7 +294,7 @@
 	char* bufptr = &buf[0];
 	
 	for( qchar& c : val )
-		*bufptr++ = c.toAscii();
+		*bufptr++ = c.toLatin1();
 	*bufptr = '\0';
 	
 	double fval = atof( buf );

mercurial