aboutsummaryrefslogtreecommitdiffstats
path: root/sources
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2017-10-2722-196/+413
|\ | | | | | | Change-Id: I94cb5a7dab97cff3591bac534228bfd3e3ad5938
| * Support the qApp macro correctly, final version incl. debugChristian Tismer2017-10-2716-170/+383
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For short the new features: - there is a qApp in QtCore, QtGui and QtWidgets for compatibility, and also in __builtins__ for a true macro-like experience. - if you delete any qApp variable, the Q*Application is reset and you can start over. Long description: There is a qApp macro in Qt5 which is equivalent to Q*Application.instance() . Python does not have macros. Both PyQt5 and PySide2 have an according structure in QtWidgets. In the case of PySide2, the qApp variable is first initialized to None and later to QApplication(). This does not reflect the original sense of the qApp macro, because - it only handles QApplication, - it does not handle destruction. This "macro" should live in QtCore, but both PyQt5 and PySide2 decided to put this in QtWidgets. As a compromize, I propose to put qApp into all three modules, and into __builtins__ as well, so wherever you create an application, you find this "macro" in place. While changing the code, I stumbled over the template set_qapp_parent_for_orphan. I tried to make sense out of it and finally removed it. There were no side effects but bug PYSIDE-85 is gone, now. With some extra effort, I created a singleton qApp that changes itself. This way, a true macro was simulated. Note that this was not possible with a garbage collected variable, and I had to make shiboken aware of this. As the final optimization, I turned qApp also into a fuse variable: Delete any qApp variable and Q*Application will finish when there is no extra reference. Task-number: PYSIDE-85 Task-number: PYSIDE-571 Change-Id: I7a56b19858f63349c98b95778759a6a6de856938 Reviewed-by: Christian Tismer <tismer@stackless.com>
| * Stabilize QtQml/bug_847.pyFriedemann Kleint2017-10-271-1/+8
| | | | | | | | | | | | | | | | | | Add more checks for QML loading. Wait until the window is exposed until starting the safety timer and increase its interval. Task-number: PYSIDE-431 Change-Id: I6225f2357d9576be15c6134d26982939698a9984 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * Fix the signature of the Q*Application constructorChristian Tismer2017-09-2910-33/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Q*Application had PySequence as Parameter, although only QStringList is accepted. That resulted in an implausible error message when a list of, say, Integers was given. This patch - replaces PySequence by QStringList (one more tuple layer), - fixes QCoreApplication to give the same kind of error messages, - renames the shiboken function sequenceToArgcArgv to listToArgcArgv and changes it to only allow list descendents. We also changed signature.typing in one line to display List[str] correctly. I think this belongs more to PySide-331, a fixed qApp. Task-number: PYSIDE-510 Task-number: PYSIDE-331 Change-Id: Ib256c6a2db05a3db826454e1bf1b4729d59a240b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Signature: tiny refinement in ReloaderChristian Tismer2017-09-291-3/+3
| | | | | | | | | | | | | | | | | | This is totally irrelevant and a tiny optimization that is really not needed. Do what you want. Task-number: PYSIDE-510 Change-Id: I5d6d2f5f94130d4b03b4d70525b35139e82b9f5e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | shiboken: Add the c++ header include paths of g++Friedemann Kleint2017-10-251-0/+21
| | | | | | | | | | | | | | | | | | | | It seems standard C++ headers are not found by clang when run g++ 6.3.X on RHEL 7.4. Task-number: PYSIDE-431 Task-number: PYSIDE-513 Change-Id: Ibd400cfa854ce3a9f763c593969cd063346f8056 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Signature: Fix missing constant for 5.10Christian Tismer2017-10-131-0/+1
| | | | | | | | | | | | | | | | | | There is a crash in 5.10 because a signature is not recognized. This is only a warning, but turned into an error for the testing. Should we drop that, eventually? Change-Id: Idd183842575e3890b018c8bc82b6e272e2980b9d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | shiboken: Add Vulkan supportFriedemann Kleint2017-10-071-4/+17
| | | | | | | | | | | | Task-number: PYSIDE-431 Change-Id: I35995213d04a3fb7a6c8399b1397884cf43c09ba Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Add -Wno-microsoft-enum-value for MSVCFriedemann Kleint2017-10-071-0/+1
| | | | | | | | | | | | | | | | Silence numerous warnings: warning: enumerator value is not representable in the underlying type 'int' Change-Id: I82b4547c1392e1d65515e0bd51d5d76bac185a9e Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Windows: Define NOMINMAX for every moduleFriedemann Kleint2017-10-073-10/+2
| | | | | | | | | | | | | | | | As of 5.10, windows.h is included by qrandom.h in QtCore. Task-number: PYSIDE-431 Change-Id: I69cc5e3275fba09f1a4990a4e5d37253b4664a95 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Signature: Remove pre 5.7 parts, fix coding styleFriedemann Kleint2017-09-292-16/+5
| | | | | | | | | | | | | | | | Complements 30a1c9c41e5e6d4166f171b9477c6f46cafa782f. Task-number: PYSIDE-510 Change-Id: I76e433dc35dbe88dbf254b19b82b8c392af0dad4 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2017-09-2822-19/+8521
|\| | | | | | | Change-Id: I47521e21977b1f17fcc65590f565270b2440a48b
| * Signature: support the new types and constants of 5.9 part 3Christian Tismer2017-09-281-0/+1
| | | | | | | | | | | | | | | | This patch adds a type to MSVC. Task-number: PYSIDE-510 Change-Id: I3290c91cd6f2937bddf8ec1f673b4a672bc49db3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Signature: support the new types and constants of 5.9 part 2Christian Tismer2017-09-283-13/+80
| | | | | | | | | | | | | | | | | | This patch reduces the string size a bit to meet the MSVC restriction to 16k only. This limit is reached by QtGui/qopenglfunctions_wrapper.cpp . Task-number: PYSIDE-510 Change-Id: Ibb4a9103775cb308a0f39b3375c4948da6016189 Reviewed-by: Christian Tismer <tismer@stackless.com>
| * Signature: support the new types and constants of 5.9Christian Tismer2017-09-271-2/+23
| | | | | | | | | | | | | | | | | | This patch covers macOS and Ubuntu (which actually had one addition). No idea how oftem we must iterate ;-) Task-number: PYSIDE-510 Change-Id: I950c57c2d225b289eafc46e7f1758338b4d62838 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Signature: buglet makes clang complainChristian Tismer2017-09-251-1/+1
| | | | | | | | | | | | | | Some small oversight is now an error after the last clang update. Change-Id: I61b118d772cacdf7950e3b43e76cc4351c3062f3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Signature: fix documentationChristian Tismer2017-09-251-1/+4
| | | | | | | | | | | | | | | | There was some glitch that made a few sentences incomplete. Task-number: PYSIDE-510 Change-Id: Idd11c7a0d9f31aab4ab80e6fd6002f2320695ad5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Signature: Improve error reportingChristian Tismer2017-09-252-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | It is likely that with Qt 5.9 we get new signature text that is not recognized. This becomes a problem because COIN takes much time. This patch does not stop on the first parser error, but collects all warnings and raises an error at the end. Task-number: PYSIDE-510 Change-Id: I898e0a7a59e8313c115d7ce8160908bf85d4140c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Signature: Simplify parser by not reloading mappingChristian Tismer2017-09-253-154/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The mapping had been reloading on demand. This is overkill, since we only want to initialize the new constants. This patch replaces reloading by explicit init functions. This simplifies the parser and even the loader, because sys.path is no longer relevant and no context manager is needed for a single sys.path patch. Task-number: PYSIDE-510 Change-Id: I9e3a45cb10570211183952bd517abb0084b94f47 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Implement introspection with __signature__ packageChristian Tismer2017-09-2022-19/+8488
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The signature module was turned into a package under 'PySide2/support/signature'. The package is completely isolated so that nothing is leaking into the normal import machinery. The package is also not initialized unless a __signature__ attribute is accessed. The only change to Python during a PySide run is the existence of the __signature__ attribute. As a side effect, all tests run at the same speed as before this extension. The module does not actively import PySide modules. Instead, it inspects sys.modules and reloads its mapping.py if needed. Example usage: >>> PySide2.QtWidgets.QGraphicsAnchorLayout.addAnchors.__signature__ >>> PySide2.QtWidgets.QGraphicsAnchorLayout.__signature__ The module has been thoroughly tested on macOS. I consider this ready. Task-number: PYSIDE-510 Change-Id: Ibb231a7fbb4ccc1a7249df55e3881a4e21a19c0d Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Fix typo in QtDataVisualization testSimo Fält2017-09-271-1/+1
| | | | | | | | | | Change-Id: I834dd71f8c02706d579a9f524a3fc39c06be6c53 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Fix license headerSimo Fält2017-09-261-1/+0
| | | | | | | | | | Change-Id: Ied91391eea8b7178e338d217f90408235a04ddda Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Add Qt DataVisualizationFriedemann Kleint2017-09-255-0/+349
| | | | | | | | | | | | Task-number: PYSIDE-487 Change-Id: I7e4e8b617b95ec4008dc0fc4bea9974871425b2d Reviewed-by: Christian Tismer <tismer@stackless.com>
* | CodeModel: Handle access of inherited classesFriedemann Kleint2017-09-255-30/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Store the access of the base class in the code model. Remove protected/private base classes in the abstract meta builder as otherwise invalid code will be generated for classes like QAbstract3DGraph : public QWindow, protected QOpenGLFunctions when the protected hack is not in use (on Windows). Task-number: PYSIDE-487 Change-Id: I5bc2dad16f903da86e6e41450c2f9a76726ac028 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | QtCharts: Add a reference in QChart::addSeries(QAbstractSeries*)Friedemann Kleint2017-09-251-0/+5
| | | | | | | | | | | | | | | | | | | | | | The chart takes ownership of the series. Fixes an exit crash in the charts example. Amends b814f865c0618faaaacb710bd0e8eb2804aaed00. Task-number: PYSIDE-487 Change-Id: I2efcaa58031f86b4c21c9e62f56b51338f80e12d Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Replace _ARCH_ by 64/32bit in LLVM_INSTALL_DIRFriedemann Kleint2017-09-221-0/+17
| | | | | | | | | | | | Task-number: PYSIDE-431 Change-Id: I6d4ea037ab0c524f305ed72f95745deb410b8971 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | qtdocparser: Default to suffix '.webxml'Friedemann Kleint2017-09-151-10/+10
| | | | | | | | | | | | | | | | | | '.webxml' is the qdoc default suffix. Check for '.webxml', first, '.xml' second for compatibility. Task-number: PYSIDE-363 Change-Id: I90c6e8d407dc0afe7ef4df4d83b48ddb43d22955 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Typesystem parser: Look up external injected code in typesystem pathFriedemann Kleint2017-09-153-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Make TypeDatabase::modifiedTypesystemFilepath() public and add parameter preventing it from stripping the path so that it can handle 'glue/snippet.cpp' correctly. This removes the need to run shiboken with the working directory set to the type system file path in order to find the external injected code snippets for documentation generation. Task-number: PYSIDE-363 Change-Id: Ic61cc1d1187e326e5255b29759a9d42e27ebd8d4 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | QtQuick: No longer declare GLuint to be a primitive typeFriedemann Kleint2017-09-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes warnings like: qt.shiboken: (quickwidgets) signature 'glProgramUniformMatrix4x3fv(uint,int,int,unsigned char,const float*)' for function modification in 'QOpenGLExtraFunctions' not found. Possible candidates: glProgramUniformMatrix4x3fv(GLuint,int,int,unsigned char,const float*) in QOpenGLExtraFunctions which are produced by the QtQuickWidgets module including the QtGui module (with generate="no"). Due to primitive type declaration, the typedef is not resolved, which causes the mismatch and the confusing yet harmless warning. Amends eb28469e920696a1d0833c55b5c20c5c5a6f9d5e. Change-Id: Ic22f7c7dd0ca009cf42ea8a5f1b2513b8727c3e6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Do not consider gl.h a system include file (all platforms)Friedemann Kleint2017-09-131-3/+19
| | | | | | | | | | | | | | | | | | | | Amends db904f8e9ed06eac37151c9a8b955c63c1eb8a46 to apply to all platforms since the issue is also present on Linux. Task-number: PYSIDE-516 Change-Id: I564506f6aefc26e95beae90d95643553eba5dbff Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Add bindings for QRegularExpressionFriedemann Kleint2017-09-054-0/+69
| | | | | | | | | | | | Task-number: PYSIDE-487 Change-Id: I5902ce37ad40b8180b6710b3e7cd091925ad392d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Add bindings for QVersionNumberFriedemann Kleint2017-09-054-0/+58
| | | | | | | | | | | | Task-number: PYSIDE-487 Change-Id: I0106d87418c757d14c2dd7dd9fd1ab9d0c66a449 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Windows: Do not consider gl.h a system include fileFriedemann Kleint2017-09-041-1/+19
| | | | | | | | | | | | | | | | Amends 10453490629859a01048d0b21688d6617279eeaf. Task-number: PYSIDE-516 Change-Id: Ie4bc2008669e4e34bedf0575de3ff75adbc2413e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | shiboken2: Make message about unmatched functions more verboseFriedemann Kleint2017-09-041-2/+23
| | | | | | | | | | | | | | | | List all member functions if a candidate cannot be found (spelling error or similar). Change-Id: I86ca1556078051d2fc1f78f2091f5176f2a65423 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Re-enable bindings for QUuidFriedemann Kleint2017-09-044-7/+49
| | | | | | | | | | | | | | | | | | Remove comments, add test. The claimed cyclic dependency apparently disappeared when porting to Clang. Task-number: PYSIDE-487 Change-Id: I44556fb5de92d83bd9471a41a03db9f6eeff0a31 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | global.h.in: Remove include of gl.h and related workarounds for WindowsFriedemann Kleint2017-09-011-14/+0
| | | | | | | | | | | | | | | | | | | | The include causes clang parse errors due to redefinition of APIENTRY on Windows 32bit. It seems it is no longer required after the fixes to the Clang include handling. Task-number: PYSIDE-528 Change-Id: Ie182e0cac4e0310b31c45ee68e2148500a6e9e34 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Refactor ShibokenGenerator::initPrimitiveTypesCorrespondences()Friedemann Kleint2017-08-291-23/+21
| | | | | | | | | | | | | | Introduce arrays for the types. Change-Id: Iccafc6a9c648dc32db0445ab1dd43f91bfd5c146 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Refactor TypeEntry::isCppPrimitive()Friedemann Kleint2017-08-291-13/+18
| | | | | | | | | | | | | | | | | | Introduce a helper function returning a sorted string vector to avoid converting each type string to a QByteArray. Change-Id: If9036d6251f5cc8d83ae13c8b5c3f731a6738657 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Enable more OpenGL functions with arraysFriedemann Kleint2017-08-291-9/+289
| | | | | | | | | | | | | | | | | | Add <array> modification for more functions. Task-number: PYSIDE-354 Task-number: PYSIDE-516 Change-Id: I083256d776067a16d780581c291da7d62fc47e14 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | FunctionModification: Make it possible to specify a regular expressionFriedemann Kleint2017-08-296-14/+65
| | | | | | | | | | | | | | | | | | It should make it easier to specify the <array> modifications for GL functions. Task-number: PYSIDE-516 Change-Id: Ieb2e540f61785d13ee46a196a18d03b311d308e1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | typesystem_core_common.xml: Define int64_t, uint64_t as primitive typesFriedemann Kleint2017-08-291-0/+2
| | | | | | | | | | | | | | | | | | They are used for GLint64. Amends 4ec9cfa3c6b895c0cf50227c189cfa542de88b64. Task-number: PYSIDE-516 Change-Id: I0be5d1302629ea156fb3dde07dd810f5730b064e Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2017-08-285-20/+19
|\| | | | | | | Change-Id: I073b05f8b39c0af32aa57ce3589c1aac2d712213
| * Fix QtUiTools not to depend on Qt5Designer being presentJanus Troelsen2017-08-241-2/+2
| | | | | | | | | | | | Task-number: PYSIDE-552 Change-Id: Iff8dd7247bfec94be0cf4f5cbcfbfca1eb44d209 Reviewed-by: Christian Tismer <tismer@stackless.com>
| * consistently name site-packages in Shiboken and PySideChristian Tismer2017-08-245-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | The variable used for the python site-packages is inconsistent. Instead of "SITE_PACKAGE", we use "PYTHON_SITE_PACKAGES" everywhere. Task-number: PYSIDE-563 Change-Id: I4d2d49f20f5a0a13439bc7b8c79ab318cd831cb9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Julien Schueller <schueller@phimeca.com> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * Streamline Qt5 detection on macOSAlexandru Croitor2017-08-241-12/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This consists of a few things: - Remove the detection and usage of ALTERNATIVE_QT_INCLUDE_DIR in setup.py, because CMake takes care of finding the correct Qt include headers. - Add detection of framework / non-framework includes in the CMake rules, instead of in the setup.py script. - Don't pass QT_QMAKE_EXECUTABLE from setup.py to CMake, because it is not being used. It was previously used for detecting Qt4 via the CMake FindQt4.cmake file. Now it is done by find_package() which detects qmake from the environment. - Get rid of the old "/Library/Frameworks" QT_INCLUDE_DIR, which was where the official Qt 4.8.x packages installed Qt. - Deprecate usage of ALTERNATIVE_QT_INCLUDE_DIR. Now it is only used if CMake fails to detect the proper include headers of Qt5 (which should not happen). Change-Id: I829b92bc0d40ae7eb418be27c735fc095e557820 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Fix the chain of issues regarding QSslConfigurationAlexandru Croitor2017-08-244-1/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The failure was seen on Windows CI build, but was actually present on all platforms if the QSsl checks were properly fixed, or if certain CMake versions randomly decided to force C++11 usage. The first issue was that QSsl wrappers were not generated on all platforms because the C++11 standard was not forced for the compilation tests done in the check_qt_class macro. This is a bug in CMake, and the official way of fixing this is introduced in the yet unreleased CMake 3.9 version. The current fix is a workaround to explicitly pass the C++11 standard switch to the try_compile invocation. The next issue concerns handling of const char[] C++ types. There are three such members in QSslConfiguration, which caused build failures due to incorrectly generated code. The solution is to treat "const char[]" types as "const char*" types, which generates correct conversion code. Tests were also added to check for such cases. Change-Id: I874a3591dfc5f385338de7e3aff2a2c0dd2f5719 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | shiboken: Output argument index in warning about unsupported parameterFriedemann Kleint2017-08-241-7/+12
| | | | | | | | | | | | | | It makes it easier to generate modification tags by script. Change-Id: I3d256371974e05eee336eaac3541029078ea2cc5 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Prefix all warning messages by base prefix of typesystem fileFriedemann Kleint2017-08-233-1/+17
| | | | | | | | | | | | | | | | shiboken is run in parallel when building PySide2, so it is sometimes hard to tell where warnings come from. Change-Id: Iaccd91543e14e6e9c38ebfa2b0c285417f924d03 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Shiboken2: Suppress warning for parameters modified by <array>Friedemann Kleint2017-08-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Add a check to checkTypeViability(), suppressing the warnings like There's no user provided way (conversion rule, argument removal, custom code, etc) to handle the primitive argument type 'const unsigned int *' in function 'QOpenGLShaderProgram::setUniformValueArray(const char * name, const unsigned int * values, int count)'. when the type was modified to be an array. Task-number: PYSIDE-354 Task-number: PYSIDE-516 Change-Id: Id5fa4789024cc82533d15a61b893a3f60baa4bff Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Shiboken2: Add an index check for the <array> modificationFriedemann Kleint2017-08-221-1/+6
| | | | | | | | | | | | | | | | | | Amends change 1578d14d1693122d4bcacede0d77527d8e898629. Task-number: PYSIDE-354 Task-number: PYSIDE-516 Change-Id: I50e5d0762f1b049a511c62f8aa8d08da4cb563d9 Reviewed-by: Christian Tismer <tismer@stackless.com>