Debugger: Avoid triggering Qt internal warning

Passing an empty string to QFile::exists() results in
'Empty filename passed to function' to be printed on the
commandline.

Change-Id: I028f0ec18447642b30be1a51f4c70b6ae18d45b1
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Stenger
2018-06-05 08:01:03 +02:00
parent 35eabd7d40
commit 43fa0dfe6f

View File

@@ -4034,7 +4034,7 @@ void GdbEngine::handleDebugInfoLocation(const DebuggerResponse &response)
{
if (response.resultClass == ResultDone) {
const QString debugInfoLocation = runParameters().debugInfoLocation;
if (QFile::exists(debugInfoLocation)) {
if (!debugInfoLocation.isEmpty() && QFile::exists(debugInfoLocation)) {
const QString curDebugInfoLocations = response.consoleStreamOutput.split('"').value(1);
QString cmd = "set debug-file-directory " + debugInfoLocation;
if (!curDebugInfoLocations.isEmpty())