diff options
| author | hjk <hjk@qt.io> | 2024-02-01 16:37:40 +0100 |
|---|---|---|
| committer | hjk <hjk@qt.io> | 2024-02-05 08:54:23 +0000 |
| commit | ca2a4f771f6f28faedca2b11702fa93bddd0e419 (patch) | |
| tree | d72f80d39008d31bad3f42b4315315788c758dbc /src/plugins/python/pythonplugin.cpp | |
| parent | f589ed7f1ecabefa4d1939eeb380821ab6090169 (diff) | |
Python: Remove pluginInstance() and convert users
Change-Id: I43179961cdee855b710fc082568a7d0d9a0f0719
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Diffstat (limited to 'src/plugins/python/pythonplugin.cpp')
| -rw-r--r-- | src/plugins/python/pythonplugin.cpp | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/src/plugins/python/pythonplugin.cpp b/src/plugins/python/pythonplugin.cpp index 60849b3158d..ad3a1da86d9 100644 --- a/src/plugins/python/pythonplugin.cpp +++ b/src/plugins/python/pythonplugin.cpp @@ -1,8 +1,7 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 -#include "pythonplugin.h" - +#include "pipsupport.h" #include "pythonbuildconfiguration.h" #include "pythonconstants.h" #include "pythoneditor.h" @@ -33,30 +32,11 @@ using namespace Utils; namespace Python::Internal { -static QObject *m_instance = nullptr; - -QObject *pluginInstance() -{ - return m_instance; -} - class PythonPlugin final : public ExtensionSystem::IPlugin { Q_OBJECT Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "Python.json") -public: - PythonPlugin() - { - m_instance = this; - } - - ~PythonPlugin() final - { - m_instance = nullptr; - } - -private: void initialize() final { setupPythonEditorFactory(this); @@ -72,6 +52,8 @@ private: setupPythonSettings(this); setupPythonWizard(); + setupPipSupport(this); + KitManager::setIrrelevantAspects(KitManager::irrelevantAspects() + QSet<Id>{PythonKitAspect::id()}); |
