aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
Commit message (Collapse)AuthorAgeFilesLines
* Adapt to upstream changesHEADmaster6.0Christian Stenger2021-09-161-4/+4
| | | | | Change-Id: Ifef4aef4468205f31669c5617a56bb0800ab9dc3 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Suppress debug log5.04.94.154.144.134.124.114.10Eike Ziller2018-10-151-1/+1
| | | | | | | Follow up of qtcreator/0d640268fddb522eb48da439f995a6fade7d6e09 Change-Id: Ib9ce945afa5d092e246ae012ba1a83923bae9312 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Use logging category for debug messagesEike Ziller2018-10-053-18/+24
| | | | | Change-Id: I895188f12b3f23c6385069de312946720de50bbe Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Clean up import hierarchyEike Ziller2018-09-285-10/+11
| | | | | | | | | | | | | 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>
* Allow single file extensionsEike Ziller2018-09-251-3/+10
| | | | | Change-Id: I0b9e04e9ba2d73f43fbf08515366bfa303f2557b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Avoid scanning extension directory over and over againEike Ziller2018-09-216-31/+62
| | | | | | | | | | | 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-212-6/+0
| | | | | Change-Id: Iac2afb005a8c76080862da4c5d75778b48511e60 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Ignore __pycache__ when looking for extensionsEike Ziller2018-09-211-1/+2
| | | | | Change-Id: I8cc0289e047ced546491639ea5a7b37b5cce0ac1 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Fix installation of requirements at first runEike Ziller2018-09-191-3/+6
| | | | | | | | | | | If our custom site-packages path does not exist, the Python interpreter drops it from its list of directories to look for imports at some point. This results in packages not being found in the custom site-packages directory on the first run. Create the directory explicitly at first startup. Change-Id: Iaff4376890fb68828bbef4c1b05e2d4e7911406a Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Remove obfuscation of variables and modules in the initialization codeEike Ziller2018-09-172-35/+5
| | | | | | | | | | 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-178-9/+9
| | | | | Change-Id: I6716ab0b26f8881e07580df19bc29dd3c3146ae7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Remove unnecessary "setup.py" mechanism for initializing extensionsEike Ziller2018-09-172-29/+0
| | | | | | | | | | | | | | 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>
* Move shiboken setup to reusable fileEike Ziller2018-09-141-59/+5
| | | | | Change-Id: I4f832fdeedb07105806dce4f673afb5cf679ed9f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix encapsulation of pluginsEike Ziller2018-09-141-17/+7
| | | | | | | | | | | | | | | | | | | | | | | 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>
* Fix installation of requirementsEike Ziller2018-09-121-3/+3
| | | | | | | | | | | Do not split command lines on whitespace, which destroys arguments with spaces (e.g. the package path inside the Qt Creator app bundle on macOS). Also directly run pip through the module without going through an external python command. Change-Id: I85c8c5d64d21ee0178c43053cb5913f6f3c3b882 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Pull out running string as script as local functionEike Ziller2018-09-121-16/+14
| | | | | Change-Id: Iae9e5723cb95ad96e03bdfdbb1b9c1367050c203 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Remove unused functionEike Ziller2018-09-101-8/+0
| | | | | Change-Id: I22b4273a4f6e085a49b8e0a06c4cc8250c160e18 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Get Qt compile flags for shiboken more genericallyEike Ziller2018-09-101-7/+12
| | | | | | | | | Get the include and framework paths from the Qt modules directly. This automatically takes care of differences between macOS and Win/Lin then. Change-Id: I5e43641e01c43485828939547ac33b9acadbbae9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Further Windows fixesFriedemann Kleint2018-08-232-5/+7
| | | | | | | | - Disambiguate coreplugin, utils/fileutils.h - Link dl only on Unix Change-Id: Iace80e49a9ee878dab762f167d016e78ba0c76f1 Reviewed-by: hjk <hjk@qt.io>
* First fixes for WindowsFriedemann Kleint2018-08-214-6/+15
| | | | | | | | | | - Clean the paths - Make g++ specific options depending on compiler - ifdef out dlopen of the Python libraries - Do not use protected hack Change-Id: I979ed9362e55481a1452c0d7a6e8eba2355c6df4 Reviewed-by: hjk <hjk@qt.io>
* Remove unneeded include of _dependencies.priEike Ziller2018-08-201-3/+0
| | | | | | | That is done automatically by qtcreatorplugin.pri Change-Id: Id8ffff5733b2bb821ba6e8596721a5174bd1bfa4 Reviewed-by: hjk <hjk@qt.io>
* Use qtcreatordata.pri for static extensionmanager dataEike Ziller2018-08-201-7/+0
| | | | | | | That updates them on modification etc Change-Id: I2ad1c1d80df64e9e83980a31ad29e1fb3a655596 Reviewed-by: hjk <hjk@qt.io>
* Fix include pathEike Ziller2018-08-201-1/+2
| | | | | | | | PythonExtension/QtCreator/pythonextension_qtcreator_python.h tries to include pythonextensionsplugin.h which is in the .pro file PWD Change-Id: Iaf45ff76618ca06268c3c1063adfbc7e91daae2a Reviewed-by: hjk <hjk@qt.io>
* Initial commitTilman Roeder2018-08-1537-0/+1345
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>