Python: automatically purge outdated autodetected interpreters

Save whether an interpreter was automatically detected. Use this
information on startup and check whether the path still exists to remove
the interpreters that are gone.

Fixes: QTCREATORBUG-27253
Change-Id: I094e573122f2800f643a2708b924a7a9d7e25ae1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2022-03-28 09:27:54 +02:00
parent d8589e0222
commit d0c8cc20f5
2 changed files with 37 additions and 12 deletions

View File

@@ -42,7 +42,8 @@ public:
bool windowedSuffix = false);
Interpreter(const QString &id,
const QString &name,
const Utils::FilePath &command);
const Utils::FilePath &command,
bool autoDetected = true);
inline bool operator==(const Interpreter &other) const
{
@@ -52,6 +53,7 @@ public:
QString id = QUuid::createUuid().toString();
QString name;
Utils::FilePath command;
bool autoDetected = true;
};
class PythonSettings : public QObject