aboutsummaryrefslogtreecommitdiffstats
path: root/generator
Commit message (Collapse)AuthorAgeFilesLines
* 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