aboutsummaryrefslogtreecommitdiffstats
path: root/docs
Commit message (Collapse)AuthorAgeFilesLines
* Clean up import hierarchyEike Ziller2018-09-281-14/+15
| | | | | | | | | | | | | 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-211-3/+2
| | | | | | | | | | | 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>
* Remove unused functionEike Ziller2018-09-211-5/+0
| | | | | Change-Id: Iac2afb005a8c76080862da4c5d75778b48511e60 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Remove obfuscation of variables and modules in the initialization codeEike Ziller2018-09-171-8/+0
| | | | | | | | | | 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>
* The product name is "Qt Creator" with a spaceEike Ziller2018-09-173-13/+13
| | | | | Change-Id: I6716ab0b26f8881e07580df19bc29dd3c3146ae7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Remove unnecessary "setup.py" mechanism for initializing extensionsEike Ziller2018-09-171-5/+3
| | | | | | | | | | | | | | 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>
* Add optional bindings to regular buildEike Ziller2018-09-141-16/+0
| | | | | Change-Id: I47e02299707e59dc5417e965a2bbcf2a6b5d0428 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix encapsulation of pluginsEike Ziller2018-09-141-4/+2
| | | | | | | | | | | | | | | | | | | | | | | 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>
* Initial commitTilman Roeder2018-08-154-0/+355
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>