From 18c00cd381780bfaadcc74bd40ab8cee5521c481 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Wed, 18 Oct 2023 07:25:23 +0200 Subject: [PATCH] Python: reduce freezes in settings page with remote interpreter Do not check the existence of remote interpreters when opening the settingspage since we could run into device timeouts for unreachable devices. Change-Id: I5d0d1316961fc4ecbd2be55f6df70091ff65ecd5 Reviewed-by: Christian Stenger --- src/plugins/python/pythonsettings.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/python/pythonsettings.cpp b/src/plugins/python/pythonsettings.cpp index 57d951ec1d2..410714af090 100644 --- a/src/plugins/python/pythonsettings.cpp +++ b/src/plugins/python/pythonsettings.cpp @@ -170,6 +170,8 @@ InterpreterOptionsWidget::InterpreterOptionsWidget() return f; } case Qt::ToolTipRole: + if (interpreter.command.needsDevice()) + break; if (interpreter.command.isEmpty()) return Tr::tr("Executable is empty."); if (!interpreter.command.exists()) @@ -179,6 +181,8 @@ InterpreterOptionsWidget::InterpreterOptionsWidget() .arg(interpreter.command.toUserOutput()); break; case Qt::DecorationRole: + if (interpreter.command.needsDevice()) + break; if (column == 0 && !interpreter.command.isExecutableFile()) return Utils::Icons::CRITICAL.icon(); break;