Debugger: Simplify some redundant file property checks

Change-Id: Ie6d638d0ece7b08dc28058f74f4c37910ffb6d83
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
hjk
2024-06-03 11:39:42 +02:00
parent a726e5d349
commit 4a4eda1b09
4 changed files with 4 additions and 5 deletions

View File

@@ -2800,7 +2800,7 @@ void CdbEngine::setupScripting(const DebuggerResponse &response)
}
const FilePath path = settings().extraDumperFile();
if (!path.isEmpty() && path.isReadableFile()) {
if (path.isReadableFile()) {
DebuggerCommand cmd("theDumper.addDumperModule", ScriptCommand);
cmd.arg("path", path.path());
runCommand(cmd);

View File

@@ -162,9 +162,8 @@ void ConsoleView::onRowActivated(const QModelIndex &index)
const Utils::FilePath fp
= m_finder.findFile(model()->data(index, ConsoleItem::FileRole).toString()).constFirst();
if (fp.exists() && fp.isFile() && fp.isReadableFile()) {
if (fp.isReadableFile())
Core::EditorManager::openEditorAt({fp, model()->data(index, ConsoleItem::LineRole).toInt()});
}
}
void ConsoleView::copyToClipboard(const QModelIndex &index)

View File

@@ -4044,7 +4044,7 @@ void GdbEngine::handleGdbStarted()
}
const FilePath path = settings().extraDumperFile();
if (!path.isEmpty() && path.isReadableFile()) {
if (path.isReadableFile()) {
DebuggerCommand cmd("addDumperModule");
cmd.arg("path", path.path());
runCommand(cmd);

View File

@@ -238,7 +238,7 @@ void LldbEngine::handleLldbStarted()
executeCommand(commands);
const FilePath path = settings().extraDumperFile();
if (!path.isEmpty() && path.isReadableFile()) {
if (path.isReadableFile()) {
DebuggerCommand cmd("addDumperModule");
cmd.arg("path", path.path());
runCommand(cmd);