aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix text case of QtMacExtras wrapper cpp file nameAlexandru Croitor2017-06-231-1/+1
| | | | | | | | | This is probably the reason for the build failures in the CI because the filesystem there is case sensitive. Change-Id: I9f3cafbc8f1d29a0974229d466fbd22ec2b91491 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Silence some build warnings when building pysidetestAlexandru Croitor2017-06-231-0/+3
| | | | | | Change-Id: I91a1c87e6153a65a6e4088a41fbe0f696c2dd058 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Remove incorrect dependency in pysidetest targetAlexandru Croitor2017-06-232-1/+4
| | | | | | | | | | | Even though the final library name is libpyside, the actual target that generates that file is called pyside2, as indicated by the project(pyside2) command in the CMakeLists.txt file. Also set the CMake policy of not ignoring incorrect dependencies. Change-Id: Iba65dfd5fe7e34e7557c756a838017fe48f0ffd5 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Remove unnecessary conditional class checksAlexandru Croitor2017-06-231-13/+0
| | | | | | | | | The printing classes were moved to QtPrintSupport module, and the remaining classes are always present in their respective modules. Change-Id: I2e0ec061efc28c89f0476829541a7d2d3f01877f Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix compile tests to include correct module include dirsAlexandru Croitor2017-06-233-17/+18
| | | | | | | | | Also include the optional QtNetwork sources, so that QSsl* class bindings are properly generated. Thus the optional QtWidgets and QtNetwork classes should be picked up. Change-Id: Id4d21dc577f2b551dce83999be76cdfd9d0b88d2 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Fix testrunner.py in winSimo Fält2017-06-211-1/+9
| | | | | | | | The official git setup recommends to add only git.cmd to win PATH if ran in native CMD. Change-Id: I370752bf0d052f8047e929639b3246b726131b5a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* utils: Handle SymlinksFriedemann Kleint2017-06-092-4/+23
| | | | | | | | | Try to recreate the .so version symlinks correctly on Linux instead of copying the files. Task-number: PYSIDE-526 Change-Id: I3b015efe4f2f57abe418f171a8631d194ed08f65 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Fix missing headers in PySide custom buildChristian Tismer2017-06-092-18/+32
| | | | | | | | | | | | | | | PySide itself built fine after the additional includes were added for inheritance. But when a smaller project is built, suddenly header files are not found, because the inherited names are not expected by the deployment. Therefore, we do no longer add more includes, but insert recursive headers for the few relevant cases. So the includes become a little longer, but the names of the include files are those as before the enhanced inheritance. Task-number: PYSIDE-500 Change-Id: Iab456307a3c2365dfe1964dbe222b7d0efac7878 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* libshiboken: Fix/Silence some MSVC warningsFriedemann Kleint2017-06-096-9/+18
| | | | | | | | | | | | | | | autodecref.h(110): warning C4522: 'Shiboken::AutoDecRef': multiple assignment operators specified autodecref.h(78): warning C4800: 'PyObject *const ': forcing value to bool 'true' or 'false' (performance warning) conversions.h(282): warning C4800: 'long': forcing value to bool 'true' or 'false' (performance warning) basewrapper.cpp(625): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning) basewrapper.cpp(654): warning C4800: 'SpecialCastFunction': forcing value to bool 'true' or 'false' (performance warning) basewrapper.cpp(1014): warning C4800: 'Shiboken::ParentInfo *': forcing value to bool 'true' or 'false' (performance warning) basewrapper.cpp(1044): warning C4800: 'void *': forcing value to bool 'true' or 'false' (performance warning) helper.cpp(56): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data shibokenbuffer.cpp(46): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning) Change-Id: If1517fde8e7670f258a56f6d845a66ebb3d82141 Reviewed-by: Christian Tismer <tismer@stackless.com>
* pysidetest_delegatecreateseditor_test: Add QtWidgets dependencyFriedemann Kleint2017-06-022-2/+2
| | | | | | | | | | | The test was failing since the method TestView::setItemDelegate(QAbstractItemDelegate *) was rejected due to QAbstractItemDelegate being unknown. Fix by adding the dependency to QtWidgets. Task-number: PYSIDE-431 Change-Id: I65c3690eccfdd55b310f45d65a2b0d8c32bedd36 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Remove README.md of PySide2/Shiboken2Friedemann Kleint2017-06-022-29/+0
| | | | | | | | They contain outdated links and are no longer required after the repository merge. Change-Id: I6867435bcd1bbe53308dea1d9d8c1ba1a0fc0584 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Fix .so filter for LinuxFriedemann Kleint2017-06-021-1/+1
| | | | | | | | | | Previously, libpyside.so would not match .so.* and so, the libraries were not copied. Task-number: PYSIDE-526 Change-Id: I407db564beaee1f443dc7b816bc0bf798c8aacf1 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Remove license files from previous submodulesFriedemann Kleint2017-06-0213-6338/+0
| | | | | | Task-number: PYSIDE-431 Change-Id: I35594dbf7dc6430ab5d0a2d235303f2bb7bd3677 Reviewed-by: Christian Tismer <tismer@stackless.com>
* libpyside: Use Q_SLOTS instead of slotsFriedemann Kleint2017-06-022-2/+2
| | | | | | | | | When mixing Python and C++, Qt needs to be used with 'CONFIG += no_keywords' to suppress the 'slots' macro definition, which clashes with a Python header. Task-number: PYSIDE-526 Change-Id: I4feeae2de21db712b4de6653e243d556623436a1 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Fix typos in licensesFriedemann Kleint2017-05-3016-48/+48
| | | | | Change-Id: I781418f8747d51a0d329c0562e076600989b3768 Reviewed-by: Christian Tismer <tismer@stackless.com>
* setup.py/prepare_coin_sources.py: Adapt to repository mergeFriedemann Kleint2017-05-232-9/+7
| | | | | | | | Remove the former submodules pyside2/shiboken2 from the modules lists. Change-Id: I41de78f5519c24cce1e649eaf3b2f2d1cabcc9b0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
*-. Merge pyside2 and shiboken2 into super-moduleOswald Buddenhagen2017-05-222207-0/+251698
|\ \
| | * move everying into sources/shiboken2Oswald Buddenhagen2017-05-22653-0/+0
| | | | | | | | | | | | | | | | | | in preparation for a subtree merge. this should not be necessary to do in a separate commit, but git is a tad stupid about following history correctly without it.
| | * Fix crash on exit with debug Python 3Alexandru Croitor2017-05-191-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Crash happens because of an use-after-free error. This is a bandaid fix transforming the crash into a memory leak. Proper fix will require more investigation and time. Task-number: PYSIDE-488 Change-Id: I56358573ca60d6f18fd85fbd7eb3eb0da8fbf163 Reviewed-by: Christian Tismer <tismer@stackless.com>
| | * 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>
| | * 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>
| | * 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>
| | * 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 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>
| | * 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>
| | * 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>
| | * Typedatabase: Improve debug outputFriedemann Kleint2017-03-171-28/+55
| | | | | | | | | | | | | | | | | | | | | | | | Add debug operator for TemplateEntry and output sizes. Task-number: PYSIDE-323 Change-Id: I6a03f5c908ea5a0a3e8f14b640b1575bc49b6bd8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| | * TypeDatabase: Port to QXmlStreamReaderFriedemann Kleint2017-03-168-96/+121
| | | | | | | | | | | | | | | | | | | | | The old QtXml classes are deprecated. Change-Id: Icde985d352df5bbaca89b23e0fea1d4efe8e2fb4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| | * TypeDatabase: Make it possible to specify enumeration flags as ↵Friedemann Kleint2017-03-162-37/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | comma-separated list Split out the code adding the flags and loop over the list. In typesystem_core_common.xml, there is currently: <enum-type name="ComponentFormattingOption" flags="ComponentFormattingOptions" flags="FormattingOptions"/> which is invalid XML. This can then be specified as: <enum-type name="ComponentFormattingOption" flags="ComponentFormattingOptions,FormattingOptions"/> Change-Id: Ia55b34fb0a72891a15f7f6e3684b41fec8d72f4b Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| | * Sample bindings: Fix XML errorsFriedemann Kleint2017-03-161-2/+2
| | | | | | | | | | | | | | | | | | | | | Entity &ampl; -> &amp; Change-Id: I62a7a6147991ca0723ef15c6cfa86c9b7d93792f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| | * MetaLang classes: Remove some unused fields and functionsFriedemann Kleint2017-03-162-158/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AbstractMetaFunction: - interfaceClass AbstractMetaClass: - orphanInterfaces - PrimaryInterfaceImplementor - referenceCounts() - nonVirtualShellFunctions() - hasInconsistentFunctions() - allVirtualFunctions() - allFinalFunctions() - cppInconsistentFunctions() - interfaceClass - lessThanFunctions - greaterThanFunctions - lessThanEqFunctions - greaterThanEqFunctions Change-Id: I72504ce6d996bb2f8a091ce9c749b3c11b8e936c Reviewed-by: Christian Tismer <tismer@stackless.com>
| | * Move DuplicatingFunctionPredicate out of the functionFriedemann Kleint2017-03-161-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | g++ in C99 mode is unable to instantiate std::find_if() with local classes. Amends change 3c325a0004a377da14ad255addb42e23c4e9cf17. Task-number: PYSIDE-323 Change-Id: I250bb43f17a843aee7ef9e39d3dc56ef834aa113 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| | * Change class AbstractMetaClassList to be a typedef for a QListFriedemann Kleint2017-03-1642-203/+208
| | | | | | | | | | | | | | | | | | | | | | | | Inheriting from standard containers is not recommended. Move the find() functions to static functions of AbstractMetaClass. Change-Id: Iaa8db0a4cdf9e2fd70d046558313d6ba7ff7497a Reviewed-by: Christian Tismer <tismer@stackless.com>
| | * _ScopeModelItem: Store functions in listFriedemann Kleint2017-03-163-20/+16
| | | | | | | | | | | | | | | | | | | | | | | | This should remove the non-determinism when generating code. Change-Id: Ica9eb8e620d442b3d5166ac4c9f37894debcdd4c Reviewed-by: Christian Tismer <tismer@stackless.com>
| | * AbstractMetaBuilder::traverseFunctions() Split out duplicate removalFriedemann Kleint2017-03-162-18/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The removal of duplicate member function entries depended on the fact that the more specific, out-of-line function definitions were first in the list of functions returned by ScopeModelItem::functions(). This happened to work by coincidence since ScopeModelItem used a QHash, which reversed the order returned by the parser. When trying to replace the QHash by a QList in order to get rid of the non-determinism, TestTemplates::testContainerTypeIncompleteArgument() would fail since it finds 2 entries for "method()". Change-Id: I7c5a49bef8644d1f05e6a14295b304b1a9b8c46f Reviewed-by: Christian Tismer <tismer@stackless.com>
| | * Remove FunctionDefinitionModelItemFriedemann Kleint2017-03-165-52/+6
| | | | | | | | | | | | | | | | | | | | | | | | FunctionDefinitionModelItem (as opposed to FunctionModelItem) is not needed by the meta builder. Change-Id: Ib2236ffeee286d72019876e7341f66cef85c7831 Reviewed-by: Christian Tismer <tismer@stackless.com>
| | * Refactor TestUtil of ApiExtractorFriedemann Kleint2017-03-1335-287/+395
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the class TestUtil to a namespace containing a free function returning the AbstractMetaBuilder instance on success. Use QScopedPointer in the tests and add checks. This makes it possible to detect parse errors which would previously only trigger an assert. Change-Id: Iea3a8fb62515602c76b10eab4889400af5b26b34 Reviewed-by: Christian Tismer <tismer@stackless.com>