forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user