| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: Iac2afb005a8c76080862da4c5d75778b48511e60
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Since the extensions are now loaded as modules/packages, separation
of initialization code in Qt Creator and the code in the extensions
is automatically handled. (Python modules/packages cannot access
variables/modules/functions from code that imports them.)
Change-Id: I7c1db034d76993d42c5d594fa5872aa1001d884e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
| |
Change-Id: I6716ab0b26f8881e07580df19bc29dd3c3146ae7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There already is the requirements.txt mechanism that takes care of pip
installing in the right way.
Setup for which this is not sufficient should be possible to do in the
initialization code of the extension directly. Additionally the provided
example was broken (e.g. didn't work with spaces in paths), and the
whole mechanism had the encapsulation problem that the extensions
themselves had before they were made modules/packages.
Change-Id: I8692e26e65ec667267c7918e6edbd32f55534bc8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
|
|
|
|
|
| |
Change-Id: I47e02299707e59dc5417e965a2bbcf2a6b5d0428
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
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>
|