From b8d4a9bef85d86fc4081cb7fe7c6e163a26b8124 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Wed, 17 Jul 2019 08:03:39 +0100 Subject: [PATCH] Debugger: Only append ".exe" for symbol file if necessary Only append the ".exe" suffix if the the symbol file cannot be found. Otherwise, this shows an unnecessary warning if an existing and valid executable file like *.bat or *.cmd is passed. Change-Id: I129c89deee9d63aefecc84d489ee08e81eaa11ab Reviewed-by: Michael Weghorn Reviewed-by: David Schulz --- src/plugins/debugger/debuggerengine.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp index 210d2bb7bfc..240a2ad80fd 100644 --- a/src/plugins/debugger/debuggerengine.cpp +++ b/src/plugins/debugger/debuggerengine.cpp @@ -2626,8 +2626,8 @@ void CppDebuggerEngine::validateRunParameters(DebuggerRunParameters &rp) && rp.cppEngineType == CdbEngineType && rp.startMode != AttachToRemoteServer) { QTC_ASSERT(!rp.symbolFile.isEmpty(), return); - if (!rp.symbolFile.toString().endsWith(".exe", Qt::CaseInsensitive)) - rp.symbolFile = FileName::fromString(rp.symbolFile.toString() + ".exe"); + if (!rp.symbolFile.exists() && !rp.symbolFile.endsWith(".exe")) + rp.symbolFile = rp.symbolFile.stringAppended(".exe"); QString errorMessage; QStringList rc; if (getPDBFiles(rp.symbolFile.toString(), &rc, &errorMessage) && !rc.isEmpty())