forked from qt-creator/qt-creator
Debugger: Simplify some redundant file property checks
Change-Id: Ie6d638d0ece7b08dc28058f74f4c37910ffb6d83 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -2800,7 +2800,7 @@ void CdbEngine::setupScripting(const DebuggerResponse &response)
|
|||||||
}
|
}
|
||||||
|
|
||||||
const FilePath path = settings().extraDumperFile();
|
const FilePath path = settings().extraDumperFile();
|
||||||
if (!path.isEmpty() && path.isReadableFile()) {
|
if (path.isReadableFile()) {
|
||||||
DebuggerCommand cmd("theDumper.addDumperModule", ScriptCommand);
|
DebuggerCommand cmd("theDumper.addDumperModule", ScriptCommand);
|
||||||
cmd.arg("path", path.path());
|
cmd.arg("path", path.path());
|
||||||
runCommand(cmd);
|
runCommand(cmd);
|
||||||
|
@@ -162,10 +162,9 @@ void ConsoleView::onRowActivated(const QModelIndex &index)
|
|||||||
|
|
||||||
const Utils::FilePath fp
|
const Utils::FilePath fp
|
||||||
= m_finder.findFile(model()->data(index, ConsoleItem::FileRole).toString()).constFirst();
|
= 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()});
|
Core::EditorManager::openEditorAt({fp, model()->data(index, ConsoleItem::LineRole).toInt()});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void ConsoleView::copyToClipboard(const QModelIndex &index)
|
void ConsoleView::copyToClipboard(const QModelIndex &index)
|
||||||
{
|
{
|
||||||
|
@@ -4044,7 +4044,7 @@ void GdbEngine::handleGdbStarted()
|
|||||||
}
|
}
|
||||||
|
|
||||||
const FilePath path = settings().extraDumperFile();
|
const FilePath path = settings().extraDumperFile();
|
||||||
if (!path.isEmpty() && path.isReadableFile()) {
|
if (path.isReadableFile()) {
|
||||||
DebuggerCommand cmd("addDumperModule");
|
DebuggerCommand cmd("addDumperModule");
|
||||||
cmd.arg("path", path.path());
|
cmd.arg("path", path.path());
|
||||||
runCommand(cmd);
|
runCommand(cmd);
|
||||||
|
@@ -238,7 +238,7 @@ void LldbEngine::handleLldbStarted()
|
|||||||
executeCommand(commands);
|
executeCommand(commands);
|
||||||
|
|
||||||
const FilePath path = settings().extraDumperFile();
|
const FilePath path = settings().extraDumperFile();
|
||||||
if (!path.isEmpty() && path.isReadableFile()) {
|
if (path.isReadableFile()) {
|
||||||
DebuggerCommand cmd("addDumperModule");
|
DebuggerCommand cmd("addDumperModule");
|
||||||
cmd.arg("path", path.path());
|
cmd.arg("path", path.path());
|
||||||
runCommand(cmd);
|
runCommand(cmd);
|
||||||
|
Reference in New Issue
Block a user