aboutsummaryrefslogtreecommitdiffstats
path: root/python
Commit message (Collapse)AuthorAgeFilesLines
* Clean up import hierarchyEike Ziller2018-09-283-14/+14
| | | | | | | | | | | | | 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>
* Avoid scanning extension directory over and over againEike Ziller2018-09-212-5/+5
| | | | | | | | | | | And get rid of separate management of a list of loaded extensions. Instead save the name and state of an extension in a separate class. It will probably get more information about the extension, like its location. The extension manager UI now can also iterate over that list once. Change-Id: I4872e55d621837a7d476e69b919f06aeb491ff03 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Fix example extensions for Python 3Eike Ziller2018-09-202-2/+4
| | | | | | | | Implicit relative imports are no longer allowed and need to be made explicit. Change-Id: Ic4de2d98229149b4d2920057974f895d9600368b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* The product name is "Qt Creator" with a spaceEike Ziller2018-09-173-6/+6
| | | | | Change-Id: I6716ab0b26f8881e07580df19bc29dd3c3146ae7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix encapsulation of pluginsEike Ziller2018-09-141-0/+0
| | | | | | | | | | | | | | | | | | | | | | | Fixes that triggering "About Python Extensions" action resulted in python runtime error "TypeError: must be type, not None" when referencing PySide2.QtWidgets. To improve encapsulation of plugins, all modules that they loaded were deleted after their main.py finished running. This breaks if these modules were accessed later e.g. triggered by actions. Instead of this hack, ensure encapsulation of plugins by making them actual Python packages. Qt Creator's python extension path is added to python's module search path, and extensions are simply imported as packages. The python extension's main.py simply becomes a standard python module __init__.py. This also means that python extensions can depend on, and use other python extensions' functionality by importing them with "import". Change-Id: Ibe74c24e337b321007f5fa19c97bd35a5c1f0375 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Make About Python Extensions a nice Qt Creator actionEike Ziller2018-09-131-1/+9
| | | | | | | | And fix its position on macOS where it should be in the application menu. Change-Id: I7d9bcfc8f5a7faa5cd9f5aa0927f43769be5ce51 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Use qtcreatordata.pri for static extensionmanager dataEike Ziller2018-08-201-0/+16
| | | | | | | That updates them on modification etc Change-Id: I2ad1c1d80df64e9e83980a31ad29e1fb3a655596 Reviewed-by: hjk <hjk@qt.io>
* Initial commitTilman Roeder2018-08-154-0/+288
This is a quite large commit containing: * The main extension that runs and initializes Python * Some (example) bindings * An initial build script for the main extension * Optional binding and examples of how to create them * An initial build script for the optional bindings * A simple extension manager written in Python * A few example Python extensions * Some documentation (both in the code and as markdown files) * A collection of helpful python scripts * A small collection of unit tests * A TODO list For any additional details the code / docs should be consulted. Change-Id: I3937886cfefa2f64d5a78013889a8e097eec8261 Reviewed-by: Eike Ziller <eike.ziller@qt.io>