aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.9' into devHEADdevFriedemann Kleint2017-05-189-97/+304
|\ | | | | | | Change-Id: I78bace9fbc5e8f19bf345ce3f978826507672227
| * Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2017-05-183-9/+28
| |\ | | | | | | | | | Change-Id: I87da005aa528af30856e077769463c3c7e1ca18b
| | * Generate #error when a minimal constructor could not be foundFriedemann Kleint2017-05-103-9/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The occurred in 3 places, one of which generated #error and the others used qFatal(). Change it to always generate #error with a bit of context to make it possible to detect the source of of the problem. Change-Id: Icd93b1beec908b57fa72457d6ec1e16a15e5ff14 Reviewed-by: Christian Tismer <tismer@stackless.com>
| * | Add rejection by function return type and argument typeFriedemann Kleint2017-05-185-2/+45
| | | | | | | | | | | | | | | | | | | | | | | | Extend TypeRejection accordingly. Task-number: PYSIDE-516 Change-Id: Ibf97f3c16498b26e63f4bde5b0ae21acc3dd0c44 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | TypeRejection: Use QRegularExpressionFriedemann Kleint2017-05-185-63/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor TypeRejection to use one regular expression for the class name and one for the various strings to be matched depending on the match type enumeration instead of 4 fixed string fields. Task-number: PYSIDE-516 Change-Id: Ifb945e3be39fbedfd802c4d32de7de443cf53f49 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | Improve rejection messagesFriedemann Kleint2017-05-181-23/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In AbstractMetaBuilderPrivate::traverseFunction(), store the unmodified signature with return type before resolving typedefs for the messages. Extend the error messages about parameters and output them to qWarning() and rejection logs consistently. So: Unmatched argument type - QOpenGLExtraFunctions::glIsSync(GLsync) -> GLboolean becomes: Unmatched argument type - GLboolean QOpenGLExtraFunctions::glIsSync(GLsync): unmatched type 'GLsync' in parameter #1 "sync" Task-number: PYSIDE-516 Change-Id: Ifd680af1cd6d403d9b73ba3e40d06abe274cf359 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | Improve Clang detectionFriedemann Kleint2017-05-181-5/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | Check LLVM_INSTALL_DIR, CLANG_INSTALL_DIR and llvm-config and make messages more verbose. Task-number: PYSIDE-323 Change-Id: Iaff24d7c80853f381d227ebdccbb3abc4497a199 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | | Merge remote-tracking branch 'origin/5.9' into devFriedemann Kleint2017-05-092-2/+37
|\| | | | | | | | | | | Change-Id: I55f0c07e3e17231e68c9b9a8bd26cdf9470f757c
| * | Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2017-05-092-2/+37
| |\| | | | | | | | | | Change-Id: I609232c2b63a01c83ca8e3abe4d6c3d191d397b2
| | * Fix headergenerator to build under C++11Christian Tismer2017-05-092-2/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For a long time, headergenerator.cpp did only generate destructors, when the following condition was set: if (!avoidProtectedHack() || !metaClass->hasPrivateDestructor()) { // generate destructor } The condition does not work for C++11. When trying to remove the protected hack, I remembered that I used an ugly CMake trick to make VS 2015 work. This hack provided exactly the missing destructors. I tried very hard to make this hack into a patch for Linux and macOS, too. Unfortunately, when built without the protected hack, Clang enforces a destructor declaration, but then the linker reports an unresolved symbol. I have found no way to circumvent this. Conclusion: Unless we find a way to make Clang work correctly, we have to leave the protected hack as-is on macOS. But then, the whole effort of hack removal makes no more sense. Fortunately, the ugly work-around on Windows is gone, now. So this change involves shiboken and PySide, and probably the one will not work without the other. Task-number: PYSIDE-504 Change-Id: I92b372c15fd2a4280a249de4c099eeb1f18fedd3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devFriedemann Kleint2017-05-052-3/+3
|\| | | | | | | | | | | Change-Id: Ia2e1960fcf0b5c87e99adfc710b97f72b6cc7dc8
| * | Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2017-05-052-3/+3
| |\| | | | | | | | | | Change-Id: Icb174588038f02582b395529bffc98f50e91e141
| | * CMakeLists.txt: find python interpreter firstDavide Pesavento2017-05-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CMake documentation recommends ordering find_package(PythonInterp) before find_package(PythonLibs) when both are called. Change-Id: I582e1d2631f78bb0b9c864acf189ca5e50d976c5 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| | * Fix build on Windows due to unsupported string concatenation issueAlexandru Croitor2017-04-281-1/+1
| | | | | | | | | | | | | | | Change-Id: Ie8cdf451380a56bea4b23e3d08953f8c7690c95e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devFriedemann Kleint2017-04-289-46/+137
|\| | | | | | | | | | | Change-Id: I7d2d0be168d55ffe9bf368f130d1407992be9d1c
| * | Merge "Merge remote-tracking branch 'origin/5.6' into 5.9" into 5.9Friedemann Kleint2017-04-283-15/+23
| |\ \
| | * | Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2017-04-283-15/+23
| | |\| | | | | | | | | | | | | Change-Id: I91104b0228146de235e1bdb879d016358da4c19a
| | | * shiboken test/Photon: Properly define noexceptFriedemann Kleint2017-04-281-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Defining noexcept as empty leads to a compile error when including <map> of VS2015/U3. Introduce a macro PHOTON_NOEXCEPT and also enable it for VS2015. Amends change 6c44bbf45124973e8f1a8c35fb28f0537274a794 Task-number: PYSIDE-324 Change-Id: Ie3157f6e62c8e3fe443842513983582edf491d18 Reviewed-by: Christian Tismer <tismer@stackless.com>
| | | * Fix Inheritance of PySide, Windows supportChristian Tismer2017-04-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes a logical error, only. The mentioned patch is relevant only when the “protected hack” is _not_ applied. Maybe this will change again, when I evict the protected hack, so feel free to use this change or ignore it. Task-number: PYSIDE-500 Task-number: PYSIDE-331 Change-Id: I58c2b211f71786e613e18ea99c62f0fac337ce14 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | | * Handle recursive typesystem includesFriedemann Kleint2017-04-261-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For QtMultimedia, the QMediaPlayer::setVideoOutput() overloads require including QtMultimediaWidgets' typesystem to make QVideoWidget known. This caused an endless recursion including QtMultimedia's typesystem. Fix by - ensure modifiedTypesystemFilepath() always returns an absolute path even if the file exists so that it is always matched in m_parsedTypesystemFiles - Insert current file into m_parsedTypesystemFiles at the beginning of parseFile() to detect recursion early on. Task-number: PYSIDE-487 Change-Id: I7110c9f1bf144b82a14282e94b894bfb0522ba58 Reviewed-by: Christian Tismer <tismer@stackless.com>
| * | | Fix clang parser to work with Qt framework buildsAlexandru Croitor2017-04-285-27/+101
| |/ / | | | | | | | | | | | | | | | Change-Id: I46f957168ed3d24183d0102a687a3b693f2782c9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
| * | shiboken: Output class name in warnings about wrong indexFriedemann Kleint2017-04-261-4/+13
| | | | | | | | | | | | | | | Change-Id: I64bf848858fa07a27fc357d83ff99c8d3f94ba91 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devFriedemann Kleint2017-04-2114-2031/+38
|\| | | | | | | | | | | Change-Id: Iac998ef8add109fd58e486d9b9a04f7d3990c022
| * | Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2017-04-211-5/+25
| |\| | | | | | | | | | Change-Id: I3000fca52e7447c2b53b07a0aca8edc24aa903cb
| | * Fix Inheritance of PySide, Windows supportChristian Tismer2017-04-211-5/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is augmenting the general fix. We had not tested the case with “#define AVOID_PROTECTED_HACK”. This setting can be used under Linux and macOS, but is necessary under Windows, because the recent MS compilers do not allow the setting “#define protected public”. Therefore, certain special cases had to be circumvented by wrapper type casts, and a few more header files were needed. This patch was not tested on Windows, but built on macOS with the mentioned setting. Exhaustive tests can be found in PySide. They are now working as before. Task-number: PYSIDE-500 Change-Id: I9c46d0f181f810879dc75326f2cf39fd2ec853f3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | Replace google-dense maps by std::unordered_mapFriedemann Kleint2017-04-2113-2026/+13
| | | | | | | | | | | | | | | | | | | | | | | | Also allows for removing Module::init() since empty/ deleted keys no longer need to be set. Change-Id: I83521833618d962d6faace7a7c9297916c195a4b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devFriedemann Kleint2017-04-138-122/+152
|\| | | | | | | | | | | Change-Id: Ib3be5d174442af28a36b51a715c347c245706264
| * | Change AbstractMetaEnumValueList to be a typedefFriedemann Kleint2017-04-133-17/+2
| | | | | | | | | | | | | | | | | | | | | | | | AbstractMetaEnumValueList::find() was not used, change the class into a typedef QVector<AbstractMetaEnumValue *>. Change-Id: I5f9f2a4b088c61c0b8fc53da1a681bb4cb02d99d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2017-04-135-105/+150
|/| | | |/ | | | | Change-Id: Ie57d0be4d518e13c6cd69a84e46e8bdacc122524
| * Fix Inheritance of PySideChristian Tismer2017-04-133-16/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is the third stab at fixing the inheritance of PySide. The problem is now solved. Inheritance was already correct when the functions were disjoint. But as soon as a function existed in both a class and a sub-class, only the class has won, and the sub-class was ignored. This patch fixes that problem. There are 49 new functions, and of course there is QApplication.palette() without an argument. Function ‘searchForEnumScope’ was now corrected, so that the work-around no longer was needed. I had to extend its search. It turned out that the same fix for inheritance was also needed for a correct listing of the allowed function signatures. I finally factored out a new function that is used twice. Exhaustive tests can be found in PySide with the same name. Task-number: PYSIDE-331 Change-Id: If3d7d94f6ed351b5de03e26c9e3e65cf4a5f8ed7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Fix Python extension suffix selection on LinuxAlexandru Croitor2017-04-112-89/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows building Shiboken in any configuration (debug or release) against any version of a Python interpreter (debug or release). Previously specifying --debug forced the user to use a debug version of the Python interpreter. The patch also removes an unnecessary cmake file, which was used in the past to find the location of Python libraries. This has been handled by CMake itself for a while now. Change-Id: I70edcdfee5fde246c1c41cd5b36353cc18aa9bdd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Generators: Replace QList by QVectorFriedemann Kleint2017-04-069-53/+57
| | | | | | | | | | | | | | QList will be deprecated in Qt. Change-Id: I7b1aea46f800908d775aca2610a2215e164c308e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | TypeDatabase: Replace QList by QVectorFriedemann Kleint2017-04-0610-37/+79
| | | | | | | | | | | | | | | | | | | | QList will be deprecated in Qt. Split out a new header typedatabase_typedefs.h with typedefs from typesystem_typedefs.h. Change-Id: I15fc1f7edcdc682c32b2e9b935858681e02d35c6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | AbstractMetaLang/Typesystem: Replace QList by QVectorFriedemann Kleint2017-04-0618-65/+72
| | | | | | | | | | | | | | QList will be deprecated in Qt. Change-Id: I82c997366736c1f976b142cb142da39976736f49 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | CodeModel: Replace QList by QVectorFriedemann Kleint2017-04-063-27/+31
| | | | | | | | | | | | | | QList will be deprecated in Qt. Change-Id: I43e2d1b7c8fb462c82250bb59ec88375515deb9f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Port to QRegularExpressionFriedemann Kleint2017-04-068-112/+171
| | | | | | | | | | | | | | Port most QRegExp to QRegularExpression. Change-Id: Icb551f16e97c409fc979c1caa10f6496248202b2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Replace foreach by range-based forFriedemann Kleint2017-04-0526-623/+769
| | | | | | | | | | | | | | foreach will be deprecated in Qt. Change-Id: I8b3398bb543056de6dd11d18977928ae719819a2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Introduce overrideFriedemann Kleint2017-04-057-66/+66
| | | | | | | | | | Change-Id: I5d4f586301ce38a92bc9c3b365af0916df7d0663 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Port Shiboken to use ClangFriedemann Kleint2017-04-0578-15407/+1968
| | | | | | | | | | | | Task-number: PYSIDE-323 Change-Id: I4a144d660fd08b75fa3c8b4bfca57213819f00a6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | ShibokenGenerator::guessScopeForDefaultValue() Do not qualify macrosFriedemann Kleint2017-04-051-0/+6
|/ | | | | | | | | | | Simple macros are not expanded by Clang, so, qualifying them should be avoided. The code has been observed to trigger for "ULONG_MAX", "USHRT_MAX" and "GL_UNSIGNED_SHORT". Task-number: PYSIDE-323 Change-Id: Ic5c3a0c6e7e4c78b2d62e032e4172702b357eb68 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* TypeDatabase: Refactor TypeDatabase::normalizedSignature()Friedemann Kleint2017-03-294-20/+45
| | | | | | | | | | | The repeated construction of a QRegExp in loops shows up in the profiler. Change the API to accept a QString and store the regular expressions in a vector. Change-Id: Ic7ac7cdcd55beb901116589083f87c87fb48a4dd Reviewed-by: Christian Tismer <tismer@stackless.com>
* Generators: Generate reinterpret_cast<> for SbkObjectType *Friedemann Kleint2017-03-282-44/+54
| | | | | Change-Id: I27196d4f5be0257e3ab87c291e4ecb6ff234a505 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Generate reinterpret_cast<> for cppSelfFriedemann Kleint2017-03-281-4/+6
| | | | | Change-Id: Iafb5d014f9f33591aebf0ab4b99e3e6942a4d51a Reviewed-by: Christian Tismer <tismer@stackless.com>
* libshiboken: Take const SbkConverter/SbkObjectType * where appropriateFriedemann Kleint2017-03-284-53/+60
| | | | | Change-Id: I0597f4c4f2eb0e8d4979690eeb1f17d78cf4e619 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Generator::minimalConstructor(): No longer generate C-style castsFriedemann Kleint2017-03-281-7/+12
| | | | | | | | | | bool: false Other primitives: int(0) Flags: Flags(0) Enums: static_cast<Enum>(0) Change-Id: Ic24c2d95106682508c58c78d873137f8a91bc3f8 Reviewed-by: Christian Tismer <tismer@stackless.com>
* TypeDatabase: Refactor API version checkingFriedemann Kleint2017-03-247-52/+61
| | | | | | | | | | | | The repeated construction of a QRegExp in the version checking loop shows up in the profiler. Change the API to accept a QString, reducing conversions and remove obsolete API. Port the version checking code to use QRegularExpression and QVersionNumber and store the regexps in a vector. Change-Id: Id3e509e065d73699f49109df1f184edbefb8a09a Reviewed-by: Christian Tismer <tismer@stackless.com>
* Improve the 'Value' type wrapper registrationPankaj Pandey2017-03-177-17/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | This commit works around some bugs where multiple/incorrect wrappers were registered for some types: - In cases where the first field of a class was itself a Value type instance (instead of pointer), both the parent and child wrappers had same cptr address, causing confusion in retrieveWrapper. Previously, this was worked around by always creating a new wrapper for all Value type fields on every access, causing leaks. We now check for colocated child wrappers and return that instead of creating new wrapper, so each Value type subfield need only have one wrapper. - Some cases of incorrect wrapper registration due to an existing wrapper which shiboken could not figure being deleted are fixed, specifically cases where the newly registered wrapper is from object created in python or owns its wrapper. - Do not release incorrect wrapper in case of address reuse by checking that the registered wrapper is indeed the wrapper being released. Task-number: PYSIDE-217 Task-number: PYSIDE-224 Change-Id: I019c078566c4b9b90e63c5d991e2e372d39c632a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Implement partial QSharedPointer supportAlexandru Croitor2017-03-1731-246/+1660
| | | | | | | | | | | | | | | | | | This change introduces a new XML tag called smart-pointer-type which currently only supports implementations of C++ shared pointers. This allows using objects pointed to by a shared pointer inside python code. There is one known limitation at the moment. Python shared pointer objects are only created as a result of using C++ API with shared pointers in the method signature (either the return type or argument type). Thus is it is not currently possible to instantiate shared pointer objects directly, e.g. p = ModuleName.SharedPointer() will not work. Task-number: PYSIDE-454 Change-Id: Iacf9fcc8613fbf9bd94e179169d78da8aac58f45 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Mention class name in warning about Unknown OperatorFriedemann Kleint2017-03-171-5/+18
| | | | | | | | Currently happens with Clang 4.0 for operator! for Point[F]. Task-number: PYSIDE-323 Change-Id: I212d107ce15dc98b400e898181655abdebdfc848 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Refactor the character handler of the typedatabase XML parserFriedemann Kleint2017-03-173-11/+10
| | | | | | | | | | | | The function is called from the XML parser as well as with strings from an imported file. Change the function to be a template taking a QString/QStringRef and add necessary overloads to the setters. This prevents newlines and unused content in the XML files from unnecessarily being converted to a QString. Change-Id: Ifbac37c9099d799a8a334f46f78050dcbd52fad1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>