From 1712c610bb9d21a2cb33963a379b4cc969a11758 Mon Sep 17 00:00:00 2001 From: alb3rto Date: Sat, 21 Feb 2026 01:09:29 +0100 Subject: [PATCH] [macOS] Remove QEMU arguments table from settings (#7604) Remove the read-only QEMU arguments table and editing controls as they caused user confusion around whether arguments were editable. Retain the "Export QEMU Command" debug button since the exported output and debug.log serve the actual debugging use case. --- .../macOS/VMConfigQEMUArgumentsView.swift | 96 +++---------------- 1 file changed, 13 insertions(+), 83 deletions(-) diff --git a/Platform/macOS/VMConfigQEMUArgumentsView.swift b/Platform/macOS/VMConfigQEMUArgumentsView.swift index 196ac3ffb..563a9b100 100644 --- a/Platform/macOS/VMConfigQEMUArgumentsView.swift +++ b/Platform/macOS/VMConfigQEMUArgumentsView.swift @@ -57,91 +57,21 @@ struct VMConfigQEMUArgumentsView: View { var body: some View { VStack { - Table(of: QEMUArgument.self, selection: $selected) { - TableColumn("Arguments") { arg in - let customSelected = selected.intersection(customUuids) - if fixedUuids.contains(arg.id) || customSelected.count > 1 || !customSelected.contains(arg.id) { - Text(arg.string) - .foregroundColor(fixedUuids.contains(arg.id) ? .secondary : .primary) - .textSelection(.enabled) - } else { - TextField("", text: $selectedArgument.string) - .focused($focused, equals: arg.id) - .onSubmit(of: .text) { - if let index = config.additionalArguments.firstIndex(of: arg) { - config.additionalArguments[index] = selectedArgument - } - } - } - } - } rows: { - ForEach(fixedArguments) { arg in - TableRow(arg) - } - ForEach(config.additionalArguments) { arg in - TableRow(arg) - } - }.onChange(of: selected) { newValue in - // save changes to last selected argument - if let index = config.additionalArguments.firstIndex(where: { $0.id == selectedArgument.id }) { - config.additionalArguments[index] = selectedArgument - selectedArgument = .init("") - } - // get new selected argument - if let selectedId = selected.intersection(customUuids).first { - if let arg = config.additionalArguments.first(where: { $0.id == selectedId }) { - selectedArgument = arg - } - } - } Spacer() - HStack { - Button { - showExportArgs.toggle() - } label: { - Text("Export QEMU Command…") - }.help("Export all arguments as a text file. This is only for debugging purposes as UTM's built-in QEMU differs from upstream QEMU in supported arguments.") - Spacer() - let customSelected = selected.intersection(customUuids) - if !customSelected.isEmpty { - if customSelected.count > 1 || customSelected.first != config.additionalArguments.first?.id { - Button { - for i in 1.. 1 || customSelected.first != config.additionalArguments.last?.id { - Button { - for i in (0..