From b3ac61f93e733f3ec0d9cea4452d0eee159e8957 Mon Sep 17 00:00:00 2001 From: liuxinhao Date: Mon, 15 Jan 2024 17:52:29 +0800 Subject: [PATCH 16/17] fix(launcher): Fix the space before the parameter causing a jump event when the launcher jumps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修复启动器跳转时参数前的空格导致跳转失败 Closes #24794 --- src/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 981fdbf..4258832 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -65,7 +65,11 @@ void processCommandLine() cmdParser.process(*singleApp); QString category = cmdParser.value(categoryOption); + category = category.trimmed(); + QString subItem = cmdParser.value(subItemOption); + subItem = subItem.trimmed(); + if( !subItem.isEmpty() && category.isEmpty() ) { std::cerr << "failed to set sub item without category" << std::endl; -- 2.33.0