aboutsummaryrefslogtreecommitdiffstats
path: root/generator
Commit message (Collapse)AuthorAgeFilesLines
* ShibokenGenerator: Don't scope pointer default valuesGabriel de Dietrich2016-04-291-0/+4
| | | | | | | | | | | | | | | This was causing an error when generating the wrapper for QJsonDocument::fromJson(). There, the default value for the last argument, QJsonParseError *error = Q_NULLPTR would be QJsonParseError::NULL which is wrong. Other cases may occur, but nothing we did detect since the build was failing at that stage. Change-Id: Ia01c06cae47ed80a8c645b82427104247c7f8b56 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fixed shibokengenerator.cppzhihaoadsk2016-04-141-1/+1
| | | | | | | | | In shibokengenerator.cpp, guessScopeForDefaultValue() think that NULL is a member of QJsonParseError and prefix it with QJsonParseError::“NULL” should not be prefixed.. It’s caused by prefixing the qualified class name to NULL constant in qjsondocument_wrapper.cpp ::QJsonParseError* cppArg1 = QJsonParseError::NULL; [ 10%] Building CXX object PySide2/QtCore/CMakeFiles/QtCore.dir/PySide2/QtCore/q jsonarray_wrapper.cpp.obj qjsonarray_wrapper.cpp [ 10%] Building CXX object PySide2/QtCore/CMakeFiles/QtCore.dir/PySide2/QtCore/q jsondocument_wrapper.cpp.obj qjsondocument_wrapper.cpp D:\PySide2NewGit\pyside_build\py2.7-qt5.6.0-64bit-release\pyside2\PySide2\QtCore \PySide2\QtCore\qjsondocument_wrapper.cpp(346) : error C2589: 'constant' : illegal token on right side of '::' D:\PySide2NewGit\pyside_build\py2.7-qt5.6.0-64bit-release\pyside2\PySide2\QtCore \PySide2\QtCore\qjsondocument_wrapper.cpp(346) : error C2059: syntax error : '::'
* Fix the metatype parser handling of pointer template parameters and pointer ↵Florin Dinu2015-12-101-4/+5
| | | | references.
* fixing the shiboken tests (renaming effects)Christian Tismer2015-11-0712-10/+10
|
* remove metaObject method (done when parsing sources with Q_DOC macro)jumaroch2015-11-041-1/+0
|
* huge change on project layout.Christian Tismer2015-09-212-8/+8
| | | | | | | | | | | The intention is to have PySide2 and Shiboken2 as project names, to allow for co-existence of PySide and PySide2. This is the first version that builds with these settings on OS X: $ python3 setup.py build --debug --no-examples --ignore-git --qmake=/usr/local/Cellar/qt5/5.5.0/bin/qmake --jobs=9 This is not yet tested.
* fix the PR to just add the missing primitive types.Christian Tismer2015-09-201-2/+13
| | | | | The code generator checks numeric types also if they do not exist, so we cannot simply raise an error. I just added a comment for future actions when unsupported primitive types show up.
* Fix incorrect primitive type and add a checkBen Longbons2015-09-191-3/+6
|
* add Qt5XmlPatterns, to make shiboken build on linux.Christian Tismer2015-07-251-0/+3
| | | | | I was also reported that it breaks even on OS X, so maybe OS X 10.10 is the only version where this happened to work?
* protect unknown primitive type by 'dynamic_cast' and give error message.Christian Tismer2015-07-191-2/+11
| | | | | Now shiboken does no more segfault. Still, QtMultimedia cannot be enabled, due to missing 'Array' handling. :-(
* ensure that a type check is done on possibly unknown primitive types.Christian Tismer2015-07-181-2/+2
| | | | | | | | | This ids about a hard crash in QtMultimedia. Hacked quite a while until the reason was clear: The combination of a missing type check and the generally bad "reinterpret_cast" resulted in this error. I changed the cause to "dynamic_cast" and added an error message. The problem is not fixed, yet. It only does not core dump, anymore.
* fixed a problem with qRegisterMetaType that came up with Qt5.Christian Tismer2015-07-081-1/+9
| | | | | | | | | | The problem is that an unqualified name gets registered ("iterator") by some hard to understand heuristics of shiboken. This way, the same name is used for objects which have different size in Qt5, and therefore things crash. The quick fix was to skip exactly the name "iterator" and output a warning. This needs to be fixed in a better way, but costs too much time at the moment, because I don't understand enough about possible side-effects, yet.
* silence a generated unused function if py3k is activeChristian Tismer2015-07-031-2/+5
|
* add the type-casts for QFlag conversion. These are defined as int, no longer ↵Christian Tismer2015-07-011-7/+7
| | | | long.
* to get things right, we need to avoid to set Q_QDOC. But because there is no ↵Christian Tismer2015-06-171-0/+1
| | | | metaObject() then anymore, we need to define it.
* after this tiny (but hard to figure out) change, we can instantiate a ↵Christian Tismer2015-06-171-1/+1
| | | | QObject for the first time!
* support QDebug in the PySide contextChristian Tismer2015-06-141-1/+4
|
* this is the complete shiboken build, and it seems to work fine.Christian Tismer2015-06-064-7/+9
| | | | Using the newest policy for cmake, which is much cleaner than before.
* Now shiboken works also with the tests.Christian Tismer2015-06-063-13/+15
| | | | | | | | | | | | | | | It is important to use all the new definitions like Qt5Core. Before that has an effect, find_package(Qt5Widgets) must be called. Then the following variables are defined: Qt5Widgets_VERSION_STRING Qt5Widgets_LIBRARIES List of libraries for use with the target_link_libraries command, for example. Qt5Widgets_INCLUDE_DIRS List of libraries for use with the include_directories command, for example. Qt5Widgets_DEFINITIONS List of definitions for use with add_definitions, for example. Qt5Widgets_COMPILE_DEFINITIONS List of definitions for use with the COMPILE_DEFINITIONS target property. Qt5Widgets_FOUND Boolean describing whether the module was found successfully. Qt5Widgets_EXECUTABLE_COMPILE_FLAGS String of flags to be used when building executables. (see http://doc.qt.io/qt-5/cmake-manual.html)
* Fix for containers with 'const' valuesMatthew Woehlke2014-01-071-2/+7
| | | | | | | | | Fix omission of 'const' specifier when generating binding code for containers whose value type is 'const', which would lead to binding code that does not compile due to 'const' mismatch. Includes test case. Change-Id: Iff99a16ee071bb255f78e86e2456e5206cc00cfb Reviewed-by: John Cummings <jcummings2@users.sf.net>
* Only use fields in PyTypeObject when defining typesJohn Ehresman2013-11-141-12/+27
| | | | | | | | | | | Allocate and use separate structures for as_* fields in the PyTypeObject rather than using fields in the PyHeapTypeObject. This is a step away from using the PyHeapTypeObject, which is unnecessary and will make supporting stackless python easier. Change-Id: I6e5c514ab6db5b8bee9bee3107b97d6fbd582641 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: John Cummings <jcummings2@users.sf.net>
* Write inititializations in topological orderMatthew Woehlke2013-09-243-1/+12
| | | | | | | | | | | | | | | | | | Add methods to various places in the hierarchy so that the generator can access the topologically ordered class list (in addition to the unordered class list). Modify CppGenerator::finishGeneration to use this. This fixes a failure to correctly create Python wrapper classes due to subclass wrappers being initialized before their base class (with the result that the looked-up type object for the base class is null, causing the derived class to be created without referencing the base). Also change one of the test cases to test that we correctly wrap a typedef of a template class derived from a non-template base (which was failing before this change for the aforementioned reason). Change-Id: Ib4dc2626a41cb7bb905ff4a302c2613ea12d026b Reviewed-by: John Cummings <jcummings2@users.sf.net>
* Fix '%#' substitution for # > 9Matthew Woehlke2013-07-301-2/+2
| | | | | | | | | | | | Change '%#' substitution to use a regular expression for the 'old' text to enforce a word boundary after '#', such that we don't perform e.g. '%1' replacement on inputs like '%10'. This fixes problems trying to modify functions with more than nine arguments, such as the example from the previous commit (which now compiles and passes). Also add a test case for this. Change-Id: I9956804b3c65bddf7e36838866641b24ceb87c57 Reviewed-by: John Ehresman <jpe@wingware.com>
* Add missing return on module init errorMatthew Woehlke2013-06-291-1/+1
| | | | | | | | | Add 'return' before 'SBK_MODULE_INIT_ERROR' when module initialization fails due to a missing dependency. This appears to have been accidentally lost in 0b1f8df512047c6ace60701180ec1e4f6e97484e. Change-Id: I1bc1453c8515e7b67c101c8e8f13a1266d04433f Reviewed-by: John Ehresman <jpe@wingware.com>
* Use non-static method def for instance methodsJohn Ehresman2013-06-241-1/+11
| | | | | | | | | | | For methods that can be called as either class or instance methods (e.g. PySide's QObject.connect), a non-static variant of the PyMethodDef struct is needed in Python 3.3 when method is used as an instance method. Fixes https://bugreports.qt-project.org/browse/PYSIDE-145 Change-Id: Ie8876a381614f33815f9b6449ea4a61cde9e5cee Reviewed-by: John Cummings <jcummings2@users.sf.net>
* fix build in C++11 modeMatthew Woehlke2013-06-223-17/+17
| | | | | | | | | | | | | | Add spaces between string literals and preprocessor symbols. These are required because C++11 defines string prefix and suffix operators, and confuses preprocessor tokens adjacent to string literals as unrecognized string literal modifies, resulting in compile errors. Some of these changes are also needed to prevent generating code with the same problem (which affects both Shiboken building itself, but also any users of Shiboken). Change-Id: I99f2d3c61fd9df682f915a29f27321fee2ce759e Reviewed-by: John Ehresman <jpe@wingware.com>
* Replaced Nokia copyrights in headerTeemu Kaukoranta2013-05-2815-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | Replaced old Nokia copyrights with Digia copyrights. Removed "All rights reserved" strings without leading copyrights were removed (for example, 'Copyright SomeCompany, all rights reserved remain untouched). Did NOT touch contact details, will change them later. Excluded folders that have '3rdparty' in path. Used command: find . -path '*/3rdparty/*' -prune -o -exec grep -ilI -E '.*Copyright.*Nokia.*' {} \; | tee >(xargs sed -i -r '1,10 s/([ \t#*]*)(.*Copyright.*Nokia.*)/ \1Copyright \(C\) 2013 Digia Plc and\/or its subsidiary\(-ies\)\./I') >(xargs sed -i -r '1,10 s/(^[ \t#*]*)(all rights reserved.*)/\1/I') This excludes binary files and retains whitespace and #* characters in the beginning of the edited lines. Change-Id: I0d49f991c3dbd45d804843f185714e8681bc6c51 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Janne Anttila <janne.anttila@digia.com>
* Use getWrapperForQObject to convert if generating for PySideJohn Ehresman2012-12-211-11/+14
| | | | | Change-Id: I4a83bc3642c9853e61597093fb0a7f25fdfec46b Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
* Use parent class's metaObject if wrapper is NULL.John Ehresman2012-12-171-0/+2
| | | | | | | | | Return metaObject from parent class if wrapper has been invalidated, which currently happens in the *Wrapper class destructor. Change-Id: I1d5ef8802acf796cced7838b3ecc76f51201d906 Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
* Fix PYSIDE-108 bug and add exampleJohn Cummings2012-09-111-1/+1
| | | | | | | | Replace "::" with "_" in protected enum name to fix issue Add test case to libsample and samplebinding Change-Id: I2edea2dfa8adecfe5fa34f777da9f60cfe4c6ee4 Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
* Override all functions with the same name, not just one.John Ehresman2012-06-141-1/+0
| | | | | | | | This allows pyside to compile with Visual Studio 2008 when built against qt 4.8. There are still test failures, however. Change-Id: I83da30211e5032b1352102f189cb93dfb741eb38 Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
* Find function modifications defined in the 2nd+ base class.John Ehresman2012-06-141-8/+12
| | | | | | | Fixes bug PYSIDE-54 Change-Id: Ic5c341741170cc77e8ebb59c46c746211582ddeb Reviewed-by: Marcelo Lira <marcelo.lira@openbossa.org>
* Set a default hash function for all ObjectTypes.Hugo Parente Lima2012-05-031-0/+2
| | | | | | | | Fix bug PYSIDE-42 Change-Id: I1392374dcf0055309152082e674cc1e3e6472d4d Reviewed-by: Paulo Alcantara <paulo.alcantara@openbossa.org> Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
* We don't need GENERATOR_BINARY define anymore.Hugo Parente Lima2012-03-131-1/+0
| | | | Reviewer: Trust me.
* ApiExtractor merged into Shiboken as a static library.Hugo Parente Lima2012-03-132-3/+13
|
* generators directory renamed to generator.Hugo Parente Lima2012-03-0919-0/+13935
This makes sense as now there only one generator that you can tweak it into different modes (a.k.a. generator sets). Reviewer: Trust me