aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2019-07-17 08:03:39 +0100
committerDavid Schulz <david.schulz@qt.io>2019-07-18 11:35:16 +0000
commitb8d4a9bef85d86fc4081cb7fe7c6e163a26b8124 (patch)
tree13d06ac3fb9914671cad046a0f40b6bdcde4fa45 /src
parent1f81f63b56f8681a97e31d17a15594fbe002dab9 (diff)
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 <m.weghorn@posteo.de> Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/debugger/debuggerengine.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp
index 210d2bb7bf..240a2ad80f 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())