Debugger: Minor optimization in coredump lookup

Change-Id: I162366ce98078ba49311c96772772258e3f3dcb7
Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2016-04-06 16:44:51 +03:00
committed by Orgad Shaneh
parent 24660c23e3
commit 5d0b5b35b2

View File

@@ -88,14 +88,14 @@ void GdbCoreEngine::setupEngine()
static QString findExecutableFromName(const QString &fileNameFromCore, const QString &coreFile) static QString findExecutableFromName(const QString &fileNameFromCore, const QString &coreFile)
{ {
if (QFileInfo(fileNameFromCore).isFile())
return fileNameFromCore;
if (fileNameFromCore.isEmpty()) if (fileNameFromCore.isEmpty())
return QString(); return fileNameFromCore;
QFileInfo fi(fileNameFromCore);
if (fi.isFile())
return fileNameFromCore;
// turn the filename into an absolute path, using the location of the core as a hint // turn the filename into an absolute path, using the location of the core as a hint
QString absPath; QString absPath;
QFileInfo fi(fileNameFromCore);
if (fi.isAbsolute()) { if (fi.isAbsolute()) {
absPath = fileNameFromCore; absPath = fileNameFromCore;
} else { } else {