diff options
author | Eike Ziller <eike.ziller@qt.io> | 2018-09-27 15:00:08 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2018-09-28 07:31:36 +0000 |
commit | 3412dc563119221bd730c1487937519df0761792 (patch) | |
tree | d738ea0a24c1013e589e69240d6fc91ae13ed999 /python/extensionmanager/actions.py | |
parent | 3c4cafdf834c9b683501efca72dbbe1093cf6f9a (diff) |
Clean up import hierarchy
PythonExtension.QtCreator.*
-> QtCreator.*
PythonExtension.PluginInstance
-> QtCreator.PythonExtensions
Also enables imports of the form "from QtCreator import Core" it is no
longer necessary to write QtCreator.Core....
Change-Id: Ib9b433868dcc3fc7d1d534c6023bae7bf6d05fec
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'python/extensionmanager/actions.py')
-rw-r--r-- | python/extensionmanager/actions.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/python/extensionmanager/actions.py b/python/extensionmanager/actions.py index 7f05e77..48e5ae4 100644 --- a/python/extensionmanager/actions.py +++ b/python/extensionmanager/actions.py @@ -41,7 +41,7 @@ # Functions for installing and deleting extensions import sys, zipfile -from PythonExtension import PluginInstance as instance +from QtCreator import PythonExtensions from send2trash import send2trash def install(path): @@ -59,14 +59,14 @@ def install(path): return "The .zip file is malformed." # Make sure the extension manager does not overwrite # extensions that are already installed - for ext in instance.extensionList(): + for ext in PythonExtensions.extensionList(): if extName == ext.name: return "The extension \"{}\" is already installed. Uninstall it before trying again.".format(extName) - extZip.extractall(instance.extensionDir().absolutePath()) + extZip.extractall(PythonExtensions.extensionDir().absolutePath()) extZip.close() except Exception as e: return str(e) return True def uninstall(ext): - send2trash(instance.extensionDir().absolutePath() + "/" + ext) + send2trash(PythonExtensions.extensionDir().absolutePath() + "/" + ext) |