summaryrefslogtreecommitdiff
path: root/src/plugins/python/pythonplugin.cpp
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2019-10-28 11:48:31 +0100
committerEike Ziller <eike.ziller@qt.io>2019-10-28 11:48:31 +0100
commitbea3a8fa6fd53cf1e85aa30cc45d1e62464c985d (patch)
treec9755caff5786475c51c65cfec939ec90ab6ccd2 /src/plugins/python/pythonplugin.cpp
parent3c556096caf17cf6b09a91ebf0d262d0be3f65a1 (diff)
parent3f74b04c3072b2beb23ecdd108894da4057830fc (diff)
downloadqt-creator-bea3a8fa6fd53cf1e85aa30cc45d1e62464c985d.tar.gz
Merge remote-tracking branch 'origin/4.11'
Change-Id: I66389d88d5a60c6c86547b93cca945af42aa807b
Diffstat (limited to 'src/plugins/python/pythonplugin.cpp')
-rw-r--r--src/plugins/python/pythonplugin.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/plugins/python/pythonplugin.cpp b/src/plugins/python/pythonplugin.cpp
index bdb0d6a32e..63d7c663c2 100644
--- a/src/plugins/python/pythonplugin.cpp
+++ b/src/plugins/python/pythonplugin.cpp
@@ -51,6 +51,8 @@ namespace Internal {
//
////////////////////////////////////////////////////////////////////////////////////
+static PythonPlugin *m_instance = nullptr;
+
class PythonPluginPrivate
{
public:
@@ -65,11 +67,22 @@ public:
};
};
+PythonPlugin::PythonPlugin()
+{
+ m_instance = this;
+}
+
PythonPlugin::~PythonPlugin()
{
+ m_instance = nullptr;
delete d;
}
+PythonPlugin *PythonPlugin::instance()
+{
+ return m_instance;
+}
+
bool PythonPlugin::initialize(const QStringList &arguments, QString *errorMessage)
{
Q_UNUSED(arguments)