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 /examples/projects/__init__.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 'examples/projects/__init__.py')
-rw-r--r-- | examples/projects/__init__.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/projects/__init__.py b/examples/projects/__init__.py index 7a17d77..a618e5b 100644 --- a/examples/projects/__init__.py +++ b/examples/projects/__init__.py @@ -45,13 +45,13 @@ from . import view import examples_common -from PythonExtension import QtCreator +from QtCreator import Core from PySide2.QtCore import QObject, SIGNAL from PySide2.QtWidgets import QAction # When importing optional bindings, we can warn the user in case things go south try: - from PythonExtension.QtCreator import ProjectExplorer + from QtCreator import ProjectExplorer except ImportError: view.error("The extension \"projects\" could not be loaded, since it depends on a disabled plugin.") raise Exception("Dependencies missing") @@ -65,7 +65,7 @@ def showProjectPath(): view.error("Please open a project") action = QAction("Show Project Directory") -command = QtCreator.Core.ActionManager.registerAction(action, 'PythonExtensions.Examples.ShowProjectDirectory') +command = Core.ActionManager.registerAction(action, 'PythonExtensions.Examples.ShowProjectDirectory') QObject.connect(action, SIGNAL('triggered()'), showProjectPath) examples_common.addExampleItem(command) |