forked from qt-creator/qt-creator
Use QFileInfo::exist(f) instead of QFileInfo(f).exists() if possible
Faster. Change-Id: I91aa67462e11ff3258600d7f158de79942d0dc81 Reviewed-by: Marc Reilly <marc.reilly@gmail.com> Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
@@ -172,22 +172,22 @@ void GdbServerStarter::attach(int port)
|
||||
QString binary;
|
||||
QString localExecutable;
|
||||
QString candidate = sysroot + d->process.exe;
|
||||
if (QFileInfo(candidate).exists())
|
||||
if (QFileInfo::exists(candidate))
|
||||
localExecutable = candidate;
|
||||
if (localExecutable.isEmpty()) {
|
||||
binary = d->process.cmdLine.section(QLatin1Char(' '), 0, 0);
|
||||
candidate = sysroot + QLatin1Char('/') + binary;
|
||||
if (QFileInfo(candidate).exists())
|
||||
if (QFileInfo::exists(candidate))
|
||||
localExecutable = candidate;
|
||||
}
|
||||
if (localExecutable.isEmpty()) {
|
||||
candidate = sysroot + QLatin1String("/usr/bin/") + binary;
|
||||
if (QFileInfo(candidate).exists())
|
||||
if (QFileInfo::exists(candidate))
|
||||
localExecutable = candidate;
|
||||
}
|
||||
if (localExecutable.isEmpty()) {
|
||||
candidate = sysroot + QLatin1String("/bin/") + binary;
|
||||
if (QFileInfo(candidate).exists())
|
||||
if (QFileInfo::exists(candidate))
|
||||
localExecutable = candidate;
|
||||
}
|
||||
if (localExecutable.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user