Ver código fonte

Apply review suggestions

Ivan Savenko 2 anos atrás
pai
commit
67f7e5d042

+ 6 - 6
config/schemas/mod.json

@@ -5,7 +5,7 @@
 	"description" : "Format used to define main mod file (mod.json) in VCMI",
 	"required" : [ "name", "description", "version", "author", "contact", "modType" ],
 	"definitions" : {
-		"localizeable" : {
+		"localizable" : {
 			"type":"object",
 			"additionalProperties" : false,
 			"required" : [ "name", "description", "author", "modType" ],
@@ -114,23 +114,23 @@
 		},
 		
 		"english" : {
-			"$ref" : "#/definitions/localizeable"
+			"$ref" : "#/definitions/localizable"
 		},
 
 		"german" : {
-			"$ref" : "#/definitions/localizeable"
+			"$ref" : "#/definitions/localizable"
 		},
 
 		"polish" : {
-			"$ref" : "#/definitions/localizeable"
+			"$ref" : "#/definitions/localizable"
 		},
 
 		"russian" : {
-			"$ref" : "#/definitions/localizeable"
+			"$ref" : "#/definitions/localizable"
 		},
 
 		"ukrainian" : {
-			"$ref" : "#/definitions/localizeable"
+			"$ref" : "#/definitions/localizable"
 		},
 
 		"artifacts": {

+ 2 - 2
launcher/settingsView/csettingsview_moc.cpp

@@ -323,8 +323,8 @@ void CSettingsView::on_comboBoxLanguage_currentIndexChanged(int index)
 	Settings node = settings.write["general"]["language"];
 	node->String() = languageTagList[index];
 
-	if ( qApp->activeWindow() && dynamic_cast<MainWindow*>(qApp->activeWindow()) )
-		dynamic_cast<MainWindow*>(qApp->activeWindow())->updateTranslation();
+	if ( auto mainWindow = dynamic_cast<MainWindow*>(qApp->activeWindow()) )
+		mainWindow->updateTranslation();
 }
 
 void CSettingsView::changeEvent(QEvent *event)