Repository: godotengine/godot
File: editor/project_settings_editor.cpp (C++)

Code before:
	type_box->select(type_box->get_item_index(p_type));
}

String ProjectSettingsEditor::_get_setting_name() const {
	String name = property_box->get_text().strip_edges();
	if (name.find("/") == -1) {
		name = "global/" + name;
	}
	return name;
}

void ProjectSettingsEditor::_add_feature_overrides() {
	Set<String> presets;

	presets.insert("bptc");
	presets.insert("s3tc");
	presets.insert("etc");
	presets.insert("etc2");
	presets.insert("pvrtc");
	presets.insert("debug");
	presets.insert("release");
	presets.insert("editor");
	presets.insert("standalone");
	presets.insert("32");
	presets.insert("64");
	presets.insert("Server"); // Not available as an export platform yet, so it needs to be added manually

	EditorExport *ee = EditorExport::get_singleton();

	for (int i = 0; i < ee->get_export_platform_count(); i++) {
		List<String> p;
		ee->get_export_platform(i)->get_platform_features(&p);
		for (const String &E : p) {
			presets.insert(E);
		}
	}

	for (int i = 0; i < ee->get_export_preset_count(); i++) {
		List<String> p;
		ee->get_export_preset(i)->get_platform()->get_preset_features(ee->get_export_preset(i), &p);
		for (const String &E : p) {
			presets.insert(E);
		}

		String custom = ee->get_export_preset(i)->get_custom_features();
		Vector<String> custom_list = custom.split(",");
		for (int j = 0; j < custom_list.size(); j++) {
			String f = custom_list[j].strip_edges();
			if (f != String()) {
				presets.insert(f);
			}

Review comment (suggestion):
I'm not fond of hardcoding those here. They should be registered by the `linuxbsd` platform code if relevant. They're not directly related to this PR though so I'd probably leave them out here and make another PR to assess whether they're wanted and how to include them (for example just "bsd" in itself is maybe not so useful, as different *BSD OSes are more significantly different from each other than say Linux distros).

Code after:
	type_box->select(type_box->get_item_index(p_type));
}

String ProjectSettingsEditor::_get_setting_name() const {
	String name = property_box->get_text().strip_edges();
	if (name.find("/") == -1) {
		name = "global/" + name;
	}
	return name;
}

void ProjectSettingsEditor::_add_feature_overrides() {
	Set<String> presets;

	presets.insert("bptc");
	presets.insert("s3tc");
	presets.insert("etc");
	presets.insert("etc2");
	presets.insert("pvrtc");
	presets.insert("debug");
	presets.insert("release");
	presets.insert("editor");
	presets.insert("standalone");
	presets.insert("32");
	presets.insert("64");

	EditorExport *ee = EditorExport::get_singleton();

	for (int i = 0; i < ee->get_export_platform_count(); i++) {
		List<String> p;
		ee->get_export_platform(i)->get_platform_features(&p);
		for (const String &E : p) {
			presets.insert(E);
		}
	}

	for (int i = 0; i < ee->get_export_preset_count(); i++) {
		List<String> p;
		ee->get_export_preset(i)->get_platform()->get_preset_features(ee->get_export_preset(i), &p);
		for (const String &E : p) {
			presets.insert(E);
		}

		String custom = ee->get_export_preset(i)->get_custom_features();
		Vector<String> custom_list = custom.split(",");
		for (int j = 0; j < custom_list.size(); j++) {
			String f = custom_list[j].strip_edges();
			if (f != String()) {
				presets.insert(f);
			}
		}