summaryrefslogtreecommitdiff
path: root/src/plugins/python/pythonsettings.h
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2022-04-13 12:26:54 +0200
committerhjk <hjk@qt.io>2022-04-27 08:54:22 +0000
commit28cfdf388ae3e3ed7e073e98a83c737d889d887f (patch)
tree5e984b0bfccee996b8329b6c5a1899aa4c195273 /src/plugins/python/pythonsettings.h
parent9a6d8aebe79993ee9de17b642fb253b925624739 (diff)
downloadqt-creator-28cfdf388ae3e3ed7e073e98a83c737d889d887f.tar.gz
Promote previously python-specific InterpreterAspect
... and drop PythonRunConfiguration, which is a plain RunConfiguration now. Change-Id: I540cb738180fc1424f730d6d1998886915ce527b Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/python/pythonsettings.h')
-rw-r--r--src/plugins/python/pythonsettings.h27
1 files changed, 4 insertions, 23 deletions
diff --git a/src/plugins/python/pythonsettings.h b/src/plugins/python/pythonsettings.h
index 565a80d4e7..3b5e60fc77 100644
--- a/src/plugins/python/pythonsettings.h
+++ b/src/plugins/python/pythonsettings.h
@@ -25,6 +25,8 @@
#pragma once
+#include <projectexplorer/runconfigurationaspects.h>
+
#include <utils/fileutils.h>
#include <utils/optional.h>
@@ -33,35 +35,14 @@
namespace Python {
namespace Internal {
-class Interpreter
-{
-public:
- Interpreter() = default;
- Interpreter(const Utils::FilePath &python,
- const QString &defaultName,
- bool windowedSuffix = false);
- Interpreter(const QString &id,
- const QString &name,
- const Utils::FilePath &command,
- bool autoDetected = true);
-
- inline bool operator==(const Interpreter &other) const
- {
- return id == other.id && name == other.name && command == other.command;
- }
-
- QString id = QUuid::createUuid().toString();
- QString name;
- Utils::FilePath command;
- bool autoDetected = true;
-};
-
class PythonSettings : public QObject
{
Q_OBJECT
public:
static void init();
+ using Interpreter = ProjectExplorer::Interpreter;
+
static QList<Interpreter> interpreters();
static Interpreter defaultInterpreter();
static Interpreter interpreter(const QString &interpreterId);