aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Disable WebKitCristian Maureira-Fredes2018-05-091-1/+4
| | | | | | | Removing WebKit support by default. Change-Id: I8cbf94891dc29f940926167414de7bdd35478732 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix QSocketNotifier constructorCristian Maureira-Fredes2018-05-093-21/+81
| | | | | | | | | | | | | | The first argument was modified to be a socket type, but it needs to be an int (file descriptor). Adding a new signature solves the compatibility problem between Python2 and 3. A test case was added. Task-number: PYSIDE-629 Change-Id: Id9dea37459350dfc90d0f0ab9e2e1993d03fe6e4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Add more bindings for QtNetworkFriedemann Kleint2018-05-097-9/+120
| | | | | | | Task-number: PYSIDE-487 Change-Id: Id9a06b83173b9a8880a256fb45e8d85fb1978d65 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* build_scripts/main.py: Fix EngrishAlexandru Croitor2018-05-081-2/+2
| | | | | Change-Id: I794e0b094c7be96853c9c5024ede49ea54731506 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix a few scriptableapplication bugsAlexandru Croitor2018-05-085-89/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | 1) Remove LIBPATH because that causes linker warnings on macOS, and its usage is deprecated on Windows. 2) Remove all qmake clang related code, as well as clang code from pyside2_config.py. It used to be needed on Windows because we didn't deploy libclang.dll to the PySide2 dir. Now that we do, the code is unnecessary. 3) Remove README.txt reference. 4) Add clarifying comments in README.md. 5) Remove NO_DEFAULT_PATH from find_library because that causes a failure to find the python library on Ubuntu (makes sense because the specified libdir is /usr/lib, but the actual library is under /usr/lib/[arch], and disabling the option forces CMake not to look under the arch dir. 6) Fix rpath to PySide2 dir not being embedded on Linux (presumably because the link flags style changed to absolute paths, not sure). 7) Fix README to be more precise about how MSBuild needs to be invoked, and how to run the executable. 8) Improve the error handling in the project files. 9) Refactor pyside2_config.py usage. Change-Id: I402d5c42ef7e01e94d3827682564e95ee280b40b Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Make sure copied libclang file has write permissionsAlexandru Croitor2018-05-082-2/+15
| | | | | | | | | | | | | | When doing a standalone rebuild on macOS, if the libclang library copied over has no write permissions set, the install procedure will fail with permission denied error. Make sure to make the file owner writable, so that any subsequent rebuilds don't cause a failure. Change-Id: I54bb3f6e8bd8db7f8ed2de17892fcedec09b6c32 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix copying of libclang for standalone buildsAlexandru Croitor2018-05-081-15/+9
| | | | | | | | | | Instead of copying a multitude of symlinks, resolve the path and copy just the libclang library which CMake detected, and thus linked against for the shiboken executable. Change-Id: I02887eb4027d29255a32127fb39aff7a1d127f57 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Improve libclang extra include headers detectionAlexandru Croitor2018-05-081-2/+21
| | | | | | | | | | | | | | On certain distros (e.g. ArchLinux) there may be additional files in the path where we GLOB for clang version include folders (e.g. /usr/lib/llvm/lib/clang/6.0.0 and /usr/lib/llvm/lib/clang/ccc-analyzer). Filter the files out, and only consider folders starting with a number (e.g. 6.0.0). Change-Id: I85052e45610090f399ec92200f7a666c4872f78d Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Improve libclang detection on LinuxAlexandru Croitor2018-05-081-5/+32
| | | | | | | | | | | | | | | This change essentially allows usage of the distro-specific libclang libraries for building shiboken. This required changes to the name of the library that CMake looked for (looking at you Debian). The change also adds an additional compile test to check for the availability of the libclang headers which shiboken uses. This should prevent a failure at build time, and transform it into a nice error message at cmake configure time. Change-Id: I37e019fd5923379436a67d77f92c30efd77620d2 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QtXmlToSphinx: Refactor link handlingFriedemann Kleint2018-05-072-46/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Forward declare QtXmlToSphinx::LinkContext as a public struct and move the definition to the source file. Replace the linkTag/linkTagEnding strings by an enumeration for the type and flags for storing the bold/italic state. Move the formatting to an operator<<(QTextStream,LinkContext) for clarity. Streamline the code checking the link text against the reference in handleLinkText(), avoiding some unnecessary tests. Add an 'External' type for external pages which do not have a role keyword. This fixes: - Undoes a breakage introduced by c5582d3120249a902681454b2319df765ffa2cd8 converting all link refs to RST labels, clobbering the '~' used for some function references. This is now limited to page type links. - Broken handling of links within italic/bold: The assignment to the linkTag variable by type would clobber the previously assigned italic/bold markers - Enable external links without role Task-number: PYSIDE-363 Change-Id: I2e9a8cd80df93a77f3c6c9f8593243b35eeeb56e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix Qt OpenGL entry in index.rstFriedemann Kleint2018-05-071-1/+1
| | | | | Change-Id: I40af60a2af1e54ffa5ede91e3fc071d14a9e510d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Update missing_bindings scriptCristian Maureira-Fredes2018-05-071-6/+17
| | | | | | | | | | | Removed deprecated modules, and included new ones based on: http://doc-snapshots.qt.io/qt5-5.11/qtmodules.html Moved QtWidgets to follow the order of the website. Change-Id: I6de85fe0402d98db57058eda6dbb1aae2e1c5aec Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add option to skip docs generationCristian Maureira-Fredes2018-05-073-11/+18
| | | | | | | Adding option to avoid building the documentation. Change-Id: Ia5595e6686c6e7d31e94818c1efb28238a3fbfc7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix CMake usage of utils.pyAlexandru Croitor2018-05-071-1/+1
| | | | | | | The file was moved, but the path was not adjusted. Change-Id: I80ea28e4238f9cf9d43db2f9e669d84d5eafaea6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Update scriptableapplication exampleCristian Maureira-Fredes2018-05-047-75/+198
| | | | | | | | | | | | | Absolute paths are used to link the PySide2 libraries on Linux, since it's not possible to ship symbolic links inside a wheel. The README.txt was renamed to README.md to allow syntax highlight on modern editors and also to be compatible with online platforms. The README.CMake.txt was merge to the README.md to include the instruction on the same file. Change-Id: Ie0fcb8cda770ff552576f6014b5822f8d278bfe6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Use PyLong instead of PyInt for QVariantCristian Maureira-Fredes2018-05-042-2/+7
| | | | | | | | | | | | | | | | | | | Python 3 uses PyLong for integer manipulation, and since it is a valid type in Python 2 we can use it instead to have better compatibility, and avoid integer overflows. We keep the PyInt entry to avoid breaking other sections of the code when this type is required. Added a couple of PyInt_* alias to use PyLong_* ones instead. Task-number: PYSIDE-648 Change-Id: Id6af66050c5ab81fc51c1c07b1c9422a954b81c0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Blacklist QtCore/qfileread_test, Qt3DExtras/qt3dextras_test.py on macOSFriedemann Kleint2018-05-041-0/+3
| | | | | | Task-number: PYSIDE-431 Change-Id: I31deef0dc12a4b3ce11a6300c8594598d78c4712 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Update ApiExtractor documentationCristian Maureira-Fredes2018-05-046-13/+11
| | | | | | | | | Changed a few old references and links. Ran aspell on the rst files. Task-number: PYSIDE-622 Change-Id: I3e096df96bfe80ead53afa8568b7de42e8a25766 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Doc: Add license page to TOCFriedemann Kleint2018-05-031-0/+1
| | | | | | | Task-number: PYSIDE-363 Change-Id: Ic4784303a6e3f81ddc1576d6af7ced997aadfe33 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Decode qtattributionsscanner output to UTF-8Topi Reinio2018-05-031-1/+1
| | | | | | | | | Without the decode() step, the script may fail with TypeError: the JSON object must be str, not 'bytes' Task-number: PYSIDE-363 Change-Id: Ib9a8e487cc1b9f51692d0c4f20009a0c97cc770e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Doc: Pass include paths via qdocconf instead of command lineTopi Reinio2018-05-032-7/+10
| | | | | | | | | This way, the length of the command line does not exceed the maximum on Windows. Task-number: PYSIDE-651 Change-Id: Ib6cc736b8c5dda2e9b4bd3775fb18b8584837604 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Change license from all the filesCristian Maureira-Fredes2018-05-031870-1870/+1870
| | | | | | | | | | | | | | | | | Removing the word 'project' from all the headers, and changing the PySide reference from the examples to Qt for Python: The following line was used inside the source/ and build_scripts/ directory: for i in $(grep -r "the Qt for Python project" * |grep -v "pyside2-tools" | awk '{print $1}' | sed 's/:.*//g');do sed -i 's/the\ Qt\ for\ Python\ project/Qt\ for\ Python/g' $i;done and the following line was used inside the examples/ directory: for i in $(grep -r "of the PySide" * |grep -v "pyside2-tools" | awk '{print $1}' | sed 's/:.*//g');do sed -i 's/of\ the\ PySide/of\ the\ Qt\ for\ Python/g' $i;done Change-Id: Ic480714686ad62ac4d81c670f87f1c2033d4ffa1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix typo on build_scripts/utils.pyCristian Maureira-Fredes2018-05-031-1/+1
| | | | | Change-Id: I338d38358f63af544e3cc58c9e6208a8616f98a6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QtXmlToSphinx: Add support for more elementsFriedemann Kleint2018-05-022-2/+41
| | | | | | | | | Add support for <target> and <page> elements for the additional documentation sections. Task-number: PYSIDE-363 Change-Id: I0b04106fbe6ae1779625de333368e18bbc31b962 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QtXmlToSphinx: Refactor label handlingFriedemann Kleint2018-05-022-6/+38
| | | | | | | | | | Add utility functions to remove invalid characters and a helper for streaming Task-number: PYSIDE-363 Change-Id: I45eb33ed60deed82912262a99551436c538eee22 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Add option to create additional documentationFriedemann Kleint2018-05-024-4/+685
| | | | | | | | | | Add an option taking a list of files under the webxml directory that are run though the Sphinx converter to create .rst files. This can be used for tutorials and example descriptions. Task-number: PYSIDE-363 Change-Id: Ifa6df32517a2b336cd3f755523947d70c5c24f2e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add Positioning, Location and Sensors to documentationFriedemann Kleint2018-05-024-0/+17
| | | | | | Task-number: PYSIDE-363 Change-Id: Idc4418b6313c2f6b7946fcfb80abc772caec361b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Doc: Update the QML advanced tutorialVenugopal Shivashankar2018-05-0219-141/+217
| | | | | | | | | | | - Switch the languague to 2nd person - Update the Qt Quick import statements - Replace instances of "elements" that referred to QML types or items. Change-Id: Iabac624270dbd8685bf1f4d2dec198984e7a3c68 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Re-add QShortcutEvent removed methodsAlexandru Croitor2018-05-021-5/+0
| | | | | | | | They seem to work, no need to reject them. Task-number: PYSIDE-655 Change-Id: I20e5a0ddd03392bacac8875158159d84bf16cdb9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Avoid set parent for QLabel.pixmap()Cristian Maureira-Fredes2018-05-015-3/+105
| | | | | | | | | | | | Setting owner as default to not allow Python to create a copy of the QPixmap associated with the QLabel. The C++ object pointer is acquired through the pixmap() method. A test case was included. Task-number: PYSIDE-150 Change-Id: Ie6975c39cbf49a59ebd478db0e1a0c30fc14864a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add tool for creating a license pageFriedemann Kleint2018-04-302-1/+152
| | | | | | | | | | | | Add a tool which runs qtattributionsscanner and converts its JSON output to .rst to create an additional license page It differs from the Qt usage in that the license text is extracted from triple quotes of the referenced file. Task-number: PYSIDE-363 Change-Id: Idef9b0ada06bec5947aac210d7fec25fd0742ab8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Doc: Update the footer CSS styleVenugopal Shivashankar2018-04-301-1/+1
| | | | | | | | The copyright text at the bottom of the page doesn't wrap without it. Change-Id: I28a275c4c96b63573dd3fe1af554e98a593880e4 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Use additional include paths for some Qt modulesTopi Reinio2018-04-304-0/+4
| | | | | | | | | | | | | | | Some of the Qt documentation modules use custom module headers that pull in additional content into the build. On a normal Qt documentation build, these are implemented as relative paths - these are incorrect when the doc build is invoked externally in PySide. To fix this, add absolute qdocconf include path entries for each module that needs them. This cuts down the number of QDoc warnings significantly. Change-Id: I22756cc3170e7e2ff678986a46e117faf43a735d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Implement Python slicing support for QByteArrayBoxiang Sun2018-04-303-19/+103
| | | | | | | | | | | | | | | | | | | | | PySide2 for Python 3 didn't support get item by slice, e.g. ``` >>> from PySide2.QtCore import QByteArray >>> ba = QByteArray('1234567890') >>> ba[2:4] Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: sequence index must be integer, not 'slice' ``` This is because get item by slice is supported by mp_subscript. But current PySide2 doesn't implemented it. So I added __mgetitem__ in QByteArray. And we also need to keep __getitem__ to support iterate over QByteArray. Also removed the __getslice__ from QByteArray. Task-number: PYSIDE-567 Change-Id: I01f79cc2ab8700da92155cfad96be2e98bb8b331 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Start a tabbed browser exampleFriedemann Kleint2018-04-307-0/+1207
| | | | | | Task-number: PYSIDE-363 Change-Id: Idf7037c1b9efe1ccfce4427a49abc86a6631efa7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Split and move various setup.py parts into different filesAlexandru Croitor2018-04-3012-1899/+2241
| | | | | | | | | | | | | | | | | This is an initial effort to clean up setup.py. A new directory called build_scripts contains most of the logic for building, leaving setup.py as an entry point. The build_scripts directory contains the usual qtinfo, utils, and the setup.py content has been split into main.py and platform specific files under platforms subfolder. The testrunner script has been modified to find the new location of the utils module. Task-number: PYSIDE-558 Change-Id: I3e041d5116ca5c3f96c789317303b65a7b1bbd70 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Doc: Use product name and python module names appropriatelyVenugopal Shivashankar2018-04-306-19/+14
| | | | | | | | | Configured replaceable text entities so that updating instances of product and module names in the doc is less cumbersome. Change-Id: I6ef8adcc4324775eeb8a48bf81294effb0ea12d5 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Rename PySide references to Qt for PythonCristian Maureira-Fredes2018-04-271690-1690/+1690
| | | | | | | | | When referring to the project one should use "Qt for Python" and for the module "PySide2" Change-Id: I36497df245c9f6dd60d6e160e2fc805e48cefcae Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Remove currentThreadId bindingCristian Maureira-Fredes2018-04-277-6/+1
| | | | | | | | | | | | | Since this method should not be used in any application code, we should remove it from PySide2. Removing also the test registry. https://doc.qt.io/qt-5/qthread.html#currentThreadId Task-number: PYSIDE-275 Change-Id: I152b36ccfa4342d4d6b916d8b2fe228e4fe4a1c4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Doc: Add top-level index and getting started informationVenugopal Shivashankar2018-04-278-23/+210
| | | | | | | | | - Updated the copyright text in the config file - Added the copyright to the footer in the template Change-Id: Iaadc293af524abea41873d04206516caec189c53 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* shiboken: Accept relative file name as C++ headerFriedemann Kleint2018-04-271-1/+7
| | | | | | | | | | | Relative file names cause Clang not to find them since they are included by a temporary header file. Check and convert to an absolute path via QFileInfo. Change-Id: Ie87b4d2a6fcf5d98062a8a40a3eccbbb9513c62e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add missing flag for QChartViewCristian Maureira-Fredes2018-04-261-1/+1
| | | | | | Task-number: PYSIDE-645 Change-Id: I4f18e1ede50a68767772eb02e55ff4e1fd718636 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add references from ApiExtractor to shiboken docCristian Maureira-Fredes2018-04-269-42/+50
| | | | | | | | | | | | | | | | | | | Including intersphinx extension allow us to link the documentation from ApiExtractor to shiboken's. ApiExtractor doc need to be build first, so we can use the inventory that sphinx create, to link it to shiboken's configuration. All the harcoded references were replaced by dynamic references. Also new labels were included to properly cross reference topics. Checked the spell on many rst files too. Task-number: PYSIDE-363 Change-Id: I11a50b1f9eee48a00a3de6f957942eb0823eba47 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Remove deprecated optionsAlexandru Croitor2018-04-251-8/+0
| | | | | Change-Id: I0ea2b56778b2364a25f6999c2c18ef0c0a436583 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Replace 'osx' with 'macos' in installation scriptsAlexandru Croitor2018-04-252-19/+19
| | | | | Change-Id: Ibe5412edb6467594c5d2fd80545d9e1572a286cb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Replace 'osx' in option names with 'macos'Alexandru Croitor2018-04-251-15/+15
| | | | | Change-Id: Ia52958c02566447226a2aaeadd3f18e8d07af65f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Remove unused prepare_coin_sources.py fileAlexandru Croitor2018-04-241-143/+0
| | | | | | Change-Id: Id748527a5afe9a6dc12907c81ed9e4d4fd3e1a49 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Simo Fält <simo.falt@qt.io>
* Add QtPositioning and QtLocationFriedemann Kleint2018-04-249-1/+414
| | | | | | Task-number: PYSIDE-487 Change-Id: Ie44d8472beb3f1a5ab75caafd1f58b512b53ccb1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QtXmlToSphinx: Handle ordered listsFriedemann Kleint2018-04-241-7/+25
| | | | | | | | | | Introduce an enumeration for the list type and handle ordered lists like bullet lists with a different separator. Task-number: PYSIDE-640 Change-Id: I2e770f2dd56958627e423822b8f4b1c23fdd4e16 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken: Strip parameters of invalid type with a default value expressionFriedemann Kleint2018-04-232-5/+15
| | | | | | | | | | | | | | | | For example for: void QWebEnginePage::findText(const QString &subString, FindFlags options = FindFlags(), const QWebEngineCallback<bool> &resultCallback = QWebEngineCallback<bool>()) the resultCallback will be removed and a binding for void QWebEnginePage::findText(const QString &subString, FindFlags options) generated. Task-number: PYSIDE-487 Change-Id: I6299d1735ad6c00e257daecb64d8f2f235140a98 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>