forked from qt-creator/qt-creator
Debugger: Avoid some repeated file accesses on startup
Change-Id: Id0d8458a872519156b859c40762ebc7837ef434b Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -308,7 +308,8 @@ DebuggerKitAspect::ConfigurationErrors DebuggerKitAspect::configurationErrors(co
|
||||
|
||||
ConfigurationErrors result = NoConfigurationError;
|
||||
const FilePath debugger = item->command();
|
||||
if (!debugger.exists() || debugger.isDir())
|
||||
const bool found = debugger.exists() && !debugger.isDir();
|
||||
if (!found)
|
||||
result |= DebuggerNotFound;
|
||||
else if (!debugger.isExecutableFile())
|
||||
result |= DebuggerNotExecutable;
|
||||
@@ -321,7 +322,7 @@ DebuggerKitAspect::ConfigurationErrors DebuggerKitAspect::configurationErrors(co
|
||||
result |= DebuggerDoesNotMatch;
|
||||
}
|
||||
|
||||
if (!debugger.exists() || debugger.isDir()) {
|
||||
if (!found) {
|
||||
if (item->engineType() == NoEngineType)
|
||||
return NoDebugger;
|
||||
|
||||
|
Reference in New Issue
Block a user