Compare commits

...

1,290 commits

Author SHA1 Message Date
Juhapekka Piiroinen
f011ce2cb9 Bug fix for PYSIDE-7
This should resolve the issue in PYSIDE-7 "QDateTime does not support the 6-argument format".
Added function signature for 6-argument version and a testcase.

Change-Id: I617eefab6a41939c37e2f1bf800857bc2d74b6ee
Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
2012-03-13 18:43:04 +01:00
Juhapekka Piiroinen
fe8dc36f90 Fix bug PYSIDE-6
This should resolve the issue in PYSIDE-6 "Fix phonon VideoCaptureDevice detection to properly use phonon_ namespace".
Changed if check in PySideModules.cmake.

Change-Id: Ie30d6858a0fc6073560ec4cd09508504cbeb667d
Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
2012-03-13 18:41:53 +01:00
Hugo Parente Lima
db6f1e3306 Fix PySide compilation.
Change-Id: Ie7a30961232526af59cbc21dbf1b58ab9a4e3e7b
Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
2012-03-13 18:29:52 +01:00
Marcelo Lira
d30a8672c3 Version bump to 1.1.1. 2012-03-08 16:56:23 -03:00
Marcelo Lira
afc9a7e10b Version bump to 1.1.0. 2012-03-08 16:56:23 -03:00
Marcelo Lira
a8a07b77f8 Declares Python types using the new "<custom-type>" tag.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Paulo Alcantara <pcacjr@gmail.com>
2012-03-08 16:56:23 -03:00
Paulo Alcantara
98be0df6a5 Fix BUG #1060 - "Subclassing of QUiLoader leads to "Internal C++ object
already deleted" exception"

See http://bugs.pyside.org/show_bug.cgi?id=1060.

Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
Reviewed-by: Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:56:23 -03:00
Paulo Alcantara
b2b14fe9b7 Fix BUG #1091 - "PixmapFragment and drawPixmapFragments are not bound"
See http://bugs.pyside.org/show_bug.cgi?id=1091.

Also minor coding style fixes in QtGui's typesystem.

Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
Reviewed-by: Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:56:23 -03:00
Paulo Alcantara
481ba5aa3e Fix BUG #1084 - "Crash (segfault) when writing unicode string on socket"
See http://bugs.pyside.org/show_bug.cgi?id=1084.

Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
Reviewed-by: Trust me
2012-03-08 16:56:23 -03:00
Marcelo Lira
8ddbd3167b The temporary file used in the test for bug #829 must not be deleted by the test.
This fixes the test in win32 platforms.
2012-03-08 16:56:23 -03:00
Marcelo Lira
65d8f9fcef Fixes the QSettings related QVariant's save/load bug. 2012-03-08 16:56:23 -03:00
Hugo Parente Lima
7b8d2925dd Small code style changes. 2012-03-08 16:56:22 -03:00
Hugo Parente Lima
c78b4686a1 Add GC support to PySide Property type.
This fixes GC errors when running PySide on a Python debug env.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:56:22 -03:00
Marcelo Lira
e76b2b76f5 Added type system entries to the primitive types used by QtOpenGL. 2012-03-08 16:56:22 -03:00
Marcelo Lira
2a634aea05 Updated the custom widget plugin to use the new converters. 2012-03-08 16:56:21 -03:00
Marcelo Lira
7bfbbf3cb7 No more training wheels. The last occurrences of the old template Converter where removed.
Also related fixes here and there.
2012-03-08 16:56:21 -03:00
Marcelo Lira
aec20b21a5 Added a type system file for Maemo's QtCore. 2012-03-08 16:56:21 -03:00
Marcelo Lira
ebeae9d084 Fixes custom code for QtCore's HWND on win32. 2012-03-08 16:56:21 -03:00
Marcelo Lira
31804c2adc Qt::HANDLE is declared only in QtCore, and its specifics depend on the architecture. 2012-03-08 16:56:21 -03:00
Marcelo Lira
c31c14cdfb Fixed QtCore's HWND converter for win32. 2012-03-08 16:56:21 -03:00
Marcelo Lira
879e4bb14d Removed the QAbstractVideoBuffer::map method. 2012-03-08 16:56:21 -03:00
Marcelo Lira
6575ac8d39 Fixed converter for win32's WId type. 2012-03-08 16:56:20 -03:00
Hugo Parente Lima
1af53541bf Fix compilation of conversion branch against Python3k.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:56:20 -03:00
Marcelo Lira
2a87b74bfe Replaced TypeResolver by SbkConverter and SpecificConverter.
Also updated QtGui's WId conversion to Python 3.
2012-03-08 16:56:20 -03:00
Marcelo Lira
792504f978 Removed the remaining occurrences of Shiboken::makeTuple. 2012-03-08 16:56:20 -03:00
Marcelo Lira
7b04273736 Fixed code for QUdpSocket.readDatagram method to remove usage of Shiboken::makeTuple. 2012-03-08 16:56:20 -03:00
Marcelo Lira
30118e265d Fixed code for setting QtCore.__version_info__ to not use Shiboken::makeTuple. 2012-03-08 16:56:20 -03:00
Marcelo Lira
770c8bda73 Fixed custom code for QScriptValueIterator.__next__ function.
It must not use the convenience method Shiboken::makeTuple, for it makes
use of the old template based converters.
2012-03-08 16:56:20 -03:00
Marcelo Lira
16f4378fed Fixes type converter for Win32's HWND. 2012-03-08 16:56:20 -03:00
Marcelo Lira
80c02f16e5 Fixes the test for a QFlag value returned in a QVariant. 2012-03-08 16:56:20 -03:00
Marcelo Lira
b643a3f8ab Modified PySideQFlags based on Hugo's design. 2012-03-08 16:56:19 -03:00
Marcelo Lira
8145f2a7e2 Added converter for primitive type QModelIndexList. 2012-03-08 16:56:19 -03:00
Marcelo Lira
25638d3f80 Fixes conversion rule for QGraphicsView::drawItems array argument. 2012-03-08 16:56:19 -03:00
Marcelo Lira
3318a40ab1 Some method signatures were removed.
They were removed because used pointers to primitive types without
proper user defined handling. Future assessment must be done to tell if
removal is enough, or other changes are needed.
2012-03-08 16:56:19 -03:00
Marcelo Lira
ba062e1b89 Updated various function removals and modifications. 2012-03-08 16:56:19 -03:00
Marcelo Lira
3ee5bec244 New containers for container types. 2012-03-08 16:56:19 -03:00
Marcelo Lira
ae0f62ed80 New converters for primitive types. 2012-03-08 16:56:19 -03:00
Marcelo Lira
64bec138e1 Added new style conversions for QDate, QTime and QDateTime objects. 2012-03-08 16:56:19 -03:00
Marcelo Lira
1105a5be3a Added default constructor to QTextStreamManipulator. 2012-03-08 16:56:18 -03:00
Marcelo Lira
815fae961f Turned QStyleOptionViewItem into value type, for it has a public copy constructor.
It is passed around by value in many places, like the return value of
QAbstractItemView::viewOptions(). I did the same to the variations:
QStyleOptionViewItemV2, QStyleOptionViewItemV3, etc.
2012-03-08 16:56:18 -03:00
Marcelo Lira
8c1fbc3751 Signature of various added and modified functions modified to use non-const references.
The API Extractor signature normalizer removes const& from argument
types, but it leaves non-const references unchanged.
2012-03-08 16:56:18 -03:00
Paulo Alcantara
ad8992e9e0 pysidesignal: more trivial fixes
Fix typos and coding style.

Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
Reviewed-by: Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:56:18 -03:00
Marcelo Lira
41f1c30372 Makes test for QtCore's bug #1063 compliant with Python 3. 2012-03-08 16:56:18 -03:00
Hugo Parente Lima
720a6f4cad Don't double decref variable causing an assertion error on debug builds.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:56:18 -03:00
Paulo Alcantara
48669462d0 pysidesignal: don't use C's cast
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
Reviewed-by: Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed-by: Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:56:18 -03:00
Paulo Alcantara
66f4ccbe5d pysidesignal: trivial fixes
Fix typos and coding style

Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
Reviewed-by: Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed-by: Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:56:18 -03:00
Paulo Alcantara
508e59c091 Fix BUG #1063
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
Reviewed-by: Willer Moreira <willer.moreira@openbossa.org>
Reviewed-by: Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:56:18 -03:00
Hugo Parente Lima
93bb5d777e Fix bug 1083 - "winId returns a PyCObject making it impossible to compare two winIds" 2012-03-08 16:56:17 -03:00
Hugo Parente Lima
e3814f27dd Replace private.py file by an inject code. 2012-03-08 16:56:17 -03:00
Paulo Alcantara
2f70b10471 Fix BUG #1077 - "Application exit crash when call QSyntaxHighlighter.document()"
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:56:17 -03:00
Paulo Alcantara
e2524f6abb Fix BUG #1034 - "Error compiling PySide with Python 3.2.2 32bit on Windows"
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:56:17 -03:00
Paulo Alcantara
4985f114a3 Fix BUG #1069 - "QtCore.QDataStream silently fails on writing Python string"
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
Reviewer: Willer Moreira <willer.moreira@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:56:17 -03:00
Luciano Wolf
791f70629c Bumping to revision 1.0.9 2012-03-08 16:56:17 -03:00
Paulo Alcantara
8160e529e2 Fix BUG #1048
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
Reviewer: Willer Moreira <willer.moreira@openbossa.org>
          Hugo Parente Lima <hugo.lima@openbossa.org>
2012-03-08 16:56:17 -03:00
Paulo Alcantara
45ad11e5be Fix BUG #1058 - "Strange code in PySide/QtUiTools/glue/plugins.h"
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Bruno Araújo <bruno.araujo@openbossa.org>
2012-03-08 16:56:17 -03:00
Paulo Alcantara
e031567fac Fix BUG #1052
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:56:17 -03:00
Lauro Neto
e29d2e460b Fix PYSIDE_LIBRARY in CMake export.
Was hardcoded with Cygwin library name format.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:56:16 -03:00
Hugo Parente Lima
fbf3a8b07a Remove unused code in bug 844 unit test.
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:56:16 -03:00
Hugo Parente Lima
dde75099f2 Fix bug 1029 - "qmlRegisterType Fails to Increase the Ref Count" 2012-03-08 16:56:16 -03:00
Paulo Alcantara
64ffc4f61b Fix BUG #1031
Signed-off-by: Paulo Alcantara <paulo.alcantara@openbossa.org>
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:56:16 -03:00
Jerzy Kozera
50bf9a570b Fixed compilation error for gcc versions < 4
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:56:16 -03:00
Hugo Parente Lima
b30e998e65 Fix phonon unit test when there are device aliases reported by phonon. 2012-03-08 16:56:16 -03:00
Hugo Parente Lima
c230fad427 Strip the text received from message handler.
This was needed because now qWarning, etc, are using stream operators
for security reasons, and those operators add spaces at end.
2012-03-08 16:56:15 -03:00
Hugo Parente Lima
6fe19dbb88 Fix bug 1012 - "FTBFS with hardening flags enabled"
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:56:15 -03:00
Hugo Parente Lima
8060e3ee87 Fix bug 1036 - "Qt.KeyboardModifiers always evaluates to zero"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:56:15 -03:00
Hugo Parente Lima
b50186e9f3 Creates QFlags types at runtime. 2012-03-08 16:56:15 -03:00
Hugo Parente Lima
4ba7cd90d6 Fix bug 1013 - "connect to QSqlTableModel.primeInsert() causes crash" 2012-03-08 16:56:15 -03:00
Hugo Parente Lima
f57d4d4dbc Fix bug 1011 - "PySide cygwin patch"
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:56:15 -03:00
Hugo Parente Lima
5c076e1c53 Reduce the memory used by PySideMetaFunction instances. 2012-03-08 16:56:15 -03:00
Hugo Parente Lima
67d6455fa5 Unify the code used to do QObject meta calls. 2012-03-08 16:56:15 -03:00
Hugo Parente Lima
15ceed791f Fix bug 1016 - "Calling of Q_INVOKABLE method returning not QVariant is impossible..." 2012-03-08 16:56:15 -03:00
Hugo Parente Lima
f55d088d44 Optimize PySide::getMetaDataFromQObject function avoiding some str copies. 2012-03-08 16:56:14 -03:00
Hugo Parente Lima
07d0879700 Fix code style and add license headers. 2012-03-08 16:56:14 -03:00
Hugo Parente Lima
2e1ff21938 Fix unit test of bug 829. 2012-03-08 16:56:14 -03:00
Hugo Parente Lima
0971ac7c4f Version bump to 1.0.8. 2012-03-08 16:56:14 -03:00
Hugo Parente Lima
0e8b50c9b0 Fix bug 1019 - "Overriding QWidget.show or QWidget.hide do not work"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:56:14 -03:00
Paulo Alcantara
b7f593d99e Fix bug 1022 - "RuntimeError: maximum recursion depth exceeded while getting the str of an object"
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>

Signed-off-by: Paulo Alcantara <paulo.alcantara@openbossa.org>
2012-03-08 16:56:14 -03:00
Hugo Parente Lima
6acb5f9bc7 Only removes actions bounded to PyObjects on QMenu::clear.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:56:14 -03:00
Renato Filho
9f05c7dad5 Initial update typesystem for support Qt 4.8 (beta).
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:56:14 -03:00
Lauro Neto
6c47624e92 Fix getTypeName check order.
Was segfaulting for signals with None as an explicit
argument (returning NULL to a strdup).

Reviewer: Hugo Lima <hugo.lima@openbossa.org>
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:56:14 -03:00
Marcelo Lira
2683577b7a Fixes win32's HWND converter.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:56:13 -03:00
Hugo Parente Lima
ed94eda798 Use sbkpython.h instead of Python.h to avoid problems with Python2.5.
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:56:13 -03:00
Hugo Parente Lima
620b46650a Avoid using uninitialized variable. 2012-03-08 16:56:13 -03:00
Hugo Parente Lima
7202e2b8df Fix qglbuffer test on Python3. 2012-03-08 16:56:13 -03:00
Renato Filho
1cefc09118 Fixed unittest to work with python3. 2012-03-08 16:56:13 -03:00
Hugo Parente Lima
b841afdb5c Change String::convertible to String::isConvertible. 2012-03-08 16:56:13 -03:00
Renato Filho
401651e26c Fixed unittest to work with python3. 2012-03-08 16:56:13 -03:00
Renato Filho
66d96ef4b6 Updated Cmake files. 2012-03-08 16:56:13 -03:00
Renato Filho
c33a78cdd4 Slplited python compat file for python 2.x and 3.x 2012-03-08 16:56:12 -03:00
Renato Filho
18383549d6 Updated __init__.py file to works with python 2.x and 3.x 2012-03-08 16:56:12 -03:00
Renato Filho
6869a49bc3 Updated pyside and signals tests to works with python 2.x and 3.x 2012-03-08 16:56:12 -03:00
Renato Filho
1874425448 Updated phonon modue to works with python 2.x and 3.x 2012-03-08 16:56:11 -03:00
Renato Filho
de291d1d0f Updated QtWebKit modue to works with python 2.x and 3.x 2012-03-08 16:56:11 -03:00
Renato Filho
e90255bf7e Updated QtUiTools modue to works with python 2.x and 3.x 2012-03-08 16:56:11 -03:00
Renato Filho
676b2b579d Updated QtSql modue to works with python 2.x and 3.x 2012-03-08 16:56:11 -03:00
Renato Filho
f6c818b21d Updated QtOpenGL modue to works with python 2.x and 3.x 2012-03-08 16:56:11 -03:00
Renato Filho
66a0bbf578 Updated QtNetwork modue to works with python 2.x and 3.x 2012-03-08 16:56:11 -03:00
Renato Filho
1f1fbfbfa8 Updated QtScript modue to works with python 2.x and 3.x 2012-03-08 16:56:11 -03:00
Renato Filho
d9dd319232 Updated QtGui modue to works with python 2.x and 3.x 2012-03-08 16:56:11 -03:00
Renato Filho
edaefbce48 Updated QtCore modue to works with python 2.x and 3.x 2012-03-08 16:56:11 -03:00
Renato Filho
75843bf45a Updated QtDeclarative modue to works with python 2.x and 3.x 2012-03-08 16:56:10 -03:00
Renato Filho
1e29ab6592 Initia QtCore port to python3. 2012-03-08 16:56:08 -03:00
Renato Filho
a2cb6fe025 Created pyside QFlags compat class. 2012-03-08 16:54:53 -03:00
Renato Filho
2e69baa4f5 Fixed compilation with python3. 2012-03-08 16:54:53 -03:00
Marcelo Lira
009aef9f1b Fixes argument and return type of a couple of QtDeclarative methods.
The methods are:

* QDeclarativeEngine::importPlugin(QString,QString,QString*)
* QDeclarativeExpression::evaluate(bool*)

Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:54:52 -03:00
Marcelo Lira
9e8916e111 Fixes argument and return type for method "QScriptString::toArrayIndex(bool*)const". 2012-03-08 16:54:52 -03:00
Marcelo Lira
b94ad1e4de QHostAddress::setAddress(quint8*) signature was removed. 2012-03-08 16:54:52 -03:00
Renato Filho
2cec2a1186 Version bumped. 2012-03-08 16:54:52 -03:00
Renato Filho
6f777cd227 Created unit test for layout policy.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:52 -03:00
Renato Filho
2db3d80e6c Fixed layout policy.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:51 -03:00
Renato Filho
f367f0ada3 Created unit test for bug #1006.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:51 -03:00
Renato Filho
3a0b98ef4b Fix QLayout.itemAt and QGridLayout.itemAtPosition return policy.
Fixes bug #1006.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:51 -03:00
Hugo Parente Lima
d86765e535 Unit test for bug 995 - "QDeclarativeView.itemAt returns faulty reference. (leading to SEGFAULT)" 2012-03-08 16:54:51 -03:00
Renato Filho
846759b324 Created unit test for bug #1002.
Reviewer: Hugo Parente <hugo.lima@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:51 -03:00
Renato Filho
e92b601620 Fixed QWidget.window() return policy.
Fixes bug #1002

Reviewer: Hugo Parente <hugo.lima@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:51 -03:00
Renato Filho
cf61c80588 Created unit test for bug #997.
Reviewer: Hugo Parente <hugo.lima@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:51 -03:00
Renato Filho
a92a006fd9 Avoid register property twice during the object instaciation.
Reviewed by: Hugo Parente <hugo.lima@openbossa.org>
             Lauro Neto <lauro.neto@openbossa.org>
2012-03-08 16:54:51 -03:00
Renato Filho
f16a241b13 Fixed segfault during the connection fail.
Reviewed by: Hugo Parente <hugo.lima@openbossa.org>
             Lauro Neto <lauro.neto@openbossa.org>
2012-03-08 16:54:51 -03:00
Renato Filho
f7b0dca2cb Create unit test for bug #998.
Reviewed by: Hugo Parente <hugo.lima@openbossa.org>
             Lauro Neto <lauro.neto@openbossa.org>
2012-03-08 16:54:50 -03:00
Renato Filho
bfcc30ab86 Fixed problems in function that return None, and was not verified.
Some functions with inject code didnot verify the result value before
convert to Shiboken types.

Fixes bug #998.

Reviewed by: Hugo Parente <hugo.lima@openbossa.org>
             Lauro Neto <lauro.neto@openbossa.org>
2012-03-08 16:54:50 -03:00
Marcelo Lira
d29d9ad5ac Changed QStringList from container to primitive type.
QStringList inherits from QList<QString>, and it isn't a reusable
container itself, such as QList.

Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:50 -03:00
Hugo Parente Lima
b55ea7fd5e Fix bug 981 - "QSettings docs should empathize the behavior changes of value() on different platforms"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:54:50 -03:00
Hugo Parente Lima
e9de49255b Fix QAbstractFileEngine read and readLine methods to accept data with null bytes.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:54:50 -03:00
Hugo Parente Lima
8e43e10f4e Fix other QIODevice read functions stopping at null bytes. 2012-03-08 16:54:50 -03:00
Lauro Neto
7ee30db078 Add extra test on QByteArray explicit conversion
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:50 -03:00
Hugo Parente Lima
9afe76796d Fix bug 944 - "QIODevice.readData must use qmemcpy instead of qstrncpy"
Reviewer:  Luciano Wolf <luciano.wolf@openbossa.org>
           Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:50 -03:00
Hugo Parente Lima
08d202e824 Fix bug 966 - "QX11Info.display() missing" 2012-03-08 16:54:49 -03:00
Renato Filho
700a4cf95c Created unit test for QColor reduce function.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:49 -03:00
Renato Filho
2487a08062 Fixed QColor reduce function.
Fixes bug #989.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:49 -03:00
Hugo Parente Lima
57b291fe66 Unit test for bug 967, a side effect of bug 988.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:54:49 -03:00
Renato Filho
6e6e7f528d Created test for bug #979. 2012-03-08 16:54:49 -03:00
Hugo Parente Lima
a7e4ddb8ca Fix bug 988 - "The type supplied with currentChanged signal in QTabWidget has changed in 1.0.6"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:49 -03:00
Hugo Parente Lima
f5f9c23c5f Optimize my dumb code that do stuff with a QByteArray without knowing if will use it. 2012-03-08 16:54:49 -03:00
Renato Filho
49ad2f9c1d Created unit test for repr function.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:49 -03:00
Renato Filho
1c4ebcbe8a Fixed gcc warning during QDate conversion compilation. 2012-03-08 16:54:48 -03:00
Renato Filho
24838672f0 Created unit test for bug #987.
Reviewed by: Hugo Parente <hugo.lima@openbossa.org>
             Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:48 -03:00
Renato Filho
d0decf40df Fail during the signal connection or disconnection raises exception.
Fixes bug #987.

Reviewed by: Hugo Parente <hugo.lima@openbossa.org>
             Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:48 -03:00
Renato Filho
b6068afc3e Fixed SignalManager bug during anonymous signal connection.
Reviewed by: Hugo Parente <hugo.lima@openbossa.org>
             Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:48 -03:00
Hugo Parente Lima
e59a9f833f Added missing primitive types on QtCore type system.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:48 -03:00
Hugo Parente Lima
5eda2f1365 Fix white space. 2012-03-08 16:54:48 -03:00
Renato Filho
01bd258e10 Created unit test for bug #973.
Reviewed by: Hugo Parente <hugo.lima@openbossa.org>
             Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:48 -03:00
Renato Filho
b3e839c1f8 Removed debug messages from the test.
Reviewed by: Hugo Parente <hugo.lima@openbossa.org>
             Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:48 -03:00
Renato Filho
e9b959ed8e Implemented inject code for function QWebPage.qt_metacall.
This inject code is necessary due a workaround on C++ class QWebPage.
Check de C++ doc for more information:

http://doc.qt.nokia.com/4.7-snapshot/qwebpage.html#shouldInterruptJavaScript

Fixes bug #973.

Reviewed by: Hugo Parente <hugo.lima@openbossa.org>
             Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:48 -03:00
Renato Filho
d5b645d3ab Created utility function to call a python method usign args received in
qt_metacall.

Reviewed by: Hugo Parente <hugo.lima@openbossa.org>
             Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:47 -03:00
Renato Filho
65d4cf2be4 Fix complation warning relative to PyDateTime_IMPORT. 2012-03-08 16:54:47 -03:00
Renato Filho
6e9b7ffd59 Created unit test for QMenu, QMenuBar, QToolBar clear function.
Reviewed by: Hugo Parente <hugo.lima@openbossa.org>
             Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:47 -03:00
Renato Filho
138d8c4268 Fixed QMenu, QMenuBar, QToolBar clear function.
During the clear function all QActions need be destroyed.

Reviewed by: Hugo Parente <hugo.lima@openbossa.org>
             Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:47 -03:00
Renato Filho
f5a1baac2f Fixex return policy on QNetworkAccessManager.createRequest.
Reviewed by: Hugo Parente <hugo.lima@openbossa.org>
             Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:47 -03:00
Renato Filho
34d424f89d Register QVariantMap on TypeManager.
fixes bug #959.

Reviewed by: Hugo Parente <hugo.lima@openbossa.org>
             Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:47 -03:00
Renato Filho
544414cc03 Created unit test for bug #959.
Reviewed by: Hugo Parente <hugo.lima@openbossa.org>
             Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:47 -03:00
Renato Filho
c31c7c60da Implement support to pyside debug mode on documentation generator.
Reviewed by: Hugo Parente <hugo.lima@openbossa.org>
             Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:54:47 -03:00
Renato Filho
8492b69d33 Fixed build for Qt 4.6. 2012-03-08 16:54:47 -03:00
Renato Filho
84b0364b5d Dependency version update. 2012-03-08 16:54:46 -03:00
Renato Filho
3da60153c0 Created unit test for __reduce__ of empty QColor.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Neto <lauro.neto@openbossa.org>
2012-03-08 16:54:46 -03:00
Renato Filho
4fdc15ef7f Fix QColor __reduce__ function.
Fixes bug #983.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Neto <lauro.neto@openbossa.org>
2012-03-08 16:54:46 -03:00
Renato Filho
74e10eef63 Created unitest for bug #972.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Neto <lauro.neto@openbossa.org>
2012-03-08 16:54:46 -03:00
Renato Filho
88acbd47db Fix QGraphicsProxyWidget.setWidget return policy.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Neto <lauro.neto@openbossa.org>
2012-03-08 16:54:46 -03:00
Hugo Parente Lima
14c00d3325 Fix QSettings code snippet. 2012-03-08 16:54:46 -03:00
Renato Filho
7b2c4242ad Implemented GlobalReceiverV2.
A new implementation of GlobalRecever that optmize the signal
connection.

Fixes bug #928.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:46 -03:00
Marcelo Lira
d00af325c6 Do not generate QTest::qt_snprintf function.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:54:46 -03:00
Marcelo Lira
bb68848f4a Fixed conversion rules for QWebPage.javaScriptPrompt method. 2012-03-08 16:54:45 -03:00
Marcelo Lira
69d0627af3 Updated QtNetwork's type system. 2012-03-08 16:54:45 -03:00
Marcelo Lira
8dd72c2630 Updated QtDeclarative's type system. 2012-03-08 16:54:45 -03:00
Marcelo Lira
2a26f35607 Updated QtWebKit's type system.
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:54:45 -03:00
Marcelo Lira
d2e1893762 Updated QtXmlPattern's type system. 2012-03-08 16:54:45 -03:00
Marcelo Lira
00f51edd5b Updated QtGui's type system. 2012-03-08 16:54:45 -03:00
Marcelo Lira
9f00c67682 Updated QtCore's type system. 2012-03-08 16:54:45 -03:00
Hugo Parente Lima
f0ea617acb Fix bug 964 - "QAbstractItemView.moveCursor() method is missing"
Reviewer: Marcelo Lira <marcelol.lira@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:54:44 -03:00
Hugo Parente Lima
48015c2bdc Fix bug 950 - "implement Q_INVOKABLE"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:54:44 -03:00
Renato Filho
3c7e551a99 Fixed QColor.__reduce__ function.
Fixes bug #960.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:44 -03:00
Renato Filho
8e1c2702f6 Created unit test for QColor.__repr__ and QColor.__str__ functions.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:44 -03:00
Renato Filho
a17bf41305 Implemented QColor.__repr__ and QColor.__str__ functions.
Fixes bug #961.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:44 -03:00
Renato Filho
e3502d00fc Created unit test for bug #958.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:44 -03:00
Renato Filho
00bd60cfda Remove obscure code from QUiLoader inject code.
Fixes bug #958.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:44 -03:00
Renato Filho
247116d320 Removed return policy from QUiLoader.load return object.
This policy have already applied on glue code.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:43 -03:00
Renato Filho
44c67274f0 Created unit test for bug #965.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Neto <lauro.neto@openbossa.org>
2012-03-08 16:54:43 -03:00
Hugo Parente Lima
bbf66078ea Fix bug 953 - "Segfault when QObject is garbage collected after QTimer.singeShot"
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:43 -03:00
Hugo Parente Lima
b633bd4c2e Deprecated functions marked as deprecated.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:43 -03:00
Renato Filho
a87d114210 Created unit test for bug #951.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:43 -03:00
Renato Filho
7942a9053d Updated qmlRegisterType to register.
qmlRegisterType uses QDeclarativeItem in template args, when the class is derived from QDeclarativeItem, otherwise uses QObject.

Fixes bug #951.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:43 -03:00
Hugo Parente Lima
d44123b26e Fix links on rel bar. 2012-03-08 16:54:43 -03:00
Hugo Parente Lima
8270b38ecf Bump version to 1.0.6. 2012-03-08 16:54:43 -03:00
Didier Raboud
b6a0810e70 Update pysidedocs theme to rely more on sphinx's base theme:
- Drop files that are redundant with sphinx.
- Add _templates/layout.html to add the needed customisation.
- Update theme.conf to ensure theme inheritance.
- Update pysidedocs.css to fit the theme with sphinx's basic theme.

Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:54:43 -03:00
Lauro Neto
5e08e864e7 Added test for signal with typedef
Reviewer: Renato Filho <renato.filho@openbossa.org>
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:42 -03:00
Lauro Neto
44e1d257ec Removing uneeded file 2012-03-08 16:54:42 -03:00
Lauro Neto
57894b73b7 Fix plugin test
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Reviewer: Hugo Lima <hugo.lima@openbossa.org>
2012-03-08 16:54:42 -03:00
Lauro Neto
a8e05ed6fe Add test for qml plugin.
Simple test. No asserts. If broken should segfault
2012-03-08 16:54:42 -03:00
Lauro Neto
9a78c19fb8 Fixes in QtWebkit
Needed to make example from [1] work. Example will be added
to pyside-examples.

[1] http://blog.qtlabs.org.br/2011/05/30/transformando-o-qml-no-proximo-flash/
2012-03-08 16:54:42 -03:00
Marcelo Lira
40938ef366 Fixes Bug #944: Segfault on QIcon(None).pixmap()
http://bugs.pyside.org/show_bug.cgi?id=944

Reviewed by Lauro Moura <lauro.neto@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:42 -03:00
Renato Filho
a713e377bb DynamicMetaObject optimizations.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:42 -03:00
Marcelo Lira
fae2dfd9b1 Moved AutoArrayPointer from libpyside to libshiboken.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:42 -03:00
Hugo Parente Lima
d129ca02f6 Don't color links black.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:42 -03:00
Hugo Parente Lima
8a81e8da21 Better looking module listing page. 2012-03-08 16:54:42 -03:00
Hugo Parente Lima
6c8ad3b83f Translate QHistoryState code snippet to Python. 2012-03-08 16:54:41 -03:00
Hugo Parente Lima
d771081005 Cosmetic changes on docs. 2012-03-08 16:54:41 -03:00
Marcelo Lira
609f6bc889 Created template code for added QObject's trUtf8 methods.
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:54:41 -03:00
Marcelo Lira
151111bde2 Replaced hard coded variables by type system variables in QtCore and QtGui. 2012-03-08 16:54:41 -03:00
Hugo Parente Lima
8d8c4cf308 Fix bug 923 - "Make QScriptValue (or QScriptValueIterator) implement the Python iterator protocol"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:41 -03:00
Hugo Parente Lima
d912655b5a New CSS style for PySide docs. 2012-03-08 16:54:41 -03:00
Marcelo Lira
c4994bc1ab Removed the "default-constructor" from some QtCore type entries.
The generator was improved to do a better job figuring out a default
constructor for types.

Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:41 -03:00
Marcelo Lira
09ef995719 Removed the remaining unnecessary QTextStream::operator>> methods. 2012-03-08 16:54:41 -03:00
Marcelo Lira
035265df10 Fixes the support for QGLShaderProgram's array functions.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:40 -03:00
Hugo Parente Lima
7a5d2e693b Fix bug 941 - "Signals with QtCore.Qt types as arguments has invalid signatures"
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:40 -03:00
Renato Filho
aa091e00ef Fixed windows compilation. 2012-03-08 16:54:40 -03:00
Renato Filho
fe4dd9d63f Created unit test for QScriptValue __repr__ function. 2012-03-08 16:54:40 -03:00
Renato Filho
d68d90a144 Implement a more detailed __repr__ function for QScriptValue.
Fixes bug #922.
2012-03-08 16:54:40 -03:00
Renato Filho
75bf7f24b8 Implemented 'QGLShaderProgram' array functions support.
Fixes bug #940.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente <hugo.lima@openbossa.org>
2012-03-08 16:54:40 -03:00
Renato Filho
3482e2c114 Update bug_931 unit test to check for isinstance.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Neto <lauro.neto@openbossa.org>
2012-03-08 16:54:40 -03:00
Renato Filho
7de55917c9 Implemented meta type for PySideSignal.
This allow intercept isinstance function to make valid with any
SignalInstance object.

Fixes bug #931.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Neto <lauro.neto@openbossa.org>
2012-03-08 16:54:40 -03:00
Hugo Parente Lima
5922676bb1 Use linked lists instead of lists to speed up a bit.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:54:40 -03:00
Hugo Parente Lima
9a8531bfd6 Small optimizations on libpyside. 2012-03-08 16:54:39 -03:00
Renato Filho
238222df8e Created unit test for property decorator.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Neto <lauro.neto@openbossa.org>
2012-03-08 16:54:39 -03:00
Renato Filho
dffc9a21ea Implemented Property decorator support.
Fixes bug #900.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Neto <lauro.neto@openbossa.org>
2012-03-08 16:54:39 -03:00
Renato Filho
6cd17da797 Bumped version to 1.0.5 2012-03-08 16:54:39 -03:00
Renato Filho
10269a2c32 Updated shiboken version dependency. 2012-03-08 16:54:39 -03:00
Renato Filho
3ab2d7b8c3 Fix typo on function modification signature. 2012-03-08 16:54:39 -03:00
Renato Filho
51dad59dc7 Use realloc functions on MetaObject functions.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Neto <lauro.neto@openbossa.org>
2012-03-08 16:54:38 -03:00
Renato Filho
ec45601aa1 Implemented DynamicMetaObject optiomizations.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Neto <lauro.neto@openbossa.org>
2012-03-08 16:54:38 -03:00
Renato Filho
9dd8f98e73 Update unit test for static metaobjet to work with new optimizations
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Neto <lauro.neto@openbossa.org>
2012-03-08 16:54:38 -03:00
Renato Filho
a0566f9928 Update QMetaObject test to test optimization changes.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Neto <lauro.neto@openbossa.org>
2012-03-08 16:54:38 -03:00
Renato Filho
7eae54e157 Update unit test for max signals.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Neto <lauro.neto@openbossa.org>
2012-03-08 16:54:38 -03:00
Renato Filho
81f264913e Fixed unit test for bug_847 mandelbug.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Neto <lauro.neto@openbossa.org>
2012-03-08 16:54:38 -03:00
Hugo Parente Lima
f10f4f70d4 Fix bug 938 - "QTemporaryFile JPEG problem"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:38 -03:00
Hugo Parente Lima
5902ca2e66 Fix bug 937 - "missing pid method in QProcess" 2012-03-08 16:54:38 -03:00
Hugo Parente Lima
0b6bafdd44 Fix bug 934 - "A __getitem__ of QByteArray behaves strange" 2012-03-08 16:54:38 -03:00
Hugo Parente Lima
673a7d1bcc Fix bug 890 - "Add signal connection example for valueChanged(int) on QSpinBox to the docs"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:37 -03:00
Marcelo Lira
5d05c840bf Moved test for bug #921 from QtCore's directory to QtGui's.
Because it imports QtGui module.

Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:54:37 -03:00
Hugo Parente Lima
e3539a09a8 Fix bug 821 - "Mapping interface for QPixmapCache"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:37 -03:00
Marcelo Lira
ef45b5a924 Fixes bug #910 - installEventFilter() increments reference count on target object.
http://bugs.pyside.org/show_bug.cgi?id=910

Also added/fixed unit tests.

Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:37 -03:00
Hugo Parente Lima
cab3b37b78 Add a comma. 2012-03-08 16:54:37 -03:00
Hugo Parente Lima
b166a72ccf Fix bug 916 - "Missing info about when is possible to use keyword arguments in docs [was: QListWidgetItem's constructor ignores text parameter]"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:37 -03:00
Hugo Parente Lima
e37426c8c4 Fix bug 926 - "qmlRegisterType does not work with QObject"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Neto <lauro.neto@openbossa.org>
2012-03-08 16:54:37 -03:00
Renato Filho
8ec6934396 Fix memory leak on GlobalReceiver. 2012-03-08 16:54:37 -03:00
Renato Filho
6f872f484c Created unit test for bug #931.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:37 -03:00
Renato Filho
304a265840 Renamed PySide.Signal instance class to PySide.SignalInstance.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:36 -03:00
Renato Filho
e6f0d69532 Created unit test for bug #921.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:54:36 -03:00
Renato Filho
420cc076b3 Disconnect signals during the class destroy.
Fix bug #921.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:54:36 -03:00
Hugo Parente Lima
f16324eb57 Update copyright year of license boiler plate. 2012-03-08 16:54:36 -03:00
Hugo Parente Lima
17e3d0da85 Fix bug 924 - "Allow QScriptValue to be accessed via []"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:54:36 -03:00
Hugo Parente Lima
48a1b539a4 Fix bug 920 - "Cannot use same slot for two signals"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:54:36 -03:00
Renato Filho
116a691516 Created unit test for bug #919.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:36 -03:00
Renato Filho
d4760309b7 Fix argument name on QStyle functions, and modify default value.
Fixes bug #919.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:36 -03:00
Renato Filho
d454f8a12c Created unit test for bug #915.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:35 -03:00
Renato Filho
6848e692ce Fixed QGraphicsView.scene return policy.
Fixes bug #915.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:35 -03:00
Hugo Parente Lima
c22e33a6c8 Fix bug 929 - "pkg-config files do not know about Python version tags"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:35 -03:00
Renato Filho
e9f082e83c Created unit test for bug #927.
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Hugo Parente <hugo.lima@openbossa.org>
2012-03-08 16:54:35 -03:00
Renato Filho
f62ba98e88 Fixed QThreadPool globalInstance ownership rules.
Fixed QThreadPool start, tryStart ownership rules.

Fixes bug #927.

Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Hugo Parente <hugo.lima@openbossa.org>
2012-03-08 16:54:35 -03:00
Renato Filho
9ef344629a Removed polymorphic-id-expression from QDeclarativeItem.
Fixes bug #925.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:54:35 -03:00
Renato Filho
794104582e Created unit test for bug #899.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:35 -03:00
Renato Filho
dc5ef0b998 Increment reference for functions used on QtCore.Property.
Fix bug #899.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:35 -03:00
Renato Filho
ae0e33ff72 Fixed enum test. 2012-03-08 16:54:34 -03:00
Renato Filho
c7385c45c4 Created unit test for bug #886.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente <hugo.lima@openbossa.org>
2012-03-08 16:54:34 -03:00
Renato Filho
b731b70fb2 Created unit test for duplicated signals.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente <hugo.lima@openbossa.org>
2012-03-08 16:54:32 -03:00
Renato Filho
09810443bf Fixed PySide signal object constructor.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente <hugo.lima@openbossa.org>
2012-03-08 16:54:32 -03:00
Renato Filho
fa59041a97 Created unit test for bug #896.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente <hugo.lima@openbossa.org>
2012-03-08 16:54:31 -03:00
Renato Filho
f2cecb5697 Implemented staticMetaObject property for QObjects. 2012-03-08 16:54:31 -03:00
Hugo Parente Lima
f3d69f65d1 Fix bug 913 - "Widgets inside QTabWidget are not exported as members of the containing widget"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:54:31 -03:00
Renato Filho
7d364bde65 Translate Shiboken enums to strings during the signal connection.
Fixes bug #903.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:31 -03:00
Renato Filho
0b5d8a1dec Created unit test for bug #909.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:31 -03:00
Renato Filho
f43d92fab4 Fix QUiLoader::load function ownership rules.
fixes bug #909.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:31 -03:00
Renato Filho
d82b8dbd8d Fixed QMainWindow ownership control.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:31 -03:00
Marcelo Lira
da39716cc9 Fixes bug #899 - http://bugs.pyside.org/show_bug.cgi?id=899
Added unit test.

Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed by Renato Araujo <renato.filho@openbossa.org>
2012-03-08 16:54:31 -03:00
Renato Filho
b6f38556bd Created unittest for bug #407. 2012-03-08 16:54:31 -03:00
Renato Filho
7eb5694e17 Created unit test for bug #897.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:30 -03:00
Renato Filho
b385e0c3ed Fixed propagation of properties for user-defined types.
Fixes bug #897.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:30 -03:00
Hugo Parente Lima
0d0981309e Fixed test case, when the destroyed() signal is emitted all C++ objects are just QObject because their up destructors were already called.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:54:30 -03:00
Hugo Parente Lima
1783db758c Remove reference leak on global receiver. 2012-03-08 16:54:30 -03:00
Renato Filho
c0a4142c42 Bumped version to 1.0.4. 2012-03-08 16:54:30 -03:00
Renato Filho
db796e14d0 Created test for QObject.inherits.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:29 -03:00
Renato Filho
ebaf95ca1a Removed glue code for QObject.inherits function.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:29 -03:00
Renato Filho
f549793a5c Fixed QWidget.parentWidget return policy.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:29 -03:00
Renato Filho
a208d34ede Fill qApp is any QApplication is active during the QtGui moude import.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:29 -03:00
Marcelo Lira
af2972255d Updated PySide type systems to use the new type system variables: %ISCONVERTIBLE and %CHECKTYPE.
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed by Renato Araujo <renato.filho@openbossa.org>
2012-03-08 16:54:29 -03:00
Hugo Parente Lima
df30f37512 Fix bug 879 - "QDoubleSpinBox: Can't call the parent validate() method from a subclass"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:29 -03:00
Hugo Parente Lima
590abafc54 Fix bug 822 - "Can't use QApplication without X"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:29 -03:00
Marcelo Lira
b66f8a789a Added an unit test for bug #871.
http://bugs.pyside.org/show_bug.cgi?id=871

Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:54:28 -03:00
Marcelo Lira
90be657119 Fixed default return value for "QStyleOptionViewItem QAbstractItemView::viewOptions() const".
Wrong code would be generated if compiling avoiding the "protected hack".
2012-03-08 16:54:28 -03:00
Hugo Parente Lima
23445c7fee Fix bug 877 - "Fatal Python error on application quit."
Reviewer: Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:54:28 -03:00
Hugo Parente Lima
c1f78498e6 Fix bug 870 - "QStylePainter.drawControl doesn't draw anything"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:28 -03:00
Renato Filho
23d1e497d8 Implemented support to MSG type on windows. 2012-03-08 16:54:28 -03:00
Renato Filho
3e88ef1c54 Removed unnecessary functions from QByteArray.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:28 -03:00
Hugo Parente Lima
97da5d1574 Fix bug 869 - "QDateTimeEdit initial time problem"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:28 -03:00
Hugo Parente Lima
6f46c1fab5 Fix bug 424 - "QDockWidget.setTitleBarWidget does not accept 0" 2012-03-08 16:54:27 -03:00
Hugo Parente Lima
0589d438b3 Show perm links only when the mouse hover on title. 2012-03-08 16:54:27 -03:00
Hugo Parente Lima
85a3a7fb31 Update javascript files used in sphinx generated documentation. 2012-03-08 16:54:27 -03:00
Renato Filho
902b1ec786 Created unit test for bug #860.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente <hugo.lima@openbossa.org>
2012-03-08 16:54:27 -03:00
Renato Filho
3595badad6 Fixed signal connection with native c++ slot.
Fixes bug #860.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente <hugo.lima@openbossa.org>
2012-03-08 16:54:27 -03:00
Hugo Parente Lima
e3df0766c3 Fix bug 827 - "Anchor sign for headers to copy links for sections"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:27 -03:00
Hugo Parente Lima
928fa00609 Fix bug 631 - "QSocketNotifier: Accept file-like object (with .fileno() method) in constructor" 2012-03-08 16:54:27 -03:00
Hugo Parente Lima
542adc0452 Avoid warnings about redefined constants. 2012-03-08 16:54:27 -03:00
Hugo Parente Lima
596f8347e2 Unit test for bug862 - "Problems when printing objects" 2012-03-08 16:54:27 -03:00
Marcelo Lira
801efd40f3 Removed the rejection of QAbstractFileEngine.beginEntryList.
Added an unit test.

Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:54:26 -03:00
Marcelo Lira
f957a6f42d Moved internalPointer methods code injection into a code template. 2012-03-08 16:54:26 -03:00
Renato Filho
c0d6e44acc Updated example to handle with Python warnings.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:26 -03:00
Hugo Parente Lima
f1c7c78694 Port all buffer related code to the new Shiboken buffer interface.
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:26 -03:00
Renato Filho
7109418dbe Created unit test for QObject.eventFilter function.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:26 -03:00
Renato Filho
20f8953cb4 Fixed problems with eventFilter function destruction order.
The object passed to eventFilter function will keep a reference
to the listener object, this will ensure the destruction order.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:26 -03:00
renato araujo
3800537912 Created ClassInfo documentation.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
              Hugo Parente <hugo.lima@openbossa.org>
2012-03-08 16:54:26 -03:00
Renato Filho
cbf60dce54 Updated generatorrunner dependency version. 2012-03-08 16:54:26 -03:00
Hugo Parente Lima
2c2398db4f Minor change in a doc code snippet. 2012-03-08 16:54:25 -03:00
Renato Filho
0c8a5401d9 Fix memory leak on QEasingCuverFunctor. 2012-03-08 16:54:25 -03:00
Renato Filho
ed7b92d5d7 Check if the same python object arrive on destroyed signal.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:25 -03:00
Renato Filho
77559ac639 Created DestroyListener class.
This class is used to keep the Python object live until the signal destroyed emission.

With this is possible to use the QObject on destruction signal.

Fixes bug #505.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:25 -03:00
Renato Filho
d9c43275a0 Fixed reference leek on global receiver callback call.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:25 -03:00
Renato Filho
306395a65f Created unit test for ClassInfo class.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:25 -03:00
Renato Filho
e13ce9212a Implemented PySide::ClassInfo Object.
This class reproduce the Qt macro Q_CLASSINFO behavior.

Eg.:
    @QtCore.ClassInfo(author='PySide', url='http://www.pyside.org')

fixes bug #705.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:25 -03:00
Renato Filho
5805ea4e01 Create checkType for libpyside objects.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:25 -03:00
Renato Filho
6e8f2a6d61 Fix indentation.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:25 -03:00
Marcelo Lira
e93b79399a Added the missing QPixmapCache.Key class to the type system.
Unit tests for QPixmapCache were also added.

Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:24 -03:00
Renato Filho
5e778d0f1b Create unit test for function QEasingCuver.setCustomType.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:24 -03:00
Renato Filho
cceea0af84 Implemented support to QEasingCurve.setCustomType.
fixes bug #725.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:24 -03:00
Renato Filho
923d007ab9 Create PySideWeakRef class.
With this class you can use a c function as a callback on PyObject destruction.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:24 -03:00
Hugo Parente Lima
21b5e6f05a Remove ugly gray background on documentation see-also links. 2012-03-08 16:54:24 -03:00
Lauro Neto
7888982223 Update test for python 2.5
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Reviewer: Hugo Lima <hugo.lima@openbossa.org>
2012-03-08 16:54:23 -03:00
Hugo Parente Lima
68157d645e Fix bug 803 - "QWebElementCollection.operator[] is not implemented"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:23 -03:00
Paulo Alcantara
b3f5de9999 Fix typo
Signed-off-by: Paulo Alcantara <paulo.alcantara@openbossa.org>
2012-03-08 16:54:23 -03:00
Renato Filho
8e221bfb97 Implemented convertion from Python types for QDate, QTime, QDateTime.
Fixes bug #680

Reviewer: pcacjr <pcacjr@gmail.com>
          Hugo Parente <hugo.lima@openbossa.org>
2012-03-08 16:54:23 -03:00
Hugo Parente Lima
952f9f0bda Fix bug 686 - "Request to make Q[Mutex|Read|Write]Locker context managers"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:23 -03:00
Hugo Parente Lima
c27dceaaab White spaces removal... 2012-03-08 16:54:23 -03:00
Marcelo Lira
85a5641368 Unit test for bug 634, based on code from Marcus Lindblom.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:23 -03:00
Renato Filho
0f1b57dc94 Created unit test for bug #854.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente <hugo.lima@openbossa.org>
2012-03-08 16:54:23 -03:00
Renato Filho
ddae00b6c4 Fixed kee-reference rule.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente <hugo.lima@openbossa.org>
2012-03-08 16:54:22 -03:00
Hugo Parente Lima
48f8b3865d Fix bug 857 - "64bit Windows build broken"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Lauro Moura <lauro.filho@openbossa.org>
2012-03-08 16:54:22 -03:00
Marcelo Lira
b926ac5def Added tests for bug #716 - QPersistentModelIndex isn't convertible to QModelIndex
The main test (exactly the same as reported) was added to QtGui tests,
but also extended QAbstractItemModel test with a case that is the
essence of the problem.

http://bugs.pyside.org/show_bug.cgi?id=716

Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:22 -03:00
Marcelo Lira
c057f74ce3 QPersistentModelIndex has its "operator const QModelIndex&() const" method back. 2012-03-08 16:54:22 -03:00
Paulo Alcantara
ad023b3cb5 Create unit tests for bug #606
Signed-off-by: Paulo Alcantara <paulo.alcantara@openbossa.org>

Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:22 -03:00
Paulo Alcantara
6545eb21f5 Fix bug #606
Add toTuple() function to these all classes:
    - QPoint/QPointF/QSize/QSizeF/QVector2D/QVector3D/QVector4D
    - QLine/QLineF/QColor

Signed-off-by: Paulo Alcantara <paulo.alcantara@openbossa.org>

Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:22 -03:00
Paulo Alcantara
23a1c436e3 Add template to toTuple() functions
Signed-off-by: Paulo Alcantara <paulo.alcantara@openbossa.org>
2012-03-08 16:54:22 -03:00
Hugo Parente Lima
82335c4614 Always use the local Qt headers + global.h.in cleanup.
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:22 -03:00
Hugo Parente Lima
c1f05a0624 Only add Qt4.6 classes when using Qt4.6 on QtTest and QtGui. 2012-03-08 16:54:21 -03:00
Hugo Parente Lima
2c83593868 Correctly set SUPPORTED_QT_VERSION variable to the current Qt version. 2012-03-08 16:54:21 -03:00
Hugo Parente Lima
f592efca98 Add since attribute for classes and enums added on Qt4.6 and Qt4.7. 2012-03-08 16:54:21 -03:00
Hugo Parente Lima
93ea992d35 Fix QGraphicsItem compilation on Qt4.5. 2012-03-08 16:54:21 -03:00
Hugo Parente Lima
eca2d3cd6d Fix QColor wrapper compilation on Qt4.5. 2012-03-08 16:54:21 -03:00
Hugo Parente Lima
5f80e31958 Be compatible with Qt4.5, i.e. no QScopedPointer. 2012-03-08 16:54:21 -03:00
Hugo Parente Lima
c8f5fa07fe Remove typesystem verbosity after fix of bug 417.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:54:21 -03:00
Hugo Parente Lima
c85ce95458 Use add-function on QCoreApplication and QApplication constructors.
This was needed after a fix in the shiboken generator regarding the
tp_init initialization.
2012-03-08 16:54:21 -03:00
Renato Filho
5825092e76 Created unit test for bug #312.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:20 -03:00
Renato Filho
ad58b05c54 Uses QMetaObject revision 3.
This allow to register signal and slot in any order.

Fixes bug #312

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:20 -03:00
Renato Filho
143ae88746 Created test for mew pythonic functions on QTransform class.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:20 -03:00
Renato Filho
9de9075f4f Create pythonic functions for QTransform class.
fixes bug #615.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:20 -03:00
Hugo Parente Lima
cc9b6766a2 Fix assert in bug 722 unit test.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:54:20 -03:00
Hugo Parente Lima
42ae5c406f Remove the restriction of detecing QtOpenGL module just when the gl.h header was found.
This is needed to be able to compile the QtOpenGL module on Linux when using OpenGL-ES
backend. On the other hand OpenGL-ES support isn't yet supported under MS Windows but I
don't think that this should be a problem at all.
2012-03-08 16:54:20 -03:00
Renato Filho
03312ecc18 Avoid run PyObjectWrapper operators without python interpreter.
Fixes bug #829.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:20 -03:00
Renato Filho
ae67df9d8b Created unit test for bug #847.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:20 -03:00
Paulo Alcantara
595133f9c8 Create unit test for bug #835
Signed-off-by: Paulo Alcantara <paulo.alcantara@openbossa.org>

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:20 -03:00
Paulo Alcantara
81d7107279 Fix bug #835 - "pyside breaks descriptor protocol"
Signed-off-by: Paulo Alcantara <paulo.alcantara@openbossa.org>

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:19 -03:00
Hugo Parente Lima
f05552fc86 Fix path of pysideqmlregistertype.cpp. 2012-03-08 16:54:19 -03:00
Hugo Parente Lima
442bcd9d54 Fix bug 825 - "Can't register a class using that uses metaclasses in QML using qmlRegisterType"
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:19 -03:00
Renato Filho
8cb9b6d197 Updated snippets code to use QFileSystemModel instead of deprecated class QDirModel.
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:19 -03:00
Hugo Parente Lima
7542b1c726 Moved unit test of bug 834 from QtCore to QtGui, as it tests QtGui classes. 2012-03-08 16:54:19 -03:00
Renato Filho
adf13f83e9 Created unit test for bug #820.
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:19 -03:00
Renato Filho
f65c15ec95 Fixed signal name parser.
Fixes bug #820.

Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:19 -03:00
Renato Filho
18924d8ce0 Created unit test for QSysInfo class.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:19 -03:00
Renato Filho
7e2fd5d14b Fixed QSysInfo.Endian enum detection on MacOs.
Fixes bug #809.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:19 -03:00
Renato Filho
ba6726449f Created unit test fo QMacStyle class.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:18 -03:00
Renato Filho
8e8e8b044b Included QMacStyle class check.
Included QMacStyle header on global include.

Fixes bug #840

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:18 -03:00
Hugo Parente Lima
a445a69fac Fix bug 786 - "There's no __eq__ for all classes inherited from ObjectDescription<T> due to an Apiextractor bug."
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:54:18 -03:00
Renato Filho
4b5a6f760f Fixed some typos on unit test for bug #841 2012-03-08 16:54:18 -03:00
Renato Filho
1d3063a823 Created unit test for bug #785.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:18 -03:00
Renato Filho
c1f1b62957 Put back missing functions for class QItemSelection.
fixes bug #785.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:18 -03:00
Hugo Parente Lima
fd2abb11f5 Fix bug 797 - "error on ui file load"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:54:18 -03:00
Hugo Parente Lima
71cd11a1c3 Fix bug 844 - "Crash in QGraphicsItem::toGraphicsObject when printing obj reference"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:54:18 -03:00
Paulo Alcantara
d03ba5bb65 Create unit test for bug #834
Signed-off-by: Paulo Alcantara <paulo.alcantara@openbossa.org>

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:17 -03:00
Paulo Alcantara
bc3a572c5a Fix bug #834 - "Segfault on childEvent"
The fix was basically setting the owner attribute to a correct value.

Signed-off-by: Paulo Alcantara <paulo.alcantara@openbossa.org>

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:17 -03:00
Renato Filho
2ef1ba00c7 Create manually dir for tests.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:17 -03:00
Renato Filho
2b69cc925f Fixed QStandardItem::clone and QStandardItemModel::setItemPrototype ownership rules.
Fixes bug #841.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:17 -03:00
Renato Filho
e50456ec72 Updated unit test for bug #617 to new enum repr format.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:17 -03:00
Renato Filho
81dc2bba10 Created unit test for bug #826.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:17 -03:00
Renato Filho
46986a6d0d Created unit test for bug #839.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:17 -03:00
Renato Filho
56d3f53bef Implemented QTestTouch functions.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:17 -03:00
Renato Filho
2b455b5acd Bump version and updated dependency version required. 2012-03-08 16:54:17 -03:00
Renato Filho
42d7f881d5 Fixed bug 728 to use the correct arguments on function call.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:16 -03:00
Paulo Alcantara
cecd566782 Create unit test for QIPv6Address
Signed-off-by: Paulo Alcantara <paulo.alcantara@openbossa.org>

Reviewer: Renato Araujo <renato.araujo@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:16 -03:00
Paulo Alcantara
5a80d6418b Fix bug #788 - "QIPv6Address.__getitem__ is missing."
Signed-off-by: Paulo Alcantara <paulo.alcantara@openbossa.org>

Reviewer: Renato Araujo <renato.araujo@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:16 -03:00
Renato Filho
8d6761b93d Fixed QFileDialog functions which used QString as pointer to return values
Fixes bug #819

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:16 -03:00
Renato Filho
b2ddb6c1cd Fixed QKeyEvent polymorphic-id-expression to support QEvent::ShortcutOverride.
Applyed patch from Evan Patterson <epatters@enthought.com>
Fixes bug #833

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:16 -03:00
Hugo Parente Lima
17a4a02354 Fix documentation bug 853 - "Provide constants for Qt and PySide version"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:54:16 -03:00
Lauro Neto
4fd1c23ae3 Update inheritance diagram sphinx extension.
Better handling missing classes.

Reviewer: Renato Araujo <renato.filho@openbossa.org>
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:16 -03:00
Renato Filho
8eb96fc200 Created unit test for bug 829.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:16 -03:00
Renato Filho
26e45be107 Implemented stream operator for PyObjectWrapper.
Fixes bug #829.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:16 -03:00
Renato Filho
ea4968f5f3 Fixed QVariant conversion for dictionary.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:15 -03:00
Hugo Parente Lima
3bb2bf375e Fix bug 836 - "Pyside crashes with more than four base classes"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:54:15 -03:00
Hugo Parente Lima
c4225d063d Fix bug 766 - "Constructor "QImage(const char* const xpm[])" missing"
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:15 -03:00
Hugo Parente Lima
adac79f08b Fix bugs 776 and 777
Bug 776 - "Operator "QPolygon::operator<<(QPoint)" missing"
Bug 777 - "Operator "QPolygon::operator<<(QVector<QPoint>)" missing"
2012-03-08 16:54:15 -03:00
Renato Filho
74dc26aa71 Fix test on windows.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:54:15 -03:00
Renato Filho
862e1a14b2 Created unit test for bug #778.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:54:15 -03:00
Renato Filho
4bfd1759d4 Implemented support to iterator on QTreeWidgetItemIterator.
Fixes bug #778.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:54:15 -03:00
Renato Filho
50e6f9690b Created unit test to QKeySequence convertion to QVariant.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:15 -03:00
Renato Filho
5d3285e41d Fixed QKeySequence convertion to QVariant.
Fixes bug #775.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:14 -03:00
Renato Filho
94571574b4 Created unit test for QKeySequence.operator[].
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:14 -03:00
Renato Filho
f94046f4a2 Implemented support to QKeySequence.operator[].
Fixes bug #774.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:14 -03:00
Hugo Parente Lima
9dd46ce92f Fix bugs 771, 772, 779, 780, 781, 782, 783 and 784
Bug 771 - "Constructor "QStandardItem(const QStandardItem&)" missing"
Bug 772 - "Method "QPainter::drawConvexPolygon(const QPoint* points, int pointCount)" missing"
Bug 779 - "Method "QPainter::drawLines(const QLine* lines, int lineCount)" missing"
Bug 780 - "Method "QPainter::drawLines(const QPoint*, int)" missing"
Bug 781 - "Method "QPainter::drawPoints(const QPoint*, int)" missing"
Bug 782 - "Method "QPainter::drawPolygon(const QPointF*, int, Qt::FillRule)" missing"
Bug 783 - "Method "QPainter::drawPolyline(const QPoint*, int)" missing"
Bug 784 - "Method "QPainter::drawRects(const QRect*, int)" missing"

Reviewer: Renato Araújo <renato.araujo@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:14 -03:00
Hugo Parente Lima
0f0124e54c Fix bug 768 - "Method "QGraphicsItemGroup* QGraphicsScene::createItemGroup(const QList<QGraphicsItem*>& items)" missing"
Fix bug 769 - "Method "QGraphicsScene::destroyItemGroup(QGraphicsItemGroup* group)" missing"

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:14 -03:00
Hugo Parente Lima
d7684d00e3 Fix bug 765 - "Method "QRect QStyle::itemTextRect(const QFontMetrics&,constQRect&,int,bool,const QString&) const" missing" 2012-03-08 16:54:14 -03:00
Hugo Parente Lima
c104fa61ad Fix bug 760 - "Method "void QMatrix::map(int x,int y,int* tx,int* ty)const" missing"
Fix bug 761 - "Method "void QMatrix::map(qreal x, qreal y, qreal* tx, qreal* ty) const" missing"
2012-03-08 16:54:14 -03:00
Renato Filho
6ec7cd56a3 Fix unit test bug_750 and qpicture_test to avoid deadlock in some plataforms.
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:14 -03:00
Renato Filho
9b4a43be49 Implemented test for QWebFrame.metadata function.
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:13 -03:00
Renato Filho
047d42c704 Implemented conversion from QMultiMap to Python dictonary.
Fixes bug #773.

Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:13 -03:00
Renato Filho
c9a260df4b Created unit test for function QPicture.setData
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:13 -03:00
Renato Filho
fc47ed069e Implemented necessary convertions rules for function QPicture.setData.
Fixes bug #759

Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:13 -03:00
Renato Filho
0512a3f98f Fixed reference leak on PySideSignal for QTimer.SingleShot
Fixes bug #815.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:13 -03:00
Lauro Neto
3bc3257c8b Set WA_InputMethodEnabled in test.
If WA_InputMethodMethod is not set, setFocusWidget will fail
in a ASSERT in a debug-compiled Qt.

Reviewer: Hugo Lima <hugo.lima@openbossa.org>
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:13 -03:00
Renato Filho
ef05a106c3 Created unit test for bug #811.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:13 -03:00
Renato Filho
6ad57fe3f4 fix QTextBlock.setUserData reference leak.
Fixes bug #811.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:13 -03:00
Lauro Neto
055e5e97b6 Fix bug 814 test.
Using the modelData property name was causing problems
with a debug-build Qt.

Reviewer: Renato Araujo <renato.araujo@openbossa.org>
Reviewer: Hugo Lima <hugo.lima@openbossa.org>
2012-03-08 16:54:13 -03:00
Renato Filho
26be28d120 Fixed test to avoid problems with float numbers in different archs.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:12 -03:00
Renato Filho
2b0c31fb02 Exported missing enums on phonon.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:12 -03:00
Renato Filho
98a0d2ba6f Created unit test for ObjectDescription.fromIndex.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:12 -03:00
Renato Filho
dab522fe31 Implemented function ObjectDescription.fromIndex.
Fixes bug #787.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:12 -03:00
Renato Filho
bba3918943 Fix round problems on unit test. 2012-03-08 16:54:12 -03:00
Renato Filho
82155ceeda Create unit test for bug #757.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:12 -03:00
Marcelo Lira
13878d27cd Fixes Bug #757 - Constructor "QPixmap(const char* const[] xpm)" missing.
http://bugs.pyside.org/show_bug.cgi?id=757

Reviewer: Renato Araujo <renato.filho@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:12 -03:00
Renato Filho
595c70c32f Avoid delete file from source dir. 2012-03-08 16:54:11 -03:00
Hugo Parente Lima
ea5dd4f257 Fix bug 717 - "QByteArray doesn't honor \0 inside strings."
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:11 -03:00
Hugo Parente Lima
e14378b126 Fix inject code of QByteArray::fromRawData.
The QByteArray returned must share, nto copy, the string contents.
2012-03-08 16:54:11 -03:00
Marcelo Lira
5d753e281a Fixes bug #755 - Method "void QInputContext::setFocusWidget(QWidget*)" missing
Also added an unit test.

http://bugs.pyside.org/show_bug.cgi?id=755

Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:11 -03:00
Marcelo Lira
8aa06c9bc9 Fixes bugs 753 and 754.
Bug #753 - Method "void QTextDocument::undo(QTextCursor*)" missing
Bug #754 - Method "void QTextDocument::redo(QTextCursor*)" missing

Also added an unit test.
2012-03-08 16:54:11 -03:00
Marcelo Lira
accbee8ae8 Fixes bug #741 - Method "qreal QTextLine::cursorToX(int*,Edge) const" missing.
Also added unit tests.

http://bugs.pyside.org/show_bug.cgi?id=741
2012-03-08 16:54:11 -03:00
Marcelo Lira
eed7193f32 Fixes bug #742 - Method "void QPrinter::getPageMargins(qreal*,qreal*,qreal*,qreal*,Unit) const" missing
Also added unit tests.

http://bugs.pyside.org/show_bug.cgi?id=742
2012-03-08 16:54:11 -03:00
Marcelo Lira
6efe441b76 Fixed CMakeLists.txt files to prevent static source files of being deleted by "make clean". 2012-03-08 16:54:10 -03:00
Renato Filho
45604383c1 The funcition QSplashScreen.repaint was removed because that override the QWidget.repaint.
This will save some genereted code and does not produce any side-effect.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:10 -03:00
Renato Filho
adf3d712d5 Created unittest for bug #750.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:10 -03:00
Renato Filho
2dcb2a855a Put back QPainter.fontInfo.
Fixes bug #750.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:10 -03:00
Renato Filho
640a428c9b Created unit test for bug #743.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:10 -03:00
Renato Filho
000a323245 Implemented support to mapping on QMatrix4x4.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:10 -03:00
Renato Filho
6f98147602 Created unit test for bug #740.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:10 -03:00
Renato Filho
0c5809474b Implemented function QBitmap.fromData.
Fixes bug #740

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:10 -03:00
Renato Filho
2a788ba618 Created unit test for bug #722.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:54:09 -03:00
Renato Filho
fa3bbed001 Use PyFloat as double in signal signatures.
Fix bug #722.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:54:09 -03:00
Hugo Parente Lima
998084a7fe Removes the removal of QMatrix4x4 call operators.
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:09 -03:00
Hugo Parente Lima
958394f5ec Fix code injection of QIODevice to support returning an error. 2012-03-08 16:54:09 -03:00
Hugo Parente Lima
c2c04ddd51 Fix bug 723 - "Missing QAbstractFileEngine.read and QAbstractFileEngine.readLine" 2012-03-08 16:54:09 -03:00
Renato Filho
b1ab2a0260 Created QtDeclarative.ListProperty documentation.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:09 -03:00
Renato Filho
b3a3a29363 Create unit test for bug #816.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:09 -03:00
Renato Filho
b2982dccc5 Fixed QCoreApplication.instance method to handle with application created before PySide module loading.
Fixes bug #816.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:54:09 -03:00
Renato Filho
442a0ca932 Created unit test for bug #814.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente <hugo.lima@openbossa.org>
2012-03-08 16:54:08 -03:00
Renato Filho
99c656e2a5 Updated dependency version. 2012-03-08 16:54:08 -03:00
Renato Filho
b49109923f Fixed bug #400 link description. 2012-03-08 16:54:08 -03:00
Renato Filho
de23ffa760 Create unitest for bug #688.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:08 -03:00
Renato Filho
ccf8ddf75b Implemented support to pyton iterator in QTextFrame::iterator.
Fixes bug #688.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:08 -03:00
Hugo Parente Lima
e3b24c2204 Fix 720 - "QByteArray prints itself wrong, on tp_print and tp_repr"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:08 -03:00
Hugo Parente Lima
c06cec65df Fix bug 724 - "Missing QAbstractFileEngine.map method" 2012-03-08 16:54:08 -03:00
Hugo Parente Lima
6ef7460a47 Fix bug 721 - "QFile doesn't support map and unmap functions." 2012-03-08 16:54:08 -03:00
Hugo Parente Lima
0cb14ebf35 Remove unused variables and warnings when using gcc 4.6. 2012-03-08 16:54:08 -03:00
Marcelo Lira
fab79738ac Updated type system files to use the new %BEGIN_ALLOW_THREADS and %END_ALLOW_THREADS variables.
Reviewed by Lauro Moura <lauro.neto@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:07 -03:00
Marcelo Lira
cf905e4661 Fixes bugs 746, 747 and 748.
Bug #746 - Method "QFormLayout::getLayoutPosition(QLayout*,int*,QFormLayout::ItemRole*)const" missing
Bug #747 - Method "QFormLayout::getWidgetPosition(QWidget*,int*,QFormLayout::ItemRole*)const" missing
Bug #748 - Method "QFormLayout::getItemPosition(int,int*,QFormLayout::ItemRole*)const" missing

Also added unit tests.
2012-03-08 16:54:07 -03:00
Marcelo Lira
77be0fc1a7 Fixes bugs 739 and 752.
Bug #739 - Method "QTransform::map(qreal x, qreal y, qreal* tx, qreal* ty) const" missing
Bug #752 - Method "void QSplitter::getRange(int index, int* min, int* max) const" missing

Also added unit tests.
2012-03-08 16:54:07 -03:00
Marcelo Lira
f1b3580d57 Do *not* mix tabs and spaces. 2012-03-08 16:54:07 -03:00
Marcelo Lira
8b1f0d192a Fixes bugs 744, 745, 756, 758 and 764.
Bug #744 - Method "void QGraphicsLayout::getContentsMargins(qreal*,qreal*,qreal*,qreal*) const" missing
Bug #745 - Method "void QGraphicsLayoutItem::getContentsMargins(qreal*,qreal*,qreal*,qreal*) const" missing
Bug #756 - Method "void QWidget::getContentsMargins(int*,int*,int*,int*) const" missing
Bug #758 - Method "void QTextCursor::selectedTableCells(int*,int*,int*,int*) const" missing
Bug #764 - Method "void QLayout::getContentsMargins(int*,int*,int*,int*) const" missing

Also added unit tests.
2012-03-08 16:54:07 -03:00
Marcelo Lira
00f0ea88cf Merged fix_int*... and fix_qreal*... type system templates.
Also modified the method call to be friendlier with virtual methods.
2012-03-08 16:54:07 -03:00
Hugo Parente Lima
4b1986f917 Version bump to 1.0.2 2012-03-08 16:54:07 -03:00
Renato Filho
21786216f2 Create unit test for bug #793.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente <hugo.lima@openbossa.org>
2012-03-08 16:54:07 -03:00
Renato Filho
1067faec16 Change the order of function call on destructionVisitor to avoid problems with cyclic dependency.
Fixes bug #793.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente <hugo.lima@openbossa.org>
2012-03-08 16:54:06 -03:00
Marcelo Lira
2e1ed4a881 Fixes bug #489 - PySide.QtGui.QImage with string buffer argument.
http://bugs.pyside.org/show_bug.cgi?id=489

Also added an unit test.

Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:54:06 -03:00
Hugo Parente Lima
cfe00ac969 Fix bug 712 - "QtGui.QFormLayout doesn't have setItem() function"
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:06 -03:00
Hugo Parente Lima
d6afa13b44 Fix bug 540 - "Duplicate entries in QRegExp docs"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:05 -03:00
Hugo Parente Lima
d981750c46 Fix doc bug 794 - "QPixmapCache.find example is wrong" 2012-03-08 16:54:05 -03:00
Hugo Parente Lima
a3e1ea3b97 Fix bug 790 - "QStyledItemDelegate Signal with lambda and QModelIndex: Fatal Python error: PyEval_SaveThread: NULL tstate"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:05 -03:00
Hugo Parente Lima
deefa35087 Fix bug 694 - "QWebPage::extensions need injected overloads due to required casts on C++ version" 2012-03-08 16:54:05 -03:00
Hugo Parente Lima
61f479b682 Fix bug 699 - "PySide.QtCore.Property doesn't throw a TypeError if the first arg isn't a PyType." 2012-03-08 16:54:05 -03:00
Hugo Parente Lima
e360a53087 Fix bug 685 - "The second arg. of QObject.findChildren doesn't have a default value and doesn't support regexes."
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:05 -03:00
Hugo Parente Lima
c1f507f87a Fix a type in QtGui type system. 2012-03-08 16:54:05 -03:00
Hugo Parente Lima
16421e85e7 Use set instead of add on reference-count action attribute. 2012-03-08 16:54:05 -03:00
Hugo Parente Lima
fda4e800ca Type systems of all modules but QtCore and QtGui reviewed. 2012-03-08 16:54:05 -03:00
Hugo Parente Lima
080dafd0e5 Fix bug 736 - "Signal/Slot is not working at all"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:54:04 -03:00
Hugo Parente Lima
3c50d09dda Changed local variable naming style. 2012-03-08 16:54:04 -03:00
Renato Filho
c0be87af80 Revert "Fixed test for bug #674 to works with new getattr check."
This reverts commit a6f0d0cb52.
2012-03-08 16:54:04 -03:00
Renato Filho
58fb1c705c Only raise 'RuntimeError' for function call to avoid problems with contructor order calls. 2012-03-08 16:54:04 -03:00
Marcelo Lira
a2f110d3b9 Added comments for all method removals.
And some other clean ups.

Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:54:04 -03:00
Hugo Parente Lima
44f5f62618 Fix bug 728 - "QFileDialog.getOpenFileNames never returns (hangs)"
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:04 -03:00
Renato Filho
69abc806ec Created unit test for bug #726.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:54:04 -03:00
Renato Filho
258995d03c Does not use normalizeSignature in functions with return type.
Fix bug #726.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:54:04 -03:00
Hugo Parente Lima
120ace2cf9 Add unit test for bug 693 - "Heap corruption or double free reported on program exit"
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:04 -03:00
Renato Filho
9fd4705cf6 Fixed test for bug #674 to works with new getattr check.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:03 -03:00
Renato Filho
734e086327 Created unit test for bug #696.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:03 -03:00
Renato Filho
855ad2d587 Check if class is valid before call meta object function on class getattro function.
Fix bug #696.

Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:03 -03:00
Renato Filho
d3fb0b38b7 Created unit test for bug #711.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:54:03 -03:00
Renato Filho
32fb36f97a Fix QToolbar.clear parent policy.
Fixes bug #711.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:54:03 -03:00
Hugo Parente Lima
a8be4c2326 Add unit test for bug 706 - "dataChanged signal raise an incorrect TypeError"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:54:03 -03:00
Hugo Parente Lima
945f9bffd9 Fix bug 718 - "PySide/PyQt4 QByteArray incompatibilities: setNum method"
Fix bug 719 - "PySide/PyQt4 QByteArray incompatibilities: appendByte method"
2012-03-08 16:54:03 -03:00
Hugo Parente Lima
e2121ae09a Add comments to some function removals. 2012-03-08 16:54:03 -03:00
Renato Filho
40bbb49487 Created unit test for bug #714.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:02 -03:00
Renato Filho
e8a8e3c63e Removed parent policy from QLabel.setPixmap.
This is not a parent transfer because the function receives a "const &" and stores a copy of the pixmap.

Fixes bug #714.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
	  Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:02 -03:00
Lauro Neto
c453a7ca2b Remove duplicated const functions from QRegExp
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:02 -03:00
Hugo Parente Lima
8b261892b8 Last code snippets.... 2012-03-08 16:54:02 -03:00
Hugo Parente Lima
36fdd023e0 Removed Signal/Slot documentation content. 2012-03-08 16:54:02 -03:00
Hugo Parente Lima
632105b470 Version bump to 1.0.1 2012-03-08 16:54:02 -03:00
Hugo Parente Lima
3798c8718c More code snippets ported to Python. 2012-03-08 16:54:02 -03:00
Hugo Parente Lima
11042fdbaa Version bump, 1.0.0 final yay! 2012-03-08 16:54:02 -03:00
Hugo Parente Lima
70e12fad1e Added some missing code snippets to PySide documentation. 2012-03-08 16:54:02 -03:00
Hugo Parente Lima
8b83ec73fa Removed useless files from docs. 2012-03-08 16:54:01 -03:00
Hugo Parente Lima
b0a0454f35 Remove some warning messages when generating the docs.
Those classes haven't especific documentation, they are only typedefs for template instanciations.
2012-03-08 16:54:01 -03:00
Luciano Wolf
1c66507f80 Fix bug 676 - "wrong QLocale.toFloat() description".
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:54:01 -03:00
Hugo Parente Lima
e0799d7dcf Fix bug#708 - "Remaining pyqtSignal in ref docs" 2012-03-08 16:54:01 -03:00
Hugo Parente Lima
11a7187cf8 Added module documentation for all modules. 2012-03-08 16:54:01 -03:00
Hugo Parente Lima
3c58feee51 Removed a lot of files not used by the doc generation. 2012-03-08 16:54:01 -03:00
Hugo Parente Lima
66cdf3f52f Missing doc code snippet for webkit. 2012-03-08 16:54:01 -03:00
Hugo Parente Lima
dd123896b4 Fixed/translated some doc. code snippets. 2012-03-08 16:54:01 -03:00
Hugo Parente Lima
b4026126de Use multiple code snippets directories to fix the crazyness of Qt docs. 2012-03-08 16:54:00 -03:00
Hugo Parente Lima
0a4573591e Removed unused doc snippet files. 2012-03-08 16:54:00 -03:00
Hugo Parente Lima
905f660ab2 Added modify-documentation do QDeclarativePropertyMap to remove references to QVariant and QString. 2012-03-08 16:54:00 -03:00
Hugo Parente Lima
eb2a982b94 Added missing format attribute. 2012-03-08 16:54:00 -03:00
Hugo Parente Lima
610fc659e8 Added some QML tutorials to the documentation. 2012-03-08 16:54:00 -03:00
Hugo Parente Lima
a7263b23e0 Minor fixes on pysideapi2.rst. 2012-03-08 16:54:00 -03:00
Hugo Parente Lima
2a58c0102b Use monospace font for sphinx literal strings. 2012-03-08 16:54:00 -03:00
Hugo Parente Lima
fcfc951330 Change version from beta6 to rc1 2012-03-08 16:53:59 -03:00
Marcelo Lira
5d9855256a Updated PySide CMake files to use the new generator argument "avoid-protected-hack".
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:53:59 -03:00
Marcelo Lira
75937124c2 Updated CMake files to use the "--drop-type-entries" generator option.
Instead of maintaining a complex CMake scheme to remove optional type
system entries, the generation will rely on the new generator capability
of dropping entries given via command line.

Reviewed by Bruno Araújo <bruno.araujo@openbossa.org>
Reviewed by Lauro Moura <lauro.neto@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:53:59 -03:00
Hugo Parente Lima
861e26665d Fix bug 681 - "Unicode support for trUtf8 method"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:53:59 -03:00
Hugo Parente Lima
8550948818 Fix bug 674 - "QGraphicsScene::clear() is missing" 2012-03-08 16:53:59 -03:00
Jerome Leclanche
c8ecf9fea6 Fix bug 687 - "[PATCH] QUiLoader code example crashes"
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:53:59 -03:00
Hugo Parente Lima
8f34f94da3 Fix bug 675 - "QGraphicsLinearLayout segfault"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:53:59 -03:00
Hugo Parente Lima
7c606aeda2 Refactor to simplify code just avoding some Cism. 2012-03-08 16:53:58 -03:00
Hugo Parente Lima
0f29c21f6e Make PySide signals work with meta types. 2012-03-08 16:53:58 -03:00
Hugo Parente Lima
f8482e4394 Add unit test for bug 684. 2012-03-08 16:53:58 -03:00
Lauro Neto
719b8f40e3 Raise error when slot argument is unknown.
Instead of accepting it silently and generating potential
segfault and undefined behavior, raise TypeError when
the type of an argument is unknown to PySide type system.

An example of such erratic behavior is in declarations like:

@Slot
def foo(self):

Slots without arguments must be explicitly declared this way:

@Slot()
def foo(self):

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Reviewer: Hugo Lima <hugo.lima@openbossa.org>
2012-03-08 16:53:58 -03:00
Hugo Parente Lima
03f4a7b083 Fix bug 679 - "QWebPage miss extension function"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:53:58 -03:00
Hugo Parente Lima
c9dd530e71 Fix phonon compilation and detection of VideoCaptureDevice class.
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:53:58 -03:00
Hugo Parente Lima
dae317b831 Fix bug 638 - "Documentation for phonon doesn't show class inheritance diagrams." 2012-03-08 16:53:58 -03:00
Hugo Parente Lima
f5a70fbbc4 Removed duplicated entry of QWebPage::ErrorDomain on typesystem. 2012-03-08 16:53:58 -03:00
Marcelo Lira
732183f1df Increments reference of None object on custom code for QState.addTransition method.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:53:57 -03:00
Renato Araujo Oliveira Filho
8d1d395737 Created unit test for bug #671.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:53:57 -03:00
Renato Araujo Oliveira Filho
4b0ed850fc Appended the metaclass data flags value on head.
Fix bug #671.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:53:57 -03:00
Marcelo Lira
e96cb16b14 Added QCursor test. It is related to bug #630.
Bug #630 - Fails to resolve overload for QCursor(QBitmap, QBitmap, int, int)
http://bugs.openbossa.org/show_bug.cgi?id=630

Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:53:56 -03:00
Renato Araujo Oliveira Filho
00f696e3c7 Fixed function 'QToolBar.addAction' to support callback in the
arguments.

Create unit test for bug #635.

Fixes bug #635.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:53:56 -03:00
Hugo Parente Lima
efad1c8b8c Fix bug 668 - "QFileSystemModel setRootPath stops application from quitting."
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:53:56 -03:00
Hugo Parente Lima
079e6beb2d Replaced all entries of reference-count with action=add to action=set. 2012-03-08 16:53:56 -03:00
Hugo Parente Lima
cc695f88bd Fix bug 663 - "Crash on exit when passing QNetworkAccessManager around" 2012-03-08 16:53:56 -03:00
Hugo Parente Lima
287fd9d649 Remove invalid function removals. 2012-03-08 16:53:56 -03:00
Hugo Parente Lima
3c31d96eed Fix bug 667 - "Crash on exit" 2012-03-08 16:53:56 -03:00
Hugo Parente Lima
280d68ca34 Fix QGLBuffer::map code injection and test. 2012-03-08 16:53:56 -03:00
Renato Araujo Oliveira Filho
8cb71269c6 Updated phonon typesystem to use the new pyside cmake macro syntax. 2012-03-08 16:53:55 -03:00
Renato Araujo Oliveira Filho
8c29de6075 Updated http server used on tests to keep trying until get a free address. 2012-03-08 16:53:55 -03:00
Renato Araujo Oliveira Filho
f81fc0390a Created unit test for bug #662.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:53:55 -03:00
Renato Araujo Oliveira Filho
bd26ec914f Implemented support for iterator on QTextBlock.
Fixes bug #662.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:53:55 -03:00
Renato Araujo Oliveira Filho
a1d4eb3d86 Fix append object description on typesystem only when this was found.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:53:55 -03:00
Renato Araujo Oliveira Filho
811e37c378 Separated class typesystem from the main typesystem.
Remove class specification,  detected during the compilation from the
main typesystem to avoid errors during the generation.

Fixes bug #661

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:53:55 -03:00
Renato Araujo Oliveira Filho
9386dd0452 Updated translation test to use previous generated qm files.
Upload qm files used on test to git.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:53:55 -03:00
Renato Araujo Oliveira Filho
5d4af8f96b Updated http server used on unit test.
Allow the server to reuse the address to avoid errors.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:53:55 -03:00
Renato Araujo Oliveira Filho
1155542ecc Created unit test for signals.
Test for types inside of namespace
Test for types defined by typedef.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:53:55 -03:00
Renato Araujo Oliveira Filho
4ebad6745f Fixed problems to emit signals with objects types.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:53:54 -03:00
Hugo Parente Lima
44998fd471 Fix 666 - "QByteArray does not support slices"
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:53:54 -03:00
Hugo Parente Lima
59c882566b Fix bug 660 - "QMimeData type deleted prematurely when overriding mime-type in QStandardItemModel drag and drop" 2012-03-08 16:53:54 -03:00
Hugo Parente Lima
34529760f4 Fix bug 643 - "QTabWidget.insertTab not taking ownership" 2012-03-08 16:53:54 -03:00
Marcelo Lira
93bd129cfb The global header for PySide is now installed with the libpyside headers.
This is good for PySide derived bindings (like the ones for QtMobility),
so they don't need to copy the PySide global headers to their source
tree and end up with an outdated file.

Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:53:53 -03:00
Marcelo Lira
8a628bf832 Removed unnecessary line from test binding CMake file. 2012-03-08 16:53:53 -03:00
Hugo Parente Lima
f8e6845c81 Fix qresource_test openning the file in binary mode, so it doesn't fail on windows. 2012-03-08 16:53:53 -03:00
Hugo Parente Lima
143e81278c Export QTranslator::translate and QTranslator::load.
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:53:53 -03:00
Hugo Parente Lima
c662028d3d Export method QCryptographicHash::addData. 2012-03-08 16:53:53 -03:00
Hugo Parente Lima
0fd98c95ca Remove some ancient method removals from QtCore typesystem.
- QDir(QString,QString,QFlags<QDir::SortFlag>,QFlags<QDir::Filter>)
- QBitArray::fill(bool, int)
2012-03-08 16:53:53 -03:00
Hugo Parente Lima
4475f30d7a Use PyString_GET_SIZE instead of PyString_Size on some inject codes. 2012-03-08 16:53:53 -03:00
Hugo Parente Lima
8994866ef2 Export QSettings::iniCodec and QXmlStreamWriter::codec methods. 2012-03-08 16:53:53 -03:00
Hugo Parente Lima
ae2019a4da QPersistentModelIndex now have the same implementation of internalPointer of QModelIndex. 2012-03-08 16:53:52 -03:00
Hugo Parente Lima
13a6cba842 Fixed/implemented various QResources methods.
- data() is now exported and returns a Python read-only buffer object.
- (un)registerResourceData now accept buffers as arguments, and respects zeroes in the middle of data.
- Improved unit test.
2012-03-08 16:53:52 -03:00
Hugo Parente Lima
702cd168e1 Fix comparisson of QByteArray with Python strings that have zeroes inside. 2012-03-08 16:53:52 -03:00
Hugo Parente Lima
4f4abdb2be Added comments to some function removals. 2012-03-08 16:53:52 -03:00
Hugo Parente Lima
a54d0181bd Fix bug 653 - "Crash after calling QWizardPage.wizard()"
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:53:52 -03:00
Hugo Parente Lima
fac9507d3e Fix bug 652 - "Segfault when using QTextBlock::setUserData due to missing ownership transfer" 2012-03-08 16:53:52 -03:00
Hugo Parente Lima
a7e1ccf127 Removed the removal of some QApplication functions.
These functions were removed due to ancient bugs in shiboken
generator, all them now fixed.

Functions:

font(const char*)
setFont(QFont,const char*)
palette(const char*)
2012-03-08 16:53:52 -03:00
Renato Araujo Oliveira Filho
845679929a Bump version to beta6. 2012-03-08 16:53:51 -03:00
Renato Araujo Oliveira Filho
a544dac959 Fixed Cmake files used to find the library after the installation.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:53:51 -03:00
Hugo Parente Lima
6b6527e74b Fix bug 650 - "Missing bindings for QNetworkProxyFactory"
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:53:51 -03:00
Hugo Parente Lima
82e9d14601 Fix bug 651 - "Calling disconnect() with no arguments causes segfault" 2012-03-08 16:53:51 -03:00
Renato Araujo Oliveira Filho
4551b2421c Updated QAbstractItemModel.createIndex documentation to warning about
ptr argument life time.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:53:51 -03:00
Hugo Parente Lima
fd8b33616f Fix bug 656 - "cannot inherit from QCoreApplication"
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:53:51 -03:00
Marcelo Lira
c89f03fe39 Updated GeneratorRunner calls on CMake files to use "--generator-set" instead of "--generatorSet".
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:53:51 -03:00
Hugo Parente Lima
c4ba328270 Don't crash if a typeId was not found when emiting a signal.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:53:51 -03:00
Hugo Parente Lima
10b81cd436 Added test for bug 613. 2012-03-08 16:53:51 -03:00
Hugo Parente Lima
279fb02429 Fix bug 565 - "QImage missing *data constructors"
Fix bug 566 - "'PySide.QtGui.QImage' object has no attribute 'scanLine'"

The constructors now accepts any PyObject which implements the buffer protocol, as the
C++ and PyQt4 version the buffer must be alive during the life time of QImage because QImage
*does not* copy the image data.

scanLine() and bits() now return buffer objects pointing to the memory inside QImage.
2012-03-08 16:53:50 -03:00
Renato Araujo Oliveira Filho
9c7d055f3d Implement __repr__ function for class with Float attributes. 2012-03-08 16:53:50 -03:00
Renato Araujo Oliveira Filho
f3bcaf31a8 Created unit test for bug #617.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:53:50 -03:00
Renato Araujo Oliveira Filho
6c3258cc03 Created __repr__ function unit test.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:53:50 -03:00
Renato Araujo Oliveira Filho
16c3baa454 Implemented fuction __repr__ for base types.
Fixes bug #593

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:53:46 -03:00
Renato Araujo Oliveira Filho
494828092b Fixed QFileDialog function calls with options in the last argument.
Fixes bug #590

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:51:49 -03:00
Hugo Parente Lima
dc661c9e65 Add test for bug#640.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:51:49 -03:00
Renato Araujo Oliveira Filho
9c7755b080 Implement support to others color spec on deepcopy function.
Created unit test QColor reduce function.

Fixes bug #612.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:51:49 -03:00
Hugo Parente Lima
a51b488ca0 Fix bug#633 - "bool of null QDate (possibly other empty QString/null QObj types?) returns True for empty instance; probably should be False" 2012-03-08 16:51:49 -03:00
Renato Araujo Oliveira Filho
b66595efa5 Fixed QLineEdit.getTextMargins return value.
Fixes bug #632

Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:51:49 -03:00
Hugo Parente Lima
f2cce0a1b5 Fix bug#636 - "Unable to navigate back to the main site from the generated documentation" 2012-03-08 16:51:49 -03:00
Renato Araujo Oliveira Filho
1af49e5713 Bump version to beta5. 2012-03-08 16:51:48 -03:00
Renato Araujo Oliveira Filho
6f92863aa0 Updated generatorrunner version dependency. 2012-03-08 16:51:48 -03:00
Renato Araujo Oliveira Filho
6a87db2791 Replace use of QMetaObject::activate to QObject::qt_metacall.
This is necessary to support signals with default values.

Fix bug #624

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:51:47 -03:00
Marcelo Lira
da8c292b69 Added test cases for signal emission.
Signals are emitted from C++ and Python.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:51:47 -03:00
Hugo Parente Lima
4a2bfc9239 Fix bug#552 - "Segmentation fault when using QUiLoader and QTabWidget"
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:51:47 -03:00
Hugo Parente Lima
e9d1dc38e2 Use the same Python used by Shiboken instead of find a new one. 2012-03-08 16:51:47 -03:00
Hugo Parente Lima
810207dfe4 Don't reject QGLWidget::setMouseTracking function. 2012-03-08 16:51:47 -03:00
Hugo Parente Lima
a3cf9b0a3c Fix bug#623 - "QGLWidget.bindTexture(QPixmap, GLenum, GLenum) is missing" 2012-03-08 16:51:47 -03:00
Marcelo Lira
3e0b9e52de Added test for module reloading.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:51:47 -03:00
Renato Araujo Oliveira Filho
4f72f1d368 Fixed Widget and Layout inject code to avoid problems in armel arch. 2012-03-08 16:51:47 -03:00
Renato Araujo Oliveira Filho
f0181b7545 Created unit test for bug #575.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:51:47 -03:00
Marcelo Lira
70d4b7c6ad Updates documentation of QUiLoader.registerCustomWidget method.
The new documentation highlights the danger of duck punching virtual
methods of widget objects produced by QUiLoader.
Also named the argument of QUiLoader.registerCustomWidget as
customWidgetType.

Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:51:46 -03:00
Marcelo Lira
6d379db301 Named the single argument of all "QWidget.*Event(arg)" methods as "event".
Just to make the generated documentation more readable.
2012-03-08 16:51:46 -03:00
Marcelo Lira
7e4a01a4b9 Fixed style on QUiLoader code snippet. 2012-03-08 16:51:46 -03:00
Hugo Parente Lima
b57192c596 Fix bug#584 - "python pickle module can't treat QByteArray object of PySide"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:51:46 -03:00
Renato Araujo Oliveira Filho
d9940e55a4 Fix typo on Cmake files.
Reviewer: Bruno Araujo <bruno.araujo@openbossa.org>
2012-03-08 16:51:46 -03:00
Hugo Parente Lima
776b41613d Removed useless rejections
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:51:46 -03:00
Hugo Parente Lima
4587eec6cb Remove protected fields of event classes.
Event classes have a lot of non-documented protected fields, those fields
are removed from PySide because they are Qt implementation details,
besides the fact they are accessible by ordinary event methods.
2012-03-08 16:51:46 -03:00
Hugo Parente Lima
bcad6d0392 Fix documentation for QWidget.winId() 2012-03-08 16:51:46 -03:00
Hugo Parente Lima
a24e8ed281 Don't crash when a unknown type is given as a meta call argument. 2012-03-08 16:51:45 -03:00
Hugo Parente Lima
67f0db5a2b Add polymorphic-id-expression to QGraphicsObject and QDeclarativeItem. 2012-03-08 16:51:45 -03:00
Renato Araujo Oliveira Filho
f98566eebd Fixed path to include file used on cmake files.
Reviewer: Bruno Araujo <bruno.araujo@openbossa.org>
2012-03-08 16:51:45 -03:00
Renato Araujo Oliveira Filho
3ac4080bfe Create a new parent test.
Check if the parent does not increase the reference if you set the
parent twice.
2012-03-08 16:51:45 -03:00
Renato Araujo Oliveira Filho
7e667036d5 Use python base name as library prefix.
Use the same CMAKE_BUILD_TYPE as shiboken if none was specified.
Append SHIBOKEN_PYTHON_BASENAME in the library suffix.

Fix bug #509.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:51:45 -03:00
Marcelo Lira
99cbdef40c Added test for QPainter.setPen() method.
Calls it with enum, to call the setPen(Qt.PenStyle) signature, and with
an integer, to call the setPen(QColor) signature (QColor is implicitly
built from an unsigned int in C++).

For more details see Bug #511:
http://bugs.openbossa.org/show_bug.cgi?id=511

Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:51:45 -03:00
Marcelo Lira
64a35df0c1 Added condition for a phonon test that fails on Win32 with Qt 4.7.1.
This is due to a bug on Phonon::createPath that happens with the
specific combination of Win32 platform and Qt 4.7.1. The bug is reported
as fixed for Qt 4.7.2, but it wasn't released yet.

For more details on the bug:
http://bugreports.qt.nokia.com/browse/QTBUG-13062

Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:51:45 -03:00
Renato Araujo Oliveira Filho
1caaffba59 Created unit test for bug 589.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:51:45 -03:00
Renato Araujo Oliveira Filho
f4f48519ec Fix Qvariant to Cpp conversion.
Fixes bug #589

Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:51:45 -03:00
Marcelo Lira
4c79d1e8cd Fixes the fix in the commit a1cf8f03.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:51:44 -03:00
Hugo Parente Lima
36b7f922b2 Fix bug#560 - "Lack of QtCore.Signal documentation"
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:51:44 -03:00
Marcelo Lira
ece91be2e6 Fixes connecting signal to decorated slot.
Decorated methods on classes derived from QObject are not called when
connected to Qt signals because they get a name different from the
decorated method. To solve this decorated methods are registered as
global slots.

An unit test was added.

Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:51:44 -03:00
Marcelo Lira
42e52dec9c Refactoring to Phonon basic playing test.
Also replaced the ogg audio tone file for a wav one.

Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:51:44 -03:00
Marcelo Lira
44b71a0ff2 Fixed PATH variable for tests on win32 platform. 2012-03-08 16:51:44 -03:00
Renato Araujo Oliveira Filho
b6343a7674 Created unit test for bug #585.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:51:44 -03:00
Renato Araujo Oliveira Filho
5985c015b2 Fixed QTreeWidgetItem.parent function policy.
Fixes bug #585

Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:51:44 -03:00
Hugo Parente Lima
adb9268807 Only try to play the ogg file if the system has the capability to do it.
This fix a failing test on macosx.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:51:44 -03:00
Renato Araujo Oliveira Filho
e4eaf410af Fixed QtNetwork test to use '127.0.0.1' instead of 'localhost'
This is necessary to make all test to be able run on any buildbot machine.
Fix Http server shutdown sequence to avoid deadlocks.

Fixes bug #587

Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:51:44 -03:00
Hugo Parente Lima
cfeea7ec04 Fix bug#557 - "Segmentation fault in QDeclarativeComponent.loadUrl()"
The signature QDeclarativeComponent(QObject*) should not exist, it's not
documented and just creates a useless QDeclarativeComponent when used,
useless in the sense that it will segfault when used.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:51:43 -03:00
Renato Araujo Oliveira Filho
bcb6a2eb75 Fixed QWidget.setParent signature on typesystem. 2012-03-08 16:51:43 -03:00
Hugo Parente Lima
aa305dc5ae Lock the gil on some hand written code to avoid crashes.
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:48:07 -03:00
Renato Araujo Oliveira Filho
f7fd9277f4 Fixed function QDataStream.readRawData return value.
The function readRawData now return None in case of error, otherwise a
string with the read data.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:48:07 -03:00
Hugo Parente Lima
4351b2e513 New format for __version_info__.
The new format follow the same rules used by sys.version_info().

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:48:07 -03:00
Renato Araujo Oliveira Filho
cc7d8dd138 Created support to function qAddPostRoutine.
Created unit test for bug #515
Fixes bug #515

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:48:07 -03:00
Marcelo Lira
1f1f82d582 Added test case for Bug #572.
Bug #572: Giving unicode value as 'body' argument to WebView's load
method crashes python.

Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:48:07 -03:00
Renato Araujo Oliveira Filho
7a3e7b6f86 Fix QTreeWidgetItem.parent function.
Create unit test for new use case.
Fixes bug #547

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:48:07 -03:00
Hugo Parente Lima
1ed2877743 Fix bug#577 - "Reference to QString in docs" 2012-03-08 16:48:07 -03:00
Renato Araujo Oliveira Filho
1af0e9f4fe Fixed QWidget.parent function.
Create unit test for bug 576.
Fixes bug #576.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:48:07 -03:00
Lauro Neto
ba00068ce1 Avoid conflict in test case names
Reviewer: Hugo Lima <hugo.lima@openbossa.org>
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:48:06 -03:00
Renato Araujo Oliveira Filho
814b80f423 Fixed test to work in all platform. 2012-03-08 16:48:06 -03:00
Hugo Parente Lima
9e6762eeb0 Fix bug#514 - "Static method QByteArray.fromRawData is missing from QtCore"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:48:06 -03:00
Hugo Parente Lima
394cdb357d Fix bug 546 - "Python crash on exit"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:48:06 -03:00
Hugo Parente Lima
9b02c46c03 Fix bug#493 - "__eq__ and friends not implemented for QKeyEvent == QKeySequence"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:48:06 -03:00
Lauro Neto
ecb060f85c Improve QtScriptEngineDebugger test behavior
The extra ContinueAction after evaluate() was crashing
on MacOS X.

Reviewer: Hugo Lima <hugo.lima@openbossa.org>
Reviewer: Renato Araujo <renator.filho@openbossa.org>
2012-03-08 16:48:06 -03:00
Renato Araujo Oliveira Filho
1d05357e26 Changed api2 test to work on MacOS during a ssh session. 2012-03-08 16:48:05 -03:00
Hugo Parente Lima
d8f3b9629a Fix bug#569 - "QTableWidgetItem is missing binding of __lt__ to operator<"
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:48:05 -03:00
Hugo Parente Lima
92b893c532 Fix bug#563 - "Unhandled signal emitting with invalid signature (which leads to application crash)" 2012-03-08 16:48:05 -03:00
Hugo Parente Lima
6d18229268 Changes the arg name from p to parent to make parent heuristic work. 2012-03-08 16:48:05 -03:00
Renato Araujo Oliveira Filho
40f5c3ce0e Fixed MetaObject creation based on typename.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
2012-03-08 16:48:05 -03:00
Renato Araujo Oliveira Filho
6849ba0864 Fix test to avoid problems on slow computers.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
2012-03-08 16:48:05 -03:00
Renato Araujo Oliveira Filho
c406547057 Appended ${QtGui_BINARY_DIR} on typesystem_path for QtMaemo5 module. 2012-03-08 16:48:05 -03:00
Renato Araujo Oliveira Filho
d96649862f Appended QtGui library dependency on pysidetest library. 2012-03-08 16:48:05 -03:00
Renato Araujo Oliveira Filho
0029d0ef7e Test for QTDESIGNER before add QTUITOOLS.
This test is necessary because the module QTUITOOLS uses some classes
from QTDESIGNER.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Bruno Araujo <bruno.araujo@openbossa.org>
2012-03-08 16:48:04 -03:00
Renato Araujo Oliveira Filho
9787519352 Fix QTreeWidget parent rules.
QTreeWidget.clear() - remove all child ref from the current widget
QTreeWidgetItem.parent() - use default policy for returned value

Fix bug #547

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:48:04 -03:00
Renato Araujo Oliveira Filho
949f6b5255 Removed some float comparisons from QColor test to avoid armel problems.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
2012-03-08 16:48:04 -03:00
Hugo Parente Lima
85715f3fc3 Fix bug#549 - "QGraphicsWidget::getContentsMargins() and QGraphicsWidget::getWindowFrameMargins() not available"
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:48:04 -03:00
Renato Araujo Oliveira Filho
09840da111 Used more common signature on function test to QList objects.
Replaced "const QList<QObject*>" signature to "const QList<QObject*>&",
more used on Qt code.
2012-03-08 16:48:04 -03:00
Renato Araujo Oliveira Filho
3468d8f78e Fixed variable scope.
This keep the QByteArray live during the use of your content.

Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:48:04 -03:00
Lauro Neto
af6514a1e8 Fix testbinding dependency
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Reviewer: Renato Araujo <renato.araujo@openbossa.org>
2012-03-08 16:48:04 -03:00
Renato Araujo Oliveira Filho
2734efb6b7 Moved list_signal_test to pysidetest library.
This isolate the test case, and avoid other problems with X during the
buildbot compilation.

Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:48:04 -03:00
Renato Araujo Oliveira Filho
d3b630e168 Fix the QtMultimedia/audio_test.py to accept computers with only null
device.
2012-03-08 16:48:02 -03:00
Renato Araujo Oliveira Filho
cebdd1f4dc Avoid QMatrix test while gcc is broken. 2012-03-08 16:48:01 -03:00
Renato Araujo Oliveira Filho
45edcc54a6 Used argument '-a' during the call of xvfb command.
This argument allow the xvfb to find a free server number during the
execution.
2012-03-08 16:48:01 -03:00
Renato Araujo Oliveira Filho
ed10989ff2 Fixed QtUiTools plugin.
Removed use of static QString to store the class name.

Fix bug #533.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:48:01 -03:00
Renato Araujo Oliveira Filho
0d0cb0753e Added QSslCertificate to QtNetwork module.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:48:01 -03:00
Renato Araujo Oliveira Filho
3e66025bbb Fixed indentation mistakes.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:48:01 -03:00
Marcelo Lira
3f0291dfe4 Fixed global functions from QT_TR_NOOP and QT_TRANSLATE_NOOP family.
These function just return one of their arguments as result, and the
buggy implementation was forgetting to increment the reference count for
the returned object.

A new unit test was added.

Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:48:01 -03:00
Marcelo Lira
7771798cf2 Fixes bug #502.
The ownership of the editor returned by the Python override of
QAbstractItemDelegate.createEditor(...) is now transferred to C++.

A test was added to simulate the situation that triggers the bug,
instead of relying on an example with a view, model and editable cells.

See: http://bugs.openbossa.org/show_bug.cgi?id=502

Reviewed by Lauro Moura <lauro.neto@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:48:01 -03:00
Marcelo Lira
05d011ccfa Fixed type system for TestView from pysidetest directory. 2012-03-08 16:48:01 -03:00
Marcelo Lira
c350f418c7 QObject.sender should not steal the returned object ownership to Python. 2012-03-08 16:48:00 -03:00
Hugo Parente Lima
db35d78b27 Fix bug#544 - "QtCore.QRect missing binding for method getCoords"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:48:00 -03:00
Hugo Parente Lima
a9424b314e Fix bug#481 - "mimeData() missing from QListWidget, QTreeWidget, QTableWidget"
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:48:00 -03:00
Hugo Parente Lima
50db2f3b2e Fix bug#558 - "print attribute of a QWebFrame cannot be accessed normally" 2012-03-08 16:47:59 -03:00
Hugo Parente Lima
4204a86b97 Fix QtMultimedia test to not fail when no devices were found.
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:47:59 -03:00
Hugo Parente Lima
914398bbf3 Add GLuint as primitive type.
If we don't do that any function with GLuint will be rejected by
the generator on Windows.
2012-03-08 16:47:59 -03:00
Hugo Parente Lima
afd176ffaa Use .pyd extension for pysidetest module on Windows. 2012-03-08 16:47:59 -03:00
Hugo Parente Lima
5c7d93abed Fix QML tests on Windows. 2012-03-08 16:47:59 -03:00
Hugo Parente Lima
58d43d6de9 Fix compilation under MS Windows. 2012-03-08 16:47:59 -03:00
Marcelo Lira
803a270840 Added a call to QObject.metaObject() to check if a segfault is caused.
This completes the tests for bug #507[1].

Also removed an unnecessary commented line.

[1] http://bugs.openbossa.org/show_bug.cgi?id=507

Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:47:59 -03:00
Marcelo Lira
7f42b68c29 Fixed QML type registering test.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:47:59 -03:00
Marcelo Lira
937b2cfc6d Updated model/view test to follow changes in Shiboken/9459b9da commit.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:47:59 -03:00
Hugo Parente Lima
d4318366f1 Fix bug#491 - "pyside doesn't respect BUILD_TESTS"
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:47:58 -03:00
Marcelo Lira
42d887ff86 Fixed ownership of the value returned by QAbstractItemModel::data(...).
The value returned by Python to the virtual method
QAbstractItemModel::data(...) called from C++ has its ownership
transferred to C++.

Reviewed by Lauro Moura <lauro.neto@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:47:58 -03:00
Marcelo Lira
ce42ea6eeb Updated the PySide test related to Python model returning data to C++. 2012-03-08 16:47:58 -03:00
Renato Araujo Oliveira Filho
22b7485419 Created function used in PyObject getAttro.
Moved the code generated to a function in libpyside.
Create unit test for bug #525.

Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:47:58 -03:00
Renato Araujo Oliveira Filho
0229e5413b Created unittest for bug #505.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:47:58 -03:00
Hugo Parente Lima
26d2bd6a7c Fix bug#517 - "Documentation for QtDeclarative is not linked in contents.html, modules.html"
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:47:58 -03:00
Hugo Parente Lima
8974ff4abd Fix bug#508 - "qmltopy1 crashes when setContextProperty is called twice without keeping a reference"
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:47:58 -03:00
Hugo Parente Lima
39d61bdc05 Fix bug#518 - "The file 'genindex.html' is not found (linked from contents.html)"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:47:58 -03:00
Hugo Parente Lima
bdaed6a95a Fix bug#512 - "QGridLayout::getItemPosition() is not available"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2012-03-08 16:47:57 -03:00
Marcelo Lira
86b7d6e25c Added test for Python written models returning new objects without keeping reference to them.
Reviewed by Lauro Moura <lauro.neto@openbossa.org>
eviewed by Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:47:57 -03:00
Marcelo Lira
ee8d6262dc Fixed new style signal connection tests for the proper semantics.
One example to clarify: for the "destroyed(QObject* = 0)" signal,
"obj.destroyed.connect(...)" connects to "destroyed()", and
"obj.destroyed[QObject].connect(...)" connects to "destroyed(QObject*)".

Reviewed by Lauro Moura <lauro.neto@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:47:57 -03:00
Hugo Parente Lima
02e4fa2b96 Added unit test for bug#500
Reviewer: Lauro Mora <lauro.neto@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:47:57 -03:00
Hugo Parente Lima
94d8426d1c Add tests for qmlregisterType function and qml list properties.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:47:57 -03:00
Hugo Parente Lima
a6955f9fed Changed file permissions to 0644. 2012-03-08 16:47:57 -03:00
Hugo Parente Lima
3df02f9681 Add support for QML list properties.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:47:57 -03:00
Hugo Parente Lima
8252145146 Remove unused field "type" from PySideProperty private struct. 2012-03-08 16:47:57 -03:00
Hugo Parente Lima
621275639b Replace useless check by a assert.
QMetaObject must already be ready at this point.
2012-03-08 16:47:57 -03:00
Hugo Parente Lima
b4d1a3a4b6 Add support for extension into PySide properties.
This is used by PySide implementation of QDeclarativeListProperty.
2012-03-08 16:47:56 -03:00
Hugo Parente Lima
e76fffc617 Fix copyright year. 2012-03-08 16:47:56 -03:00
Marcelo Lira
f5f2b23a70 Fixes QImage constructor signature that used string buffer as image data source.
The fixes uses the patch provided by Pieter Palmers on the bug #489
description[1].

A very simple test, to check the signature existence, was added.

[1] http://bugs.openbossa.org/show_bug.cgi?id=489

Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:47:56 -03:00
Marcelo Lira
edf5b58da8 Added QRegExp.replace(QString, const char*) method.
The only way to search and replace using QRegExp is using the
QString::replace method. Since QString was removed, QRegExp now is
useful only to search stuff, but not replace. For this purpose the
QRegExp.replace method was added. The first argument is the string
that will be operated over, the second argument contains the
replacement, and the return value is a new modified Python string.

Unit tests and documentation for QRegExp.replace were added as well.

Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:47:56 -03:00
Hugo Parente Lima
1c6fad9841 Avoid removal of qmlregistertype.cpp by the build system.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:47:56 -03:00
Hugo Parente Lima
f02876e6c9 Initial implementation of qmlRegisterType.
It's fully functional, but need some adjustaments in the build system that will be done in the next few days.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:47:56 -03:00
Hugo Parente Lima
8fb6037362 Set the object meta object at the declaration time, not instanciation time. 2012-03-08 16:47:56 -03:00
Hugo Parente Lima
a29f511f6d Moved pyside slot attr name do pysideslot_p.h. 2012-03-08 16:47:56 -03:00
Hugo Parente Lima
d36b2398b8 PySidePropertyPrivate struct moved to the private header. 2012-03-08 16:47:56 -03:00
Hugo Parente Lima
079e105618 Remove unused ancient proxyslot.cpp file. 2012-03-08 16:47:55 -03:00
Marcelo Lira
885386fdba Updates to more code snippets on documentation concerning QtCore module.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:47:55 -03:00
Marcelo Lira
0220d7d176 Updated a lot of code snippets on documentation concerning QtCore module.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
2012-03-08 16:47:55 -03:00
Hugo Parente Lima
9edc8a3834 Fixed qt_metacall, now everything works as it should.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2012-03-08 16:47:55 -03:00
Hugo Parente Lima
ec7b01c24f Fixed dynamic meta object to avoid empty meta method.
Empty meta methods cause a assert failure on QtDeclarative module.
Also removed the scoped pointer to avoid heap allocation when it's not
needed, as QByteArray is already implicity shared.
2012-03-08 16:47:55 -03:00
Luciano Wolf
52c2a2cd0d Add needed cast to compile using python versions <2.6
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:47:55 -03:00
Hugo Parente Lima
1079b1066c Fix doc generation after the refactor for v1.0.
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2012-03-08 16:47:55 -03:00
Hugo Parente Lima
dadd07ccd7 Fix compilation on Windows.
Reviewer: Renato Araújo <renato.filho@openbossa.org>
2010-11-25 16:02:10 -02:00
Hugo Parente Lima
91030433ce Fix bug#496 - "No binary read/write methods in QDataStream"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2010-11-24 15:37:48 -02:00
Hugo Parente Lima
47aa718978 Fix crash at exit when there's a chain of referenced objects.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-11-24 14:35:33 -02:00
Hugo Parente Lima
f31d910755 Merge branch 'apichanges'
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>

Conflicts:
	libpyside/pyside.cpp
2010-11-23 15:04:27 -02:00
Renato Araujo Oliveira Filho
e635023cdb Fixed layout ownership transfer.
Fixes bug #480

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-11-23 14:09:24 -03:00
Renato Araujo Oliveira Filho
abf841fbd3 Created unit test for bug #480.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-11-23 14:08:39 -03:00
Hugo Parente Lima
a8ae0680f2 Adapt to API changes in libshiboken. 2010-11-23 14:37:16 -02:00
Renato Araujo Oliveira Filho
ce1cadcacf Fixed GlobalReceiver destructor.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-11-23 11:53:15 -03:00
Renato Araujo Oliveira Filho
276f260f65 Fixed unit test related to bug #446. 2010-11-22 16:35:23 -03:00
Renato Araujo Oliveira Filho
934f291fd9 Separates QObjects with python ownership before start destructing then.
This avoid list changes during the destruction.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-11-22 10:43:38 -03:00
Renato Araujo Oliveira Filho
f7cb52d382 Added reference to object which was exported to QML context.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-11-22 10:43:34 -03:00
Renato Araujo Oliveira Filho
e12197e282 Fix generated property flags on metaobject.
Fixes bug #478

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-11-22 10:43:01 -03:00
Renato Araujo Oliveira Filho
3bc0d023c8 Fix setContexMenu function ownership rule.
Fixes bug #441.
2010-11-20 12:56:18 -03:00
Renato Araujo Oliveira Filho
783c146766 Created unit test for bug #446.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
2010-11-19 20:33:46 -03:00
Renato Araujo Oliveira Filho
ff7f570599 Fixed codesnippte about return of QAbstractSocket.read function.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
2010-11-19 20:33:31 -03:00
Renato Araujo Oliveira Filho
c21497ec1a Create unit test for bug #467. 2010-11-19 19:31:36 -03:00
Renato Araujo Oliveira Filho
6cefd33cd0 Fixed use of QtDeclarative include header to work with MacOS.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2010-11-19 19:01:41 -03:00
Renato Araujo Oliveira Filho
ca0e17a45e Fix typo on function call template type.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-11-19 18:52:51 -03:00
Renato Araujo Oliveira Filho
c9aef92cab Update to new Shiboken API (Renamed SbkObjectType)
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-11-19 16:05:00 -03:00
Renato Araujo Oliveira Filho
5e0550446c Updated to new shiboken API.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-11-19 15:15:12 -03:00
Renato Araujo Oliveira Filho
0989462639 Fixed recursive call on duck punching test.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-11-19 15:14:52 -03:00
Renato Araujo Oliveira Filho
43e499a4fa Fixed unit test to avoid exit with thread running.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-11-19 15:14:48 -03:00
Renato Araujo Oliveira Filho
dd8b0fcfe4 Created unit test for bug 462.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-11-19 15:14:15 -03:00
Hugo Parente Lima
71d279c040 Uses QByteArray instead of QString to avoid data copy.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2010-11-18 18:48:35 -02:00
Hugo Parente Lima
090e4a6525 Remove function deleteDynamicQMetaObject, use Shiboken::callCppDestructor<DynamicQMetaObject> instead. 2010-11-18 17:38:43 -02:00
Luciano Wolf
16913eedce Fix setLayout method that was causing segfault when itemAt wasn't implemented.
Reviewer: Hugo Parente <hugo.lima@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2010-11-17 19:10:02 -03:00
Mickaël
5a8efeb9df Fix bug#470 - "Object::connect: No such signal QTimer::"timeout()" when using QTimer::singleShot"
Reviewer: Hugo Parente <hugo.lima@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2010-11-16 15:08:56 -02:00
Hugo Parente Lima
bd3efd2a0f Fix bug#471 - "QtCore.QObject is missing 'thread' method"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2010-11-16 14:58:30 -02:00
renatofilho
d2e204f3df Removed invalid test. 2010-11-12 19:10:31 -03:00
Lauro Neto
968d376c5d Fix __init__.py and private.py install command.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Reviewer: Renato Filho <renato.filho@openbossa.org>
2010-11-12 19:05:19 -03:00
renatofilho
178f81aa70 Added PySide attributes to specify current version, and Qt version.
Fixes bug: #454

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-11-12 14:25:27 -03:00
Hugo Parente Lima
655219636b Fix bug#436 - "Using a custom QValidator generates a segfault"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-11-11 18:13:50 -02:00
Hugo Parente Lima
7013bd760e Fix bug#455 - "QByteArray.data() cuts data to first '\x00' char"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-11-11 14:16:46 -02:00
Marcelo Lira
2a4ee1675d Removed unnecessary find_package statements from pysidetest's CMakeLists.txt
Reviewed by Lauro Moura <lauro.neto@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
2010-11-11 10:39:58 -03:00
Hugo Parente Lima
41b6f14acb Merge branch 1.0 into master
Conflicts:
	PySide/QtCore/qvariant_conversions.h
2010-11-10 20:23:57 -02:00
Hugo Parente Lima
23c1b92073 Changes needed to compile PySide with libshiboken v1.0
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2010-11-10 20:17:24 -02:00
renatofilho
2ef14fcc12 Created unit test for qvariant conversion for object type.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-11-10 18:52:47 -03:00
renatofilho
a623a57d06 Fixed QVariant conversions for object types.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-11-10 18:52:10 -03:00
Hugo Parente Lima
92dcb7ae3a Changes needed to compile QtCore with libshiboken v1.0 2010-11-10 17:22:32 -02:00
renatofilho
66ff085861 Fixed QVariant conversions for user type. 2010-11-09 22:36:11 -03:00
renatofilho
c7f6b49e1e Convert QByteArray values to string during function call. 2010-11-09 16:07:47 -03:00
renatofilho
90bdf74053 Fixed QVariant conversion to C++
Now before convert from python object to C++, PySide check for a existent of
metaType for any derived class.

Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-11-09 15:59:08 -03:00
Marcelo Lira
729d68b703 Added test for Bug 452.
Bug 452 - QListWidgetItem() not casting NoneType to null correctly.

Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
2010-11-09 10:47:47 -03:00
renatofilho
257e0cdf18 Implemented PySideMetaFunction class used to call dynamic slots.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-11-05 19:01:07 -03:00
renatofilho
5371e403ff Created unit test for bug #451.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-11-05 19:01:07 -03:00
Hugo Parente Lima
a029d217c2 Fix bug#427 - "QSvgWidget, load from QtCore.QByteArray does not work"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2010-11-05 17:15:13 -02:00
renatofilho
50f915572d Fill the argument used on metacall for slot functions.
Fixes bug #456.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Neto <lauro.neto@openbossa.org>
2010-11-03 17:49:27 -03:00
renatofilho
60f46e4ea6 unit test for bug #456
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Neto <lauro.neto@openbossa.org>
2010-11-03 17:49:18 -03:00
renatofilho
17b0474ec7 Fixed return policy on QWebView.page()
Fixes bug #448.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Neto <lauro.neto@openbossa.org>
2010-11-03 17:49:01 -03:00
renatofilho
7a6c33e90b Created unit test for bug #448.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Neto <lauro.neto@openbossa.org>
2010-11-03 17:39:26 -03:00
renatofilho
1f2696e9e7 Fixed invalid call function. 2010-11-03 10:58:55 -03:00
renatofilho
e9b0f3e4ae Fixed slot registration during the meta object constructor.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Lauro Neto <lauro.neto@openbossa.org>
2010-11-03 10:29:40 -03:00
renatofilho
5b0606009d Fixed metacall function adn PyGil state handle.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Lauro Neto <lauro.neto@openbossa.org>
2010-11-03 10:29:35 -03:00
renatofilho
4cd7a240d8 Renamed qsignal, qslot, qproperty files to pyside*.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Lauro Neto <lauro.neto@openbossa.org>
2010-11-03 10:29:31 -03:00
renatofilho
c7945787c5 Created Singal/Slot/Property namespace for pure C structures.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Lauro Neto <lauro.neto@openbossa.org>
2010-11-03 10:28:15 -03:00
renatofilho
62fd909705 Created unit test for bug 428.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-10-29 16:24:18 -03:00
renatofilho
7a439f4d21 Exported function to instantiate a signal object.
Fixes bug #428

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-10-29 16:23:45 -03:00
Marcelo Lira
5944cc8d99 Added test for bug #428.
Reviewed by Lauro Moura <lauro.neto@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
2010-10-29 15:04:46 -03:00
Hugo Parente Lima
a7d09741c2 Update package requirements. 2010-10-29 10:54:34 -02:00
renatofilho
bd8239b1cd Stop signal/slot connection if is impossible to register that on object.
Created unit test for bug #442, #437.
Fixes bug #442.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-10-28 17:40:12 -03:00
Hugo Parente Lima
a1524b78b6 Fix bug#409 - "function -- PySide.QtUiTools.QUiLoader.load(...) -- takes bytes-string (but not unicode-string)"
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-10-28 17:33:33 -02:00
Hugo Parente Lima
22eab45ac9 Remove whitespaces. 2010-10-28 17:32:12 -02:00
Hugo Parente Lima
b9811b773a Fix bug#438 - "Can't find Python.h on OS X" 2010-10-28 17:03:33 -02:00
Hugo Parente Lima
42e83525db Fix bug#438 - "Can't find Python.h on OS X"
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2010-10-28 15:48:28 -02:00
Hugo Parente Lima
07b25e9686 Fix typesystem to use argument tags instead of hardcoded variable names. 2010-10-28 15:33:47 -02:00
Hugo Parente Lima
ec0d05f858 Fix crashes caused by the newer changes on shiboken generator. 2010-10-28 15:09:16 -02:00
Hugo Parente Lima
31a4f12f4c Fix unit test for bug 430 2010-10-28 15:08:04 -02:00
renatofilho
363ecb3461 Implemented Signal constructor base on QMethod list.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-10-28 14:57:40 -03:00
renatofilho
ff03bd56ff Updated SignalManager to new TypeResolver api.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-10-28 13:52:17 -03:00
renatofilho
631f296b18 Updated QtXml and QtXmlPatterns typesystem.
Move some value-types to object-type because these classes use QScopedPointer without assigner operator.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-10-28 13:51:55 -03:00
Hugo Parente Lima
7c6595c926 Uses python include path provided by Shiboken.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-10-26 15:30:51 -02:00
Marcelo Lira
38bef241a9 Removed AVOID_PROTECTED_HACK section from CMakeLists.txt.
It was moved to the Shiboken cmake configuration file.

Reviewed by Lauro Moura <lauro.neto@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
2010-10-26 14:19:23 -03:00
Marcelo Lira
b0e9403d48 Updated PySide cmake files to use Python library information from Shiboken.
Shiboken cmake files provides information about which Python library to
link against through cmake SHIBOKEN_PYTHON_LIBRARIES variable. It also
sets the Py_DEBUG flag if necessary.

Reviewed by Lauro Moura <lauro.neto@openbossa.org>
Reviewed by Renato Araujo <renato.filho@openbossa.org>
2010-10-26 13:49:07 -03:00
Marcelo Lira
720c76980d Modified cmake files to make use of debug information provided by Shiboken.
In summation, PySide is compiled for debug if the libshiboken is
compiled for debug.
2010-10-26 13:49:07 -03:00
Lauro Neto
b7f36fec39 Remove releaseWrapper as Signal tp_dealloc
It was being called when the Signal was garbage
collected, resulting in a segfault.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Reviewer: Renato Filho <renato.filho@openbossa.org>
2010-10-26 13:49:07 -03:00
renatofilho
a82deb1de2 Moved QML enum from QtCore to QtDeclarative typesystem.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-10-26 11:04:10 -03:00
renatofilho
78ab6c87ea Fixed plugin compilation problems on MacOS.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-10-26 11:02:13 -03:00
Hugo Parente Lima
77a1654ad5 Fix bugs 430, 426, 429, 394, 433.
These bugs are about QApplication instance being destroyed  before
some QObject.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2010-10-22 19:16:51 -02:00
renatofilho
800fb4613c Put signals register before property registration.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-10-22 18:03:25 -03:00
Marcelo Lira
76fa112490 Fixes to libpyside pkg-config and cmake files.
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
2010-10-22 16:19:24 -03:00
renatofilho
8e1e25a631 Fixed type translate on QProperty.
Fix bug #431

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-10-22 14:46:35 -03:00
Hugo Parente Lima
d094064ffe Fix bug#420 - "Memory leak in setText"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2010-10-21 18:48:15 -02:00
renatofilho
26750d345c Implemented support to notify argument on Properties.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-10-21 15:20:36 -03:00
renatofilho
4f1a11b61f Create private data structure to QProperty type.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-10-21 15:18:44 -03:00
Hugo Parente Lima
5100b62bdc Replace code injection by typesystem commands.
Related to bug#418 - "tag parent does not work in constructor modify"

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2010-10-20 12:13:09 -02:00
Hugo Parente Lima
97de7750ee Fix inject conversion rule used to fix bug408.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
2010-10-19 18:51:18 -02:00
Hugo Parente Lima
cc7a2018b5 Added d-pointer to PySideSignalInstanceData struct. 2010-10-19 18:51:18 -02:00
Marcelo Lira
e733c2b11b Added test for bug #395 - error calling QPainter.drawLines overloads.
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
2010-10-19 18:23:22 -03:00
Hugo Parente Lima
4a638ed634 Merge remote branch 'mainline/1.0'
Conflicts:
	CMakeLists.txt
2010-10-19 17:20:10 -02:00
renatofilho
ae942fd5da Included QSignalTransition constructor to support Signal objects.
Created unit test.

Fixes bug #416

Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-10-19 17:07:37 -03:00
renatofilho
bea4934c04 Included missing function on unit test for bug 332.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-10-19 17:07:37 -03:00
renatofilho
af870d2e32 Fixed PySide plugin for uiloader dependency.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-10-19 17:07:37 -03:00
Hugo Parente Lima
65022ffef6 Fix bug#408 - "QIODevice.readData() and .readLineData() have output parameters in their signatures"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-10-19 16:35:59 -02:00
renatofilho
e7f280f745 Removed QtDesigner dependency from QtUiTools module.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-10-15 18:20:10 -03:00
renatofilho
d75bd8367d Created function value to class QTreeWidgetItemIterator using the
operator *.

Fixes bug #400.

Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-10-15 18:19:46 -03:00
renatofilho
5c9afb798e WId conversions used on Windows OS.
Fixes bug #399.

Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-10-15 13:50:18 -03:00
Hugo Parente Lima
83f8447c95 Fix bug#172 - "editing a QListWidgetItem stored in a variable makes it impossible to delete"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-10-14 15:21:32 -03:00
renatofilho
ef35dc4cd4 Injected code for class Phonon.Notifier.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-10-14 12:06:43 -03:00
renatofilho
8f1bb6ffe0 Fixed typo on typesystem used in doc generator.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-10-14 12:06:23 -03:00
renatofilho
3ad81fcdaa Used original object in parent dictionary.
This allow use the object as arguments in any functions.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-10-13 17:02:13 -03:00
renatofilho
e71b215f0b Fixed reference leak on uiloader.
Fixes bug #392

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-10-13 17:01:05 -03:00
Marcelo Lira
c86a509af1 QNetworkReply.errorCode method is now properly called QNetworkReply.error
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
2010-10-13 16:14:31 -03:00
Marcelo Lira
0568190e8b Adjusted QTimer.singleShot custom code since all Signals are callable now.
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
2010-10-13 15:49:05 -03:00
renatofilho
4c8660413a Implemented support to deep copy on QtGui.
Fixed QMatrix*x* implementation.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Neto <lauro.neto@openbossa.org>
2010-10-13 13:42:57 -03:00
renatofilho
ce09bd623b Implemented support to deep copy on QtCore.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Neto <lauro.neto@openbossa.org>
2010-10-13 13:42:24 -03:00
Lauro Neto
eb9b436390 Adding extra check for QPoint as a dict key
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Filho <renato.filho@openbossa.org>
2010-10-13 13:42:02 -03:00
Lauro Neto
a3b0314c58 Adding deepcopy test for QtCore classes.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Filho <renato.filho@openbossa.org>
2010-10-13 13:41:21 -03:00
Lauro Neto
51dd97bebc Adding several __reduce__ methods in QtCore
Add QColor.__reduce__
Adding QByteArray __reduce__

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Filho <renato.filho@openbossa.org>
2010-10-13 13:41:11 -03:00
Lauro Neto
24fcb55072 Add templates for __reduce__ functions.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Filho <renato.filho@openbossa.org>
2010-10-13 13:41:03 -03:00
Lauro Neto
646850ee7b Adding QColor copy test
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Filho <renato.filho@openbossa.org>
2010-10-13 13:39:52 -03:00
renatofilho
9a3db9de9c Updated version to 0.4.2. 2010-10-13 10:00:50 -03:00
Marcelo Lira
7fab5c03a9 Signal objects redirect calls for homonymous methods. 2010-10-11 17:47:03 -03:00
Marcelo Lira
4b3b56acd7 Added a PySide derived test library.
The test library is intended to provide specific test cases in a way
that problems could be isolated easier than using the ones provided by
the Qt library. Cases commons to all Python bindings must go into the
Shiboken test libraries, the one added here is intended to test Qt
specifics (e.g. signals).

A Python unit test was added for the case when a method and a signal
have the same name.
2010-10-11 17:47:03 -03:00
Luciano Wolf
87c6729430 Updating documentation to reflect adoption of wikipages.
Reviewer: Renato Araújo <renato.filho@openbossa.org>
2010-10-11 10:35:38 -03:00
renatofilho
ba54f0956e Fixed python include var used in plugins project.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-10-07 17:31:55 -03:00
renatofilho
e8e8da9efd Only compile QtUiLoader if QTDesigner was found.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-10-07 16:35:32 -03:00
Lauro Neto
897dd874a3 Replace type() comparison with isinstance.
type() comparison won't work due to weakproxy.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Reviewer: Hugo Lima <hugo.lima@openbossa.org>
Reviewer: Renato Filho <renato.filho@openbossa.org>
2010-10-07 16:10:33 -03:00
Lauro Neto
8419414b80 Reorder includes to avoid _POSIX_C_SOURCE warnings 2010-10-07 15:41:55 -03:00
Lauro Neto
349bdc2bc5 Add more test for operations with QFlags 2010-10-07 15:41:50 -03:00
Lauro Neto
04180e1f1d Add default name for QObject.findChild(type, name)
Plus test.
Should return a child of the given type.
2010-10-07 15:10:11 -03:00
renatofilho
3c7f55855b Moved cmake macros to a separeted file.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-10-07 14:47:30 -03:00
renatofilho
24cbdd8dfa Created uiloader plugin used to register new types before QUiLoader.
This is used to register a new python type which can be used in ui description files.

Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-10-07 12:18:31 -03:00
renatofilho
83533ddc5d Used proxy object in QUiLoader loaded widget to avoid cyclic reference.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-10-07 12:18:26 -03:00
renatofilho
e75b82fdf6 Created unittest for widgets defined in Python and used during QUiLoader.loader function.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-10-07 12:18:03 -03:00
Hugo Parente Lima
42516e6f86 Version bump. 2010-10-07 11:48:39 -03:00
Hugo Parente Lima
54618cdad9 Turn call_method function into an anonimous function.
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-10-07 11:44:48 -03:00
Hugo Parente Lima
740137e51a Rename some slot internal functions and structures and remove C linkage from init_slot function. 2010-10-07 11:44:07 -03:00
Hugo Parente Lima
a43eafaae4 Don't export symbols that don't need to be exported and rename many functions. 2010-10-07 11:44:07 -03:00
Hugo Parente Lima
1a10971865 Don't inline function deleteDynamicQMetaObject.
It's used by address, so inline it is useless.
2010-10-07 11:44:07 -03:00
Hugo Parente Lima
f2c59b613b Move structs tagged as "export C" outside C++ namespaces.
Also don't export structs that don't need to be exported.
2010-10-07 11:44:07 -03:00
Hugo Parente Lima
16ccce72d8 Don't export functions not used outsise libpyside and move them to an private header. 2010-10-07 11:44:07 -03:00
Hugo Parente Lima
9257cd1783 Changed name of qproperty functions 2010-10-07 11:44:07 -03:00
Hugo Parente Lima
15b0e9aa2b Add a d-pointer to DynamicMetaObject.
This break the ABI.
2010-10-07 11:44:07 -03:00
Hugo Parente Lima
6b8d262b40 Workaround to change the documentation about the return value of some functions.
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-10-07 11:42:48 -03:00
Hugo Parente Lima
673c0d2675 Added documentation to QPyTextObject class. 2010-10-06 11:40:42 -03:00
Hugo Parente Lima
ec252fae3f Update pyside.qdocconf.in removing useless entries. 2010-10-06 11:37:15 -03:00
Hugo Parente Lima
1508831725 Fixed some code snippets used in the PySide docs. 2010-10-05 16:44:50 -03:00
Hugo Parente Lima
829ffd3dfd Revert "Fixed doc of return values."
This reverts commit bebede17c0.
2010-10-05 16:42:40 -03:00
Hugo Parente Lima
bebede17c0 Fixed doc of return values.
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-10-05 14:19:59 -03:00
Hugo Parente Lima
79f837715f Removed whitespaces. 2010-10-05 14:19:59 -03:00
Hugo Parente Lima
ebe20bd63f Add unit test for bug#172 2010-10-05 14:19:59 -03:00
Hugo Parente Lima
5f21b20e72 Generate documentation for phonon. 2010-10-05 14:19:59 -03:00
Hugo Parente Lima
4caa8e8ab3 Sort typesystem according to their dependencies to avoid the inclusion of a typesystem with generate=no. 2010-10-05 14:19:59 -03:00
Hugo Parente Lima
254d365d5c Use QByteArray instead of QString in some internal QLayout functions.
As only latin1 chars are expected, we don't need waste memory with QString.
2010-10-05 14:19:59 -03:00
renatofilho
4adb686fc1 Extend QUiLoader test to test ui files with custom widgets. 2010-10-05 12:07:08 -03:00
renatofilho
7f4e85f650 Fixed QWidget setLayout rules.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-10-04 17:10:40 -03:00
renatofilho
73fea93181 Fixed QApplication cleanup.
Fixes bug #396.

Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-10-04 17:10:30 -03:00
renatofilho
2f8381e712 Implemented detection for VideoCaptureDevice on phonon module.
Fixes bug #355.

Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-10-04 12:00:38 -03:00
renatofilho
51cbe9d49e Added missing file on QtUitools tests.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-10-01 19:46:05 -03:00
renatofilho
940b90e80a Implement python conversion to QTime, QDate, QDateTime
Fixes bug #371.

Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-10-01 19:45:30 -03:00
Lauro Neto
288a53369f Removing deprecated and duplicated test
Reviewer: Hugo Lima <hugo.lima@openbossa.org>
2010-10-01 13:37:43 -03:00
renatofilho
7633675d11 Support any QObject in QUiLoader.load function.
Fix bug #392.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
         Marcelo Lira <marcelo.lira@openbossa.org>
2010-09-30 17:26:15 -03:00
renatofilho
846c9a151f Unit test for bug #392.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
         Marcelo Lira <marcelo.lira@openbossa.org>
2010-09-30 17:25:38 -03:00
renatofilho
44af047030 Fix QWidget::style / QWidget::setStyle ownership rules.
Fixes bug #389.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-09-30 14:43:02 -03:00
renatofilho
5222609f31 Unit test for bug 390.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-09-30 14:42:40 -03:00
renatofilho
866c76ff1f Use PyObject as default type on signal/slot signature.
Fixes bug #390.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
2010-09-29 19:28:27 -03:00
Hugo Parente Lima
fa87b811ad Fix bug#388 - "Fatal Python error: PyEval_SaveThread: NULL tstate"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-09-29 18:16:26 -03:00
Hugo Parente Lima
492ac5c64c Modify return type QLineF::intersect to look nice in the documentation.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2010-09-29 17:23:33 -03:00
Hugo Parente Lima
169d0f8147 Add test to check iterability of QPolygonF. 2010-09-29 15:44:13 -03:00
Hugo Parente Lima
eabb9d37a7 Fix bug#372 - "DiagramScene (GraphicsView) Example not working"
The correct title would be "QVariant doesn't correct store a QGraphicsScene object."
2010-09-29 15:44:13 -03:00
renatofilho
6ad03f2a79 Added support on script to compare symbols in both Qt bindings (PySide/PyQt4)
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-09-29 11:35:05 -03:00
renatofilho
10bb31b434 Added missing classes.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-09-29 11:34:46 -03:00
Marcelo Lira
4787f1eb0f Added hash functions for QLine, QPoint, QRect and QSize classes.
Tests where also added.

Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
2010-09-27 19:41:41 -03:00
Marcelo Lira
62234b4f86 Made the use of xvfb-run with QtGui tests optional.
To enable it run CMake with the USE_XVFB set to 1. Default is 0.
2010-09-27 19:07:52 -03:00
Hugo Parente Lima
199b8b3bae Fix bug#375 - "Just an empty table when using delegate."
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-09-27 16:21:25 -03:00
Hugo Parente Lima
51d9d503cd Add return value docs to functions returning tuples. 2010-09-27 15:17:44 -03:00
renatofilho
41bd89393e Inlcluded assert to avoid call objectcts metacall whithout Python relatives.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-09-24 16:44:45 -03:00
renatofilho
805824d4b6 Fixed model view ownership rules.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-09-24 16:44:45 -03:00
renatofilho
6320bfa4fa Fixed QCoreApplication and QApplication cleanup.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-09-24 16:44:45 -03:00
renatofilho
2bd1bab4bb Fixed unit test to avoid put a object child of QApplication.
This will cause assert on debug mode. Because qApp is dever destroyed.

Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-09-24 16:44:45 -03:00
renatofilho
88fd0c6e0b Fixed QVariant::Type convertions.
Fixed QItemEditorFactory ownership rules on typesystem.

Fixes bug #373.

Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-09-24 16:44:45 -03:00
Hugo Parente Lima
3e0af488ee Fix bug#168 - "API documentation suggestions" and other fixes.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-09-24 16:12:05 -03:00
Hugo Parente Lima
9eddff5940 Fix bug#385 - "Windows build error (MSVC Express 2008)" 2010-09-24 16:12:04 -03:00
Hugo Parente Lima
31db130bbd Fixed bug#310 2010-09-24 16:12:04 -03:00
Hugo Parente Lima
26a17dbdb1 Removed modindex.hmtm and added domainindex.html to work with newer sphinx versions. 2010-09-24 16:12:04 -03:00
Hugo Parente Lima
1b754f3098 Removed doc files not used. 2010-09-24 16:12:04 -03:00
Marcelo Lira
dedc78b3fe Fixed segmentation fault libpyside's signalUpdateSource function.
This function is called when an object is instantiated, and it will
go through the class attributes looking for signals and what else
is relevant. If the user has set a new attribute in the constructor
before the call to its parent QObject-like __init__ method, a
segmentation fault would ensue.

This commit fixes this condition and also adds an unit test.

Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
2010-09-24 16:03:58 -03:00
Matti Airas
16579322f1 added a tool to compare class hierarchies 2010-09-23 17:18:16 +03:00
Marcelo Lira
8048bd0c3b Modified the type system files to make use of nested type declarations.
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
2010-09-23 09:03:06 -03:00
renatofilho
bf4b2c7660 Port old boost code used in QtUiTools.
fixes bug #376.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-09-22 17:21:18 -03:00
renatofilho
3525b77d69 Created unit test for bug #376.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-09-22 17:21:02 -03:00
Marcelo Lira
fccfafe71f Added enum QML_HAS_ATTACHED_PROPERTIES to QtCore type system file.
Also suppressed warning about _ISalnum enum from ctypes.h

Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
2010-09-21 17:35:10 -03:00
renatofilho
c41f0dc385 The CMake configuration for PySide and Shiboken use the PYTHON_LIBRARIES
variable to link against Python. This is not the correct way to link against
Python on OS X. Instead of specifying a library or the framework, one simply
uses the flag "-undefined dynamic_lookup". The symbols will be resolved at
runtime when the extension module loads.

Fixes  bug #352: Thanks to   Robert Kern <robert.kern@gmail.com>

Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-09-21 15:54:02 -03:00
renatofilho
4229fa0082 Created unit test for bug #360.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-09-21 14:53:04 -03:00
renatofilho
2a225be9c7 Use CMAKE_<CONFIG>_POSTFIX on config files, used for cmake and pkgconfig.
Fixes bug #286.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-09-20 19:21:33 -03:00
renatofilho
f8a12b7577 Fixed ownership rules for QStandardItem functions.
Fixes bug #367.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-09-20 19:05:16 -03:00
renatofilho
ae44c27bb0 Created unittest for bug 367. 2010-09-20 18:32:41 -03:00
Marcelo Lira
aa47ffd895 Added missing classes to QtNetwork module.
The missing classes are: QAbstractNetworkCache, QNetworkDiskCache
e QNetworkCacheMetaData.

Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
2010-09-20 17:18:22 -03:00
renatofilho
0c0a5c128d Fixed QApplication static functions return policy.
Fixes bug #363.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-09-20 15:53:12 -03:00
renatofilho
80c2ebe626 Created unit test for bug 363.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-09-20 15:53:01 -03:00
renatofilho
b476759ed0 Updated test with new Property name.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-09-20 14:20:56 -03:00
renatofilho
67cb84debb Removed old comentary (not necessary anymore).
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-09-20 14:20:48 -03:00
renatofilho
5a86f845c2 Renamed QProperty object to Property.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-09-20 14:20:26 -03:00
renatofilho
6974551674 Created PySide cleanup functions used to register functions to be called before the python die.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-09-17 18:54:08 -03:00
Hugo Parente Lima
b8436f6b1e Fix doc generation and only generate docs for QtDeclarative module when it was found.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-09-17 10:36:18 -03:00
Marcelo Lira
75b44379d3 Added the method signature QTimer.singleShot(int, Signal).
This fixes bug #313.
The implementation can be improved when bug #362 gets fixed.

Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
2010-09-17 08:54:46 -03:00
Marcelo Lira
562bb8a822 Added test from Lauro's patch on bug #313.
http://bugs.openbossa.org/show_bug.cgi?id=313
2010-09-17 08:54:11 -03:00
Marcelo Lira
b47f82c498 Fixed the Python names for Signal and Slot objects.
In python the Signal object appears as "Signal" instead of
"PySide.QtCore.Signal", and the Slot object read as "QtCore.Slot"
instead of "PySide.QtCore.Slot".
2010-09-17 08:54:11 -03:00
renatofilho
40ccd1fe1f Fixed test.
The anonymous connections will be considered on QObject.receivers function.

Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-09-16 17:12:34 -03:00
renatofilho
1217b7df39 Update unit test for bug 312.
Now the test verify if is possible connect more then 500 signals, if the signals was disconnected.

Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-09-16 17:12:34 -03:00
renatofilho
551f6b9c72 Fixed connection cleanup function.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-09-16 17:12:34 -03:00
Marcelo Lira
c06110168c Fixes bug #348 adding the method QState.addTransition(Signal, QAbstractTransition*).
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
2010-09-16 14:22:02 -03:00
renatofilho
f92262928a Created unittest for bug 328.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-09-15 17:47:57 -03:00
renatofilho
09e087f0bd Included Notifier signals on genereted code.
Fixes bug: #328.

Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-09-15 17:47:36 -03:00
Hugo Parente Lima
87ea5d920c Fix bug#347 - "Setting properties in constructors gives incorrect results"
Added new function to libpyside: "fillQtProperties".

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2010-09-15 11:33:41 -03:00
Hugo Parente Lima
cd7dac40f7 Don't ignore exceptions caused by property getters and setters.
The exception is ignored only if the call was a meta call.
2010-09-15 10:54:56 -03:00
renatofilho
5ce6221efa Updated tryLock function to work in thread.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-09-14 18:31:42 -03:00
renatofilho
2559ae50f0 Created unittest for bug #332.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-09-14 18:31:34 -03:00
renatofilho
3edeee197a Created unit test for bug #312.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-09-14 18:31:24 -03:00
renatofilho
42f9176669 Increased global receiver maximun slots support.
Fixes bug #312.

Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-09-14 18:31:02 -03:00
Carlos Goncalves
149646c766 Treat modules as library targets.
This fixes dynamic linking on Mac OS X. Previously modules were been linked to
libpyside in the build tree even when installed (ie. hardcoded).

Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-09-14 11:42:52 -03:00
renatofilho
b315368a1b Fixed crash on qsignal destructor.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-09-14 11:31:25 -03:00
Hugo Parente Lima
cbf12bc3a0 Fix bug#254 - "QWebView.setPage() does not seem to work"
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2010-09-10 19:41:25 -03:00
Renato Filho
067b49c738 Created cmake option 'ENABLE_VERSION_SUFFIX' to use version on generated files to allow multiples version installed simultaneous.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-09-10 11:48:34 -03:00
Hugo Parente Lima
95e6f790de Add PYSIDE_QT_VERSION to CMakeCache.txt.
This variable stores the Qt version used to compile PySide, so
installers and packages can guess the min Qt version required to run PySide.

Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-09-10 10:30:07 -03:00
Hugo Parente Lima
be5bd91e72 Remove OS specific commands from translation test.
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Bruno Araújo <burno.araujo@openbossa.org>
2010-09-10 08:57:43 -03:00
Bruno dos Santos de Araujo
b25a7e510c Add newline in the end of qpytextobject.h to avoid compiler warnings 2010-09-09 15:51:50 -04:00
Hugo Parente Lima
a2cc5bd09b Bump version required for Shiboken. 2010-09-09 15:58:46 -03:00
Renato Filho
ae435c55fc Created unittest for bug #338.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-09-09 15:25:19 -03:00
Renato Filho
64663cdb4e Fixed QVariant conversion from Python object.
Fixes bug #346, #338

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-09-09 14:43:27 -03:00
Hugo Parente Lima
3ef0527eaf Fix copyright year of generated files.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2010-09-09 12:02:51 -03:00
Hugo Parente Lima
9fbf8b778b Fix project name on license boilerplates. 2010-09-09 12:02:51 -03:00
Hugo Parente Lima
d1fa959960 Added license boilerplates to all typesystem files. 2010-09-09 12:02:51 -03:00
Hugo Parente Lima
f9daf01879 Change the license boiler plates of all LGPL files removing the special exception. 2010-09-09 12:02:51 -03:00
Renato Filho
63cacc4411 Created module shutdown function necessary to avoid call python functions before module exit.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-09-08 19:39:31 -03:00
Renato Filho
6daa2edea5 Store randon port after fail on first attempt.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Lauro Moura <lauro.neto@openbossa.org>
2010-09-08 18:06:07 -03:00
Hugo Parente Lima
6fb0e698ee Repeat the same test, but using new style signals to cause a segfault.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2010-09-08 16:19:09 -03:00
Hugo Parente Lima
e5348268a6 Make accessManager test do not depend on internet access. 2010-09-08 15:31:41 -03:00
Hugo Parente Lima
19f7b20dd0 Declare SignalInstanceData struct in the C++ way, without ugly typedefs. 2010-09-08 15:28:25 -03:00
Hugo Parente Lima
00208f2db1 Remove unneeded casts that can hide errors. 2010-09-08 15:28:25 -03:00
Hugo Parente Lima
0ba776e27a Fix bug#282 and bug#283. 2010-09-08 15:28:25 -03:00
Carlos Goncalves
6fc086e9f9 Treat modules as library targets.
This fixes dynamic linking on Mac OS X. Previously modules were been linked to
libpyside in the build tree even when installed (ie. hardcoded).
2010-09-04 02:33:08 +01:00
Hugo Parente Lima
f1bc92a2dd bug_300_test moved to QtGui, because it tests a class from QtGui. 2010-09-03 15:50:15 -03:00
Hugo Parente Lima
cb48464859 Remove the dependecy of QtGui from a test located in QtNetwork. 2010-09-03 15:36:04 -03:00
Hugo Parente Lima
823eec81c2 Fix bug#320 - "OR'ing Qt alignments doesn't work; adding them does"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2010-09-03 10:59:43 -03:00
Lauro Neto
f024b0d884 Install qpytextobject.h
Reviewer: Hugo Lima <hugo.lima@openbossa.org>
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
2010-09-02 18:56:06 -03:00
Renato Filho
94a402db7b Fixed return ownership on mimeData function for QAbstractItemModel.
fixes bug #296.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-09-02 17:36:00 -03:00
Hugo Parente Lima
8f4246a522 Fix bug#125 - "QAbstractTextDocumentLayout.registerHandler apparently not working"
Added class QPyTextObject which inherits from QObject and QTextObjectInterface to
solve the issue with registerHandler, the same approach used by PyQt.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2010-09-02 15:07:59 -03:00
Hugo Parente Lima
94ce2814e9 Remove warning about unused variable in QTimer::singleShot code injection. 2010-09-02 15:07:59 -03:00
Matti Airas
ee0ab65aaf fixed a typo in typesystem file name 2010-09-02 13:09:05 +03:00
Renato Filho
c436fcd2aa Fixed typo on typesystem. 2010-09-01 18:28:31 -03:00
Renato Filho
cfcd31973d put back suppress warning for "Shadowing" message. 2010-09-01 17:35:43 -03:00
Renato Filho
145fe577d2 Fixed generated global.h. 2010-09-01 17:33:32 -03:00
Hugo Parente Lima
5c0d39b9dc Fix bug#316 - "QAbstractItemModel.createIndex is broken"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2010-09-01 16:55:00 -03:00
Hugo Parente Lima
e0a5ca517f Fix bug#335 - "QT_TRANSLATE_NOOP has incorrect signature" 2010-09-01 16:55:00 -03:00
Renato Filho
990f057b8d Use Cmake detected vars to generete global.h file.
This make PySide independent of Qt Macros in some cases these macros
return invalid value because the module can be compiled separated from
Qt.

Fixes bug #326.

Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Lauro Neto <lauro.neto@openbossa.org>
2010-09-01 16:48:32 -03:00
Renato Filho
589c40a6d6 Fixed function modifications.
Fixes bug #336.

Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Lauro Neto <lauro.neto@openbossa.org>
2010-09-01 16:48:32 -03:00
Lauro Neto
36a73c0ecd Also install the typesystem used during generation.
Installs the typesystem fed to the generator. This
fixes the install of modules like QtGui, with
run-time generated typesystems.

Reviewer: Hugo Lima <hugo.lima@openbossa.org>
Reviewer: Renato Filho <renato.filho@openbossa.org>
2010-09-01 11:46:05 -03:00
Hugo Parente Lima
60122d3709 Use the correct path separator when under Windows.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2010-08-31 16:50:50 -03:00
Hugo Parente Lima
7638112ea8 Do not include QtGui common typesystem twice. 2010-08-31 16:36:32 -03:00
Hugo Parente Lima
dc1eef279e Fix Qt class detection on Windows. 2010-08-31 16:36:19 -03:00
Renato Filho
28000755c2 Created unittest to bug #324.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-08-31 11:47:37 -03:00
Renato Filho
b9bf521a93 Unittest to bug #324.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-08-31 11:47:33 -03:00
Renato Filho
a44c2b9792 Removed manually added function on QItemSelection to use automatic code insertion base on container type.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-08-31 11:47:10 -03:00
Renato Filho
a326f0ff29 Fixed args type parse for bool types on signal. 2010-08-30 18:09:22 -03:00
Hugo Parente Lima
d27d6958c0 Fix bug#309 - "QtCore.QByteArray() or list from QtCore.Qsettings.value() as default"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Araújo <renato.araujo@openbossa.org>
2010-08-30 17:46:25 -03:00
Renato Filho
7b2903ad21 Fix typesystem based on auto OS detection.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Anderson Lizardo <anderson.lizardo@openbossa.org>
2010-08-27 15:24:55 -03:00
Renato Filho
2774fd8af7 Fixed Mac OS build
Fix parser of QApplication header.

Fixes bug #318

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-08-26 18:23:35 -03:00
Anderson Lizardo
d552e6eba8 Add missing checks for printing classes
Reviewed-by: Lauro Neto <lauro.neto@openbossa.org>
Reviewed-by: Bruno dos Santos de Araujo <bruno.araujo@openbossa.org>
2010-08-26 15:30:17 -04:00
Anderson Lizardo
c25215106c Fix class checking for 64-bits
Reviewed-by: Lauro Neto <lauro.neto@openbossa.org>
Reviewed-by: Bruno dos Santos de Araujo <bruno.araujo@openbossa.org>
2010-08-26 15:30:07 -04:00
Renato Filho
653261e047 Now slots signatures in C++ use Qt notation.
Ex:
   Slot(str, int) # Python
   slot(QString, int) # C++

This allow the user create slots based on types, compatible with Qt Slots.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-08-26 16:21:41 -03:00
Renato Filho
a2f3e249bc Fixed slot singature parse function to keep compatibility with QSignal.
Fixes bug #319

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-08-26 16:21:41 -03:00
Renato Filho
268bf7735b Fixed signal signature parser.
Fixes bug #311.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-08-26 16:21:41 -03:00
Anderson Lizardo
6914f21603 Add Qt Simulator support
Reviewed-by: Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
2010-08-26 11:07:11 -04:00
Anderson Lizardo
e5e44b6465 Replace macro checks with actual symbol checking
This increases a little more the check time, but is also more precise.
It is also required for cases where qfeatures.h incorrectly reports
support for a feature, but the actual class is not compiled (the case
for a couple of classes in Qt Simulator).

Additionally, the macro has been made more concise, and is reused for
both QtGui and QtNetwork.

Reviewed-by: Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
2010-08-26 11:07:02 -04:00
Anderson Lizardo
d53f699751 Simplify handling of typesystems for multiple OSes
* Factor out install() commands into PySide/CMakeLists.txt
* Drop typesystem_<module>_common.xml and typesystem_<module>.xml.in,
  and make typesystem_<module>_<os>.xml (if exists) include
  typesystem_<module>.xml (which holds common data)

Reviewed-by: Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
2010-08-26 11:06:55 -04:00
Anderson Lizardo
3c36d44472 Various cleanups to CMakeLists.txt files
* Simplify endmacro(), endif() and else() statements
* Remove unused and redundant code
* Use AUTO_OS for holding the typesystem suffix (instead of MODULE_NAME)

Reviewed-by: Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
2010-08-26 11:04:58 -04:00
Renato Filho
2593f9fccc Created unittest to bug 307. 2010-08-25 17:45:02 -03:00
Renato Filho
4e6d901bf8 Modifyed declarative test to avoi use of network.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-08-25 17:32:12 -03:00
Renato Filho
e1d1a0cbd1 Includded allow flags to some function on QNetworkManager.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-08-25 17:32:08 -03:00
Renato Filho
df834e5bb1 Updated Declarative typesystem.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-08-25 17:32:05 -03:00
Renato Filho
42d98f91c4 Fixed Qt application cleanup.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-08-25 17:32:01 -03:00
Renato Filho
49ac670cfc Avoid cyclic dependency on test.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-08-25 17:31:24 -03:00
Hugo Parente Lima
20e226bc66 Fix bug#303 - "Missing method: QCoreApplication.arguments()"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2010-08-25 15:00:46 -03:00
Hugo Parente Lima
f05cca8aae Write the pyside version variable on cmake cache.
With the pyside version variable on cmake cache, the script used to
create the windows installer can discover the PySide version being
compiled.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2010-08-24 16:56:48 -03:00
Lauro Neto
74e87b6728 Add function qtTrId
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Reviewer: Renato Filho <renato.filho@openbossa.org>
2010-08-23 16:29:21 -03:00
Lauro Neto
3cc4a66f2e Fix variable name. 2010-08-23 16:29:21 -03:00
Matti Airas
b9d61bcdba fixed the newsigslot documentation to use API 2.
Reviewer: Renaot Filho <renato.filho@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-08-23 11:07:31 -03:00
Renato Filho
e0fc2c6517 Fixed use of QFile to works on all plataforms.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-08-23 10:54:53 -03:00
Renato Filho
4dd52c3996 Changed test to avoid erros on slow machines.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-08-23 10:54:37 -03:00
Renato Filho
d39b10d9ae Fixed Cmake for test on windows.
Fixed install modules on windows.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-08-20 18:10:39 -03:00
Renato Filho
5a06e6f135 Fixed QtNetwork typesystem to work on windows.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-08-20 18:10:35 -03:00
Renato Filho
662800956b Use AutoPointerArray to dynamic array creation.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-08-20 18:10:30 -03:00
Lauro Neto
0576d04403 Fix install command to correct module name.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-08-20 18:10:25 -03:00
Renato Filho
35a5bad950 Fixed typestyste to windows.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-08-20 18:10:19 -03:00
Renato Filho
af8bf30d06 Changed output dir for python modules to make the tests run in others platafforms.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-08-20 18:10:11 -03:00
Renato Filho
7b9a4707ce Fixed typesystem for windows.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-08-20 18:09:58 -03:00
Renato Filho
2bdba4680c Fixed libshiboken classes visibility.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-08-20 18:09:50 -03:00
Renato Filho
7b9ec90b4d Fixed QtScriptTools CMake file and others files.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-08-20 18:09:32 -03:00
Matti Airas
4c7979877a fixed the newsigslot documentation to use API 2 2010-08-20 12:42:25 +03:00
Renato Filho
18d65457dc Updated test to work with Cmake 2.8 in multiples plataforms.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-08-19 18:26:41 -03:00
Renato Filho
0fb81692e3 Use .pyd for modules on windows.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-08-19 18:26:30 -03:00
Renato Filho
465649d73e created macro to compile pyside modules.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-08-19 18:26:13 -03:00
Renato Filho
23672770ea Disable remove of QAbstractItemModel signals.
Fixes bug #300.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-08-17 16:59:15 -03:00
Hugo Parente Lima
9a969935cc Fix bug 294 addind a converter specific for QFlags.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2010-08-17 11:15:44 -03:00
Renato Filho
d686c68707 Fixed gui typesystem to avoid warnings.
Reviewer: Hugo Parente <hugo.lima@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-08-16 19:05:11 -03:00
Renato Filho
aedea32f13 Implemented help function to connect signal with python callback.
Updated QAction unittest to work with signal connection on constructor.

Reviewer: Hugo Parente <hugo.lima@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-08-16 19:04:49 -03:00
Renato Filho
2d24d300d8 Avoid read the property in the QObject constructor.
Create unit test to verify if the python property is setted during the constructor.

Reviewer: Hugo Parente <hugo.lima@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-08-16 18:25:54 -03:00
Renato Filho
6bd528978c Raise a error when try to modify a read-only property.
Add get function as mandatory in QProperty constructor.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-08-16 10:48:42 -03:00
Renato Filho
1162a844bd Fixed Http test to work with Qt 4.7.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-08-16 10:48:42 -03:00
renato
c130273ee0 Fixed arguments parser on QProperty constructor.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-08-16 10:48:07 -03:00
Marcelo Lira
9a19bd26d2 Added tests for QObject properties being set with named arguments on the constructor.
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
2010-08-13 18:38:31 -03:00
Marcelo Lira
2b21d79f54 All tests using GUI aren't shown if the host machine has xvfb installed.
Unwanted graphical output from tests are redirected to a fake X server
on Unix system. This depends on the presence of the Xvfb server.

Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
2010-08-13 14:42:55 -03:00
Renato Filho
8ea5127ccb Created unit test to QVariant converstion of QStringList.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-08-13 11:29:05 -03:00
Renato Filho
533cdcd07b Fix typo on typesystem. 2010-08-12 14:56:43 -03:00
Renato Filho
5cbfffc005 Removed rename command from unecessary functions.
Fixes bug #287.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-08-12 14:41:06 -03:00
Hugo Parente Lima
26a48c4ed3 Fix ownership of value returned by QItemDelegate::createEditor method.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-08-12 10:35:09 -03:00
Hugo Parente Lima
0cf8145d78 Fix bug 295 - "QModelIndex::model() sets the QModelIndex as parent of the model" 2010-08-12 10:34:46 -03:00
Hugo Parente Lima
1cdc799701 Removed obsolete methods from QRegion. 2010-08-12 10:05:00 -03:00
Hugo Parente Lima
da8e819955 Fix debug build when no debug symbols was found for Python libs.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2010-08-12 10:03:08 -03:00
Marcelo Lira
9f2f97de73 Fixes custom code for QTabWidget.
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
2010-08-11 11:56:40 -03:00
Renato Filho
1b27bad2b2 Fixed ref leak.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-08-10 16:18:01 -03:00
Renato Filho
66adabc96d Created conversion to QStack.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-08-10 16:17:56 -03:00
Renato Filho
c21de7bd81 Removed unecessary command from CMake file.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-08-10 16:17:32 -03:00
Lauro Neto
d26c712a99 Fix argument check in QAction constructor.
The fourth argument for QAction(string, qobject, keysequence, pyobject)
was initialized as a NULL pointer by default but was checked against
Py_None before being used.

Reviewer: Renato Oliveira <renato.filho@openbossa.org>
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
2010-08-09 14:42:58 -03:00
Lauro Neto
5dc1ac791d Add test for QAction.setShortcut 2010-08-09 14:31:02 -03:00
Luciano Wolf
1b4e140044 Fix typo: QPropery. 2010-08-04 18:47:27 -03:00
Marcelo Lira
9e7369e4ae Fixes QAction code injection for constructor code.
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
2010-08-04 17:06:01 -03:00
Renato Filho
f3a1585e6e Bump to version 0.4.1. 2010-08-03 19:47:23 -03:00
Renato Filho
ee9e1f6155 Added support to shortcut named arg on QAction constructor.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-08-03 14:06:31 -03:00
Lauro Neto
5ce8d05a08 Bump version to 0.4.0 and update shiboken version
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Reviewer: Renato Filho <renato.filho@openbossa.org>
2010-08-03 11:32:08 -03:00
Renato Filho
f098bb9f3a Included support to double values on qAbs.
Fixes bug #269.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-08-02 17:49:50 -03:00
Luciano Wolf
34a06b8de4 Fix bug273 - QT_VERSION and QT_VERSION_STR constants.
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-08-02 17:42:00 -03:00
Renato Filho
630a4062ff Fixed ref leak on QMenu inject code.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-08-02 15:31:28 -03:00
Renato Filho
114bca41a2 Created unit test to layout ref leak.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-08-02 15:31:17 -03:00
Renato Filho
efe8019eda Created a pythonic constructor to QAction
Fixes bug #274.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-08-02 15:31:07 -03:00
Renato Filho
09876a4386 Created unit test to bug #274.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-08-02 15:30:44 -03:00
Renato Filho
d4f911f5b3 Raise a python error when signal not found on object.
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-08-02 15:30:09 -03:00
Renato Filho
a644063830 Fix compile on cmake 2.8 for mac users.
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-08-02 15:29:56 -03:00
Luciano Wolf
6c8c9c6391 Fix getOpenFileName/getSaveFileName signatures.
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-08-02 14:20:00 -03:00
Renato Filho
1920130fc9 Fixed cyclic dependency on duck punching test.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-07-29 19:29:17 -03:00
Renato Filho
ee7b4826c0 Fixed return policy on ItemList.
Fixed singleShot function to invalidate temporary object.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-07-29 19:29:01 -03:00
Marcelo Lira
6a2df2daa4 Added test case for signal signature received by QObject::connectNotify().
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
2010-07-29 15:19:55 -03:00
Renato Filho
1fe7baf787 Emit connectNotify with real signal name.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-07-29 14:13:52 -03:00
Renato Filho
f4668398e2 Call signalmanager clear during QtCore exit function instead of QtCoreApplication destrcutor, to avoid memory leaks.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-07-29 14:13:43 -03:00
Renato Filho
4f51600e20 Created unit test to test shiboken objects destructor.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-07-29 14:13:26 -03:00
Marcelo Lira
505ba23a9d Fixed glue code for QApplication and QCoreApplication.
The code for QApplication deletion should also invalidate the
wrapper for it. Also the similar code for QCoreApplication must
perform the same steps as QApplication.

Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
2010-07-27 10:12:16 -03:00
Luciano Wolf
e42133e8e7 Fix elasticnodes segfault. 2010-07-23 17:57:41 -03:00
Renato Filho
078408b8c2 Avoid running x11 specific tests on others OS. 2010-07-23 17:31:19 -03:00
Renato Filho
3267accc9f Fixed uninitialized value. 2010-07-23 11:45:30 -03:00
Renato Filho
8bde4b3800 Use correct python lib in debug mode.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-07-23 11:10:28 -03:00
Renato Filho
f7afa613cf Update modules to work without protect hack.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-07-23 11:09:48 -03:00
Marcelo Lira
e5042dc193 Added a custom cmake file to help finding Python debug provisions.
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
2010-07-21 17:15:14 -03:00
Luciano Wolf
cb7d3e95a2 Fix bug#252.
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-07-20 14:32:04 -03:00
Luciano Wolf
c62c36a64d Fix CMakeLists to include QtMultimedia tests + fix audio test.
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-07-15 10:13:21 -03:00
Renato Filho
28d0c480b1 Create unit test to bug 243.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-07-14 11:52:22 -03:00
Luciano Wolf
95c7699ae3 Update tests to check native pointers (qchar *, void *, ...).
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-07-13 16:19:57 -03:00
Renato Filho
e2056540d5 Uset 60 secs as default test timeout.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-07-13 16:16:03 -03:00
Renato Filho
bac154b896 Create support to QVariantList and QVariantMap.
Fixes bug: #263

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-07-13 14:33:02 -03:00
Luciano Wolf
be1073e772 Fix warning on QString* parameter inside QtWebKit.
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-07-12 16:03:11 -03:00
Renato Filho
5cc46f2f13 Fixed layout reference control on layouts.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
2010-07-09 19:27:35 -03:00
Renato Filho
975edd5647 Fixed test ref count mistake. 2010-07-09 19:27:30 -03:00
Hugo Parente Lima
d351f6a015 Fix build on python2.5.
Doing the merge request for Hugo as he went on vacation today :)

Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-07-09 18:41:41 -03:00
Hugo Parente Lima
1a5de6c46c Add a default value and argument name to QUiLoader::file(str, QWidget)
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-07-09 11:14:49 -03:00
Renato Filho
e507660124 Fixed memory leak on state machine classes.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-07-09 11:06:13 -03:00
Renato Filho
4090ef81ef Restore missing function on QStandardItemModel.
Created unit test.

Fixes bug: #257.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-07-09 11:06:03 -03:00
Renato Filho
f1bbc25546 Created QProperty documentation.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-07-08 13:53:14 -03:00
Renato Filho
7431ae12a4 Exported flags on enum in script typesystem.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-07-08 11:28:58 -03:00
Renato Filho
1c4ee915c0 Implemented support to properties on QMetaObject.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-07-08 11:27:38 -03:00
Renato Filho
693ae6d6c4 Modify multiple connections test to avoid use more then 50 slots
supported by PySide.

Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-07-08 11:27:01 -03:00
Renato Filho
83db573031 Use original name in type discovery during signal/slot.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-07-08 11:26:43 -03:00
Luciano Wolf
c737f90c1d Fix qApp macro implementation.
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Hugo Lima <hugo.lima@openbossa.org>
2010-07-07 14:03:31 -03:00
Hugo Parente Lima
154831efcf Fix typo.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-07-06 18:45:10 -03:00
Hugo Parente Lima
56560943df Typesystem cleanup.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-07-06 17:46:24 -03:00
Hugo Parente Lima
01df78dfd8 Remove the removal of isSortignEnabled from QtGui typesystem. 2010-07-06 15:32:59 -03:00
Renato Filho
2963909063 Remove use of deprecated types.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-07-05 17:39:24 -03:00
Renato Filho
82d1d82755 Implemented copy constructor to PyObjectWrapper.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-07-05 17:39:21 -03:00
Renato Filho
e64209b4d3 Add unit test to QListWidget.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-07-05 17:39:19 -03:00
Renato Filho
72235a6530 Use original name on QVariant type lookup function.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-07-05 17:39:14 -03:00
Renato Filho
bc4aa5ca94 Created QListWidget test.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-07-05 17:38:50 -03:00
Hugo Parente Lima
c5b700a311 Fix typo in tests/QtGui/qdynamic_signal.py
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-06-29 18:20:35 -03:00
Hugo Parente Lima
9ee7d00d11 Fix reference leak in PySide::signalUpdateSource. 2010-06-29 17:55:23 -03:00
Renato Filho
4c6e35634c Created unit test to use signals in objects not created on python.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-06-29 16:47:59 -03:00
Hugo Parente Lima
27530522a8 Fix qwidget_test.
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-06-29 10:47:39 -03:00
Hugo Parente Lima
b812f04d24 Fix bug#256 - "PySide does not support signals with containers."
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2010-06-29 10:28:11 -03:00
Hugo Parente Lima
ee00f28629 Fix cmake files used by other projects to detect PySide.
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-06-25 17:48:29 -03:00
Renato Filho
9a662a134c Used default constructor for primitive types with complex name.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.lima@openbossa.org>
2010-06-25 17:11:50 -03:00
Renato Filho
d1ee964327 Fixed http test.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-06-23 11:00:37 -03:00
Renato Filho
7373ecb1c0 use original name on activated function.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-06-23 11:00:37 -03:00
Renato Filho
174a3c2760 Fixed typo in typesystem install path.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-06-23 11:00:37 -03:00
Renato Filho
b1f7791a72 Check for invalid signal or slot name.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-06-23 11:00:37 -03:00
Renato Filho
09cb758d9e Fixed layout policy.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
              Luciano Wolf <luciano.wolf@openbossa.org>
2010-06-23 11:00:37 -03:00
Renato Filho
499d42a6f4 Included qsinal.h in installed files. 2010-06-21 19:37:30 -03:00
Hugo Parente Lima
86d0f6715e Fix bug: "Debug build fails to run the tests (doesn't work) [_Py_AddToAllObjects: Assertion (...) failed]"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-06-21 17:45:05 -03:00
Luciano Wolf
54b69c3595 Adding qInstallMsgHandler() method support.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.lima@openbossa.org>
2010-06-21 17:38:41 -03:00
Catalin Iacob
928e0b2795 Fix libpyside install.
On Windows, if LIBRARY DESTINATION is given, ARCHIVE DESTINATION must also be
given otherwise CMake fails with 'install Library TARGETS given no DESTINATION!'

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-06-21 17:36:27 -03:00
Marcelo Lira
e323cd90f7 PySide now installs its type system files.
The pyside.pc file now has a "typesystemdir" variable pointing to
the directory where the type system files are installed.

Example usage: pkg-config pyside --variable=typesystemdir

Also set the "PYSIDE_TYPESYSTEMS" CMake variable on
libpyside/PySideConfig.cmake.in to point to the same path
of pkg-config's "typesystemdir".

Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
2010-06-21 16:10:40 -03:00
Marcelo Lira
1439464358 Small updates to the documentation.
Removed the doc about building BoostPythonGenerator and modified a
line about the generator used to create the bindings in the index.html
file.
2010-06-21 14:04:43 -03:00
Renato Filho
88146cf500 Implemented a dummy http server to run unit-test on a offline computer.
Reviewed: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-06-18 17:37:29 -03:00
Renato Filho
5ce7c94536 Fixed udpsocket to work on offline computer.
Reviewed: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-06-18 17:36:53 -03:00
Hugo Parente Lima
33f7ff2b4d Fix bug#242 - "PySide is installed into wrong path on Mac OS X"
If the cmake variable SITE_PACKAGE is set, we wont try to detect the SITE_PACKAGES variable.

Reviewed: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-06-17 19:53:20 -03:00
Luciano Wolf
e34105a749 Fix phonon test
Now it checks for ogg backend before playing. The timeout was moved
to 10s to avoid phonon timeout.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Renato Araújo <renato.araujo@openbossa.org>
2010-06-17 16:17:16 -03:00
Renato Filho
6b70a1362c Fixed signal connection with native slot.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-06-17 15:35:30 -03:00
Renato Filho
d699a3abed Created test for Connection between new Signal API and Slots
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-06-17 15:35:28 -03:00
Renato Filho
cf90354ff9 Create QAction signal test.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-06-17 15:35:24 -03:00
Renato Filho
83cf37f609 Create unit-test for signal with QObject.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-06-17 15:34:34 -03:00
Renato Filho
4cca85f525 Implement inject-code to functions using QChar in QFontMetrics and
QFontMetricsF

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-06-17 14:04:11 -03:00
Luciano Wolf
ef7eb0fca4 Fix the template used by QFileDialog methods.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-06-17 09:35:39 -03:00
Hugo Parente Lima
cdde96f3a4 Add a default constructor value to QVariant::Type.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-06-16 15:20:03 -03:00
Hugo Parente Lima
ab40ddbb2f Fix LD_LIBRARY_PATH variable to be possible to run tests when using CMAKE_SKIP_RPATH=true 2010-06-16 14:55:26 -03:00
Luciano Wolf
e0c46d6761 Implementing API2 modifications.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-06-15 20:41:41 -03:00
Hugo Parente Lima
0eb8d670c2 Added QVariant::Type as a primitive type.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-06-15 20:34:02 -03:00
Hugo Parente Lima
13b61ca7e5 Rename error() method to avoid name clash with the error signal. 2010-06-15 20:34:02 -03:00
Hugo Parente Lima
7fc3d5137f Add suppress message for yet another weird message from the C++ parser. 2010-06-15 20:34:02 -03:00
Hugo Parente Lima
a103f6bb83 Remove invalid function modifications from typesystem. 2010-06-15 20:34:02 -03:00
Luciano Wolf
ef291779fd Updating QVariant description inside API2 document. 2010-06-15 18:30:10 -03:00
Luciano Wolf
59d42297fd Updating API2 documentation. 2010-06-15 17:38:35 -03:00
Luciano Wolf
5c6eb8b913 Documentation about new API2. 2010-06-14 16:59:58 -03:00
Marcelo Lira
4ace08b64b Fixes QString primitive type for Qt 4.7 adding a default constructor.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
2010-06-14 15:47:45 -03:00
Renato Filho
569d1ab60e Fixed parent function return ownership.
Fixed QMainWindow functions ownership.

Fixes #241.

Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-06-14 15:15:47 -03:00
Renato Filho
4284ae6cc6 Fixed thread test to avoid memory leaks.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-06-14 15:15:21 -03:00
Hugo Parente Lima
89167fa56e Revert "GENERATOR_EXTRA_FLAGS must be a cmake string, not a cmake list."
This reverts commit fc05931696.
2010-06-14 14:22:55 -03:00
Hugo Parente Lima
fc05931696 GENERATOR_EXTRA_FLAGS must be a cmake string, not a cmake list.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-06-14 11:32:09 -03:00
Hugo Parente Lima
1b6337d8b4 Removed QVariant from PySide.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-06-10 20:18:59 -03:00
Hugo Parente Lima
d8a192b5e1 Remove registration of PySide primitive types, the generator do this automatically.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Araújo <renato.araujo@openbossa.org>
2010-06-10 15:31:59 -03:00
Hugo Parente Lima
f1327b5a5f chmod -x on some tests, because we need to follow a pattern. 2010-06-10 15:31:43 -03:00
Hugo Parente Lima
e47b49f86d Re-add the possibility to run tests by module. 2010-06-10 15:31:43 -03:00
Hugo Parente Lima
00918cb847 Added QDataStream methods to read and write QString, QChar and QStringList. 2010-06-10 14:57:42 -03:00
Hugo Parente Lima
ccd189d30c Add checkType method to PySide custom converters. 2010-06-10 14:57:42 -03:00
Hugo Parente Lima
e39bfefde9 Remove wrapper for classes: QString, QStringRef, QLatin1String, QStringMatcher, QChar and QLatin1Char. 2010-06-10 14:57:41 -03:00
Luciano Wolf
24a9445906 Apply "rename to" tag to QtGui methods.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-06-09 19:46:12 -03:00
Renato Filho
b2bf4f18cc Rename necessary arguments on QtCore typesystem.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-06-09 19:10:16 -03:00
Hugo Parente Lima
1a40cc79df Fix compilation of QTest bindings on MacOSX.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-06-09 18:28:21 -03:00
Hugo Parente Lima
009b6a8e9a Fix cmake detection of phonon on MacOSX.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Araújo <renato.araujo@openbossa.org>
2010-06-09 16:48:35 -03:00
Renato Filho
bf8a60db4c Created support to hash objects with type QDate, QTime, QDateTime, QUrl.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-06-08 18:00:02 -03:00
Renato Filho
cf6e5f1668 Created unit test for QDate, QTime, QDateTime, QUrl hash function.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-06-08 17:51:44 -03:00
Luciano Wolf
1a698a7e95 Updating QtMaemo5 dependecies inside CMakeLists file.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>,
          Renato Araújo <renato.filho@openbossa.org>
2010-06-08 15:48:32 -03:00
Luciano Wolf
0f33e1d3d8 Updating QEasingCurve and QTest to compile for ARMEL platforms. 2010-06-08 10:47:27 -03:00
Renato Filho
ab918abc1e Created new unittest model.
Separete unittest for module.
Only run unittest for compiled modules.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-06-07 16:57:11 -03:00
Marcelo Lira
471486732b Removed an copy'n'paste error from the documentation of new style signals/slots.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
2010-06-07 16:26:45 -03:00
Renato Filho
ca1533509e Bump to version 0.3.3. 2010-06-07 10:08:47 -03:00
Luciano Wolf
09b7fcdc4f Fix newsigslot documentation. Use Signal/Slot instead of signal/slot. 2010-06-03 11:24:14 -03:00
Marcelo Lira
ee6303819e Fixed custom code related to connectNotify behaviour.
The code injection that deals with calling connectNotify in the
binding generated with the protected hack turned off should call
the connectNotify method directly instead of using the protected
caller.

Reviewed by Renato Araújo <renato.filho@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
2010-06-03 11:11:40 -03:00
Marcelo Lira
5863f2dc8e Fixed QColor test with proper values and remove an unused line. 2010-06-02 18:21:44 -03:00
Luciano Wolf
02f4a14bab Updating documentation to include QtDeclarative and support new features.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Renato Araújo <renato.filho@openbossa.org>
2010-06-01 17:33:19 -03:00
renato
3e7a66f0fc Fixed Maemo5 classes parent policy.
Fixes #178.
2010-05-31 18:17:49 -03:00
renato
3a79f868d1 Create unittest to pickselector.
Fixed pickselector return policy.
Fixes bug #179
2010-05-31 17:33:13 -03:00
renato
1a235edc09 Fix QColor test to avoid floating points. 2010-05-31 16:08:39 -03:00
Renato Filho
41a1aa59d1 Use external CXX_FLAGS on compilation flags.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>,
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-05-31 16:07:36 -03:00
Hugo Parente Lima
c161698a40 Revert "Fixed signal/slot class name based on PSEP 100."
This reverts commit 361ac438c2.

Conflicts:

	libpyside/qsignal.cpp
2010-05-31 10:41:51 -03:00
Luciano Wolf
2cb23734c8 Adding test cases to cover QtDeclarative + fix inside typesystem.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2010-05-28 16:00:47 -03:00
Luciano Wolf
12e6ba386a Test a specific situation that causes python segfault.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2010-05-28 15:58:43 -03:00
Luciano Wolf
e5c3d58025 Webkit test cleanup.
Running 2 different tests inside the same class causes a segfault
due to TimedQApplication limitations.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2010-05-28 15:10:32 -03:00
Renato Filho
0eb416d487 Disabled GCC optimization flags by default.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>,
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-05-28 11:25:06 -03:00
Renato Filho
43ec657766 Fixed bug on dynamic metaobject creation.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>,
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-05-26 18:34:42 -03:00
Renato Filho
cafb38dafd Fixed QGLBuffer typo.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>,
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-05-26 18:34:36 -03:00
Renato Filho
14e5013ef6 Implemented QGLBuffer unittest.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>,
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-05-26 16:24:07 -03:00
Renato Filho
0c6e44c7d4 Updated QtOpenGL typesystem to Qt 4.7.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>,
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-05-26 16:24:07 -03:00
Renato Filho
2264c8874c Merged typesystem (Qt 4.6 and 4.7)
Start use "since" tag on typesystem to Qt 4.7 modifications.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>,
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-05-26 16:24:07 -03:00
Luciano Wolf
893946b572 Check QT_NO_SESSIONMANAGER flag to avoid generating qsessionmanager_wrapper. 2010-05-25 15:05:24 -03:00
Hugo Parente Lima
fbc43d942a Initial bindings for QtDeclarative module.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2010-05-24 17:28:48 -03:00
Renato Filho
92a07a7a15 QtMultimedia bindings.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-24 16:00:33 -03:00
Renato Filho
4c3a4cc91f QtNetwork 4.7 unittest. 2010-05-24 10:24:41 -03:00
Renato Filho
c2b2e579ae Updated QtNetwork typesystem to support Qt 4.7 2010-05-24 10:24:41 -03:00
Lauro Neto
ca4279fb79 Fix CMake variable escaping
Was breaking Release mode compilation
2010-05-22 12:46:56 -03:00
Renato Filho
f91faac094 Fixed typo on licence header.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>
2010-05-21 20:21:19 -03:00
Hugo Parente Lima
072aeadecf Fix bug#225 - "QWidget didn't have fontMetrics Functions"
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-21 18:46:42 -03:00
Hugo Parente Lima
e00da49c84 Fix QVariant custom code to work with Qt4.7.
Instead of expand QDECLARE_METATYPE just to change a string, change the class name used to hold
the PyObject and use the Qt macro. This will protect us on future changes on this macro like the
one on Qt 4.7.

Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-21 18:22:20 -03:00
Hugo Parente Lima
46c628ec49 Use the "just compiled" libpyside even if the platform doesn't support library rpath.
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-21 14:45:49 -03:00
Luciano Wolf
17f9eed1ad Fix bug#218 - TimedQApplication uses a singleton.
It's necessary to use a global TIMEOUT value, big enough to run
all the tests without killing the QApp.

Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>
          Renato Araujo <renato.araujo@openbossa.org>
2010-05-21 11:52:26 -03:00
Renato Filho
7fd722a38a Fixed Nokia copyright.
Reviewer: Matti Airas <matti.p.airas@nokia.com>
2010-05-21 09:06:28 -03:00
Renato Filho
792456c8e4 Fix convenience symlinks used during install by appending the
Author: Didier Raboud <didier@raboud.com>

Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-20 19:48:51 -03:00
Renato Filho
d9be189834 Includes the postfixes in the install target (allows debug build)
Author: Didier Raboud <didier@raboud.com>

Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-20 19:48:51 -03:00
Hugo Parente Lima
9d8f595e29 Revert "Fix bug #229."
This reverts commit 5442c99d14.

The added function are part of QtGui, not QtCore.
2010-05-20 17:05:14 -03:00
Renato Filho
2956c15cb2 Append license and copyright to pyhtml2devhelp.py script
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-20 15:02:44 -03:00
Renato Filho
a98a0bf25a QAbstractTableItemModel unittest.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-20 15:02:35 -03:00
Hugo Parente Lima
5442c99d14 Fix bug #229.
Just remove the removal of some functions from Qt namespaces.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Araújo <renato.araujo@openbossa.org>
2010-05-20 14:55:48 -03:00
Renato Filho
5ee62778c1 Update polymorphic-id-expression to QAbstractItemModel derived classes.
Fixes bug #211.

Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-20 12:26:13 -03:00
Hugo Parente Lima
f5986ec7fb Fix bug#228 - "Missing PySide.QtGui.QStyledItemDelegate.initStyleOption"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2010-05-20 12:23:42 -03:00
Renato Filho
361ac438c2 Fixed signal/slot class name based on PSEP 100.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-20 12:16:54 -03:00
Luciano Wolf
3d205e8319 Updating doc to reflect PSEP100.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Renato Araujo <renato.araujo@openbossa.org>
2010-05-20 11:25:43 -03:00
Hugo Parente Lima
34317b147f Fix bug#207, Add initQtMetaType class to libpyside.
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-20 11:09:01 -03:00
Renato Oliveira
bb32f63658 MacOs compiler fix.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-19 17:40:14 -03:00
Renato Filho
b830e66966 Implemented SO detection support.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-19 17:39:56 -03:00
Luciano Wolf
101a3f0e33 Update tests to cover bug#207. 2010-05-19 16:47:29 -03:00
Renato Filho
43263681e7 Fix dynamic linking in various modules.
Author: Didier Raboud <didier@raboud.com>

Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-19 14:26:13 -03:00
Renato Filho
b7343f255c Implemented OPENSSL detection on QtNetwork.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-19 14:26:09 -03:00
Renato Filho
8236687340 Append licence header.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-19 14:25:52 -03:00
Luciano Wolf
81cf6af6eb Adding documentation about new-style signal/slot. 2010-05-18 16:39:34 -03:00
Luciano Wolf
9a8bc9c3d1 Adding new-style signal/slot tests.
Based on Marcelo Lira's source code.

Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-17 19:55:33 -03:00
Luciano Wolf
16809db86b Fix signal initializer.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-17 19:55:30 -03:00
Luciano Wolf
b7df2f1c0c Fix signal initializer.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-17 19:55:19 -03:00
Renato Filho
40d67b2892 Implemented signal to signal connection.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-17 19:55:14 -03:00
Renato Filho
3f6c11762e Implemented support to connection type.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-17 19:55:09 -03:00
Renato Filho
089cce5dbb Used shared pointer on MethodData to allow copy.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-17 19:55:06 -03:00
Renato Filho
f976c831fd Register Signal objects on MetaObject.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-17 19:54:59 -03:00
Renato Filho
367536b2aa Removed init[slot,signal] from public api.
Use PyObject_dir to discovery signals methods. (this is very slow)

Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-17 19:54:49 -03:00
Renato Filho
77d9398bde Fixed memory leak on signal allocator.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-17 19:54:42 -03:00
Renato Filho
005aeaf829 Fixed memory leaks.
Used PyObject on attr functions.
Code style update.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-17 19:54:36 -03:00
Renato Filho
7001f3df8f removed TPFLAGS_BASETYPE from signal/slot classes to avoid derivation
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-17 19:54:33 -03:00
Renato Filho
a6ce509dac Updated signal/slot class names to follow the same style.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-17 19:54:30 -03:00
Renato Filho
37141d2329 Fixed signal signature parse.
Implemented signal allocator function to be used on generator.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-17 19:54:24 -03:00
Renato Filho
5eabe6943f Implemente sequence operator on signal class.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-17 19:54:16 -03:00
Renato Filho
d8593de73a Implemented signal name discovery if not setted on constructor.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-17 19:53:54 -03:00
Renato Filho
c5fd4d4830 Implemented support to modify slot return type.
Included method type in DynamicQMetaObject metadata.
Moved Signal/Slot objet to libpyside.
Create unittest to signal class.
Implemented disconnection function.
Fixed emit method on signal object
2010-05-17 19:53:54 -03:00
Renato Filho
d2a6f35ef9 Included QMetaMethod class in QtCore typesystem.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-17 19:53:29 -03:00
Renato Filho
79ce19690d Use new decorators api on autoconnect test.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-17 19:53:28 -03:00
Renato Filho
fde014f5db Implemented support to slot decoration.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-17 19:53:26 -03:00
Renato Filho
ac217286e2 Created unitest to slot decoration.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-17 19:53:14 -03:00
Renato Filho
4452d5dbaa Created test to static metaobject.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-10 17:30:07 -03:00
Hugo Parente Lima
e58db20b0f Fix bug#167 2010-05-07 15:57:51 -03:00
Hugo Parente Lima
4fb103abfa Removed undocumented enum from QtCore. 2010-05-07 15:57:51 -03:00
Luciano Wolf
f34be7e312 New test case to cover QMenu.addAction() problem. Bug #167. 2010-05-07 15:56:56 -03:00
Renato Filho
f17539378b unittest for autoconection signal/slot.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org
2010-05-07 11:49:34 -03:00
Renato Filho
1551821972 uinit test for signasl with valuetype as pointer.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-05-07 11:48:40 -03:00
Renato Filho
dfdad7e0e5 Bump to version 0.3.2 2010-05-04 19:22:34 -03:00
Hugo Parente Lima
c54618eee2 Fixed layout issues in global module index documentation page.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Reviewer: Renato Araújo <renato.araujo@openbossa.org>
2010-05-04 17:01:14 -03:00
Hugo Parente Lima
f0e7ba8fe7 Fix documentation page about how to generate the documentation. 2010-05-04 17:01:13 -03:00
Renato Filho
3ca68789bb Updated git-archive use to keep compatibility with git version 1.6. 2010-05-04 11:50:30 -03:00
Hugo Parente Lima
c52e628de3 Fix libshiboken SONAME. 2010-05-04 11:48:02 -03:00
Bruno dos Santos de Araujo
04a7beaab3 Add QtMaemo5 to the modules list
Reviewer: Renato Filho <renato.filho@openbossa.org>
Reviewer: Lauro Neto <lauro.neto@openbossa.org>
2010-05-04 10:01:27 -04:00
Bruno dos Santos de Araujo
e2763f0ae9 Bump generation tools versions 2010-05-03 17:01:22 -04:00
Bruno dos Santos de Araujo
4805c01d33 Update build docs dependencies/versions 2010-05-03 17:01:22 -04:00
Lauro Neto
fdb03104bf Fix Phonon.path.[sink|source]() return ownership
Was leaking references and segfaulting on exit.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Reviewer: Renato Filho <renato.filho@openbossa.org>
2010-05-03 17:41:26 -03:00
Lauro Neto
6d2bdf8907 Fix phonon playing test
Wasn't playing anything as no output was being connected to
the source.
2010-05-03 17:41:26 -03:00
Lauro Neto
8ba349cfed Adding missing files
Were giving 'symbol not found' with Qt4.5 or failing compilation
2010-05-03 17:41:26 -03:00
Hugo Parente Lima
0313063fa3 Add doc generator for some missing modules.
Reviewer: Bruno Araújo <bruno.araujo@openbossa.org>
Reviewer: Renato Araújo <renato.araujo@openbossa.org>
2010-05-03 17:33:27 -03:00
Hugo Parente Lima
683c105ae9 Build documentation of out source dir, automagicly replacing variables like version numbers.
Reviewer: Bruno Araújo <bruno.araujo@openbossa.org>
Reviewer: Renato Araújo <renato.araujo@openbossa.org>
2010-05-03 17:33:21 -03:00
Hugo Parente Lima
3ee5470bc3 Fix documentation title, as requested by bug#168.
Reviewer: Bruno Araújo <bruno.araujo@openbossa.org>
Reviewer: Renato Araújo <renato.araujo@openbossa.org>
2010-05-03 17:33:09 -03:00
Hugo Parente Lima
59d0798159 Add dbus example do docs.
Reviewer: Bruno Araújo <bruno.araujo@openbossa.org>
Reviewer: Renato Araújo <renato.araujo@openbossa.org>
2010-05-03 17:32:03 -03:00
Luciano Wolf
e7f6729d5b Python2.6 doesn't include a .pc file.
"Requires: Python" will break any use of pkg-config when trying to
detect information related to pyside or shiboken modules.
2010-05-03 13:38:11 -03:00
Luciano Wolf
228372d4da Install pysideconversions.h to the proper place. 2010-05-03 13:38:11 -03:00
Renato Filho
c3a2b39438 Fixed typesystem parser warnings. 2010-04-30 18:00:58 -03:00
Lauro Neto
7d694e215d Adding test for QtScriptTools
Reviewer: Bruno Araujo <bruno.araujo@openbossa.org>
Reviewer: Willer Moreira <willer.moreira@openbossa.org>
2010-04-30 17:46:36 -03:00
Willer Moreira
52f06cdcd8 Adding support to QtScriptTools module.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Reviewer: Lauro Neto <lauro.neto@openbossa.org>
2010-04-30 16:14:06 -03:00
Lauro Neto
9f6d188d35 Add missing flags attribute. 2010-04-30 16:00:12 -03:00
Renato Filho
acc0ce463c Phonon Notifier wrapper.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Reviewer: Renato Araújo <renato.araujo@openbossa.org>
2010-04-30 15:52:24 -03:00
Hugo Parente Lima
a7c7c9a76c Add QMultiMap support for Qt. 2010-04-30 15:11:33 -03:00
Hugo Parente Lima
d168458987 Initial bindings for phonon 2010-04-29 15:19:37 -03:00
Bruno dos Santos de Araujo
faa90f5b7b Update build docs.
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2010-04-29 13:43:43 -04:00
Renato Filho
171c9ed6ef Fixed convertes memory leak.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-04-29 14:13:44 -03:00
Renato Filho
35a3178fdc Update documentation about shiboken and remove old one about
boost.python.

Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-04-28 16:36:47 -03:00
Renato Filho
8d0fc00e8b Skip BaseWrapper class from class diagram generation.
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-04-28 16:36:47 -03:00
Lauro Neto
aaece960d3 Adding ./doc from boost
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-04-28 16:36:47 -03:00
Lauro Neto
685246809d Fixing project name
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-04-28 16:36:47 -03:00
Renato Filho
196f5ae104 Created unittest for QtScript. 2010-04-26 11:09:33 -03:00
Luciano Wolf
0255f6ebb6 Adding support to QtScript module. 2010-04-23 15:41:50 -03:00
Hugo Parente Lima
88bae999f7 Added all Qt global functions using the brand new function tag.
Reviewer: Renato Araújo <renato.araujo@openbossa.org>
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
2010-04-22 19:32:13 -03:00
Hugo Parente Lima
e6cfe657ff Moves contents of qobjectdefs_pyside.h to global.h.
This change is required to APIExtractor correct find the file where the classes
declared in qobjectdefs_pyside.h were.
2010-04-22 19:32:13 -03:00
Hugo Parente Lima
765dc08578 Function modifications of QDragMoveEvent moved to its base type, QDropEvent. 2010-04-22 19:32:13 -03:00
Renato Filho
59ccd4c744 For now on, the c++ ownership is mandatory on QLayout family classes.
QLayouts class does not take ownership of widgets, only transfer
ownership to parentWidgets.

If you add a QWidget in a QLayout this widget does not have your
refcount incremented until this layout get a parent QWidget.

Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-04-22 18:22:22 -03:00
Renato Filho
3c68c1f03f Fixed QLayoutItemWidget polymorphic expression.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-04-22 18:22:09 -03:00
Renato Filho
1ec8bf6f1e Fixed QLayout family return policy.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-04-22 18:21:52 -03:00
Renato Filho
2c937c6442 Fixed QApplication exit order.
SignalManager need be destroyed before QApplication to avoid memory
leak.

Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-04-22 18:21:21 -03:00
renato
3468ba1eff Implemented module QtMaemo5.
Create unittest for module.
Fixed generetion of typesystem_gui.xml based on detected system.

Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-04-22 14:47:17 -03:00
Renato Filho
de4a1a10b0 Fixed bug with refcount on PyObject args during signal/slot emission.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2010-04-16 16:52:19 -03:00
Renato Filho
2de4b93859 Removed unecessary inject code on QtHelp typesystem.
Renamed unittest to standard name with test in the end of filename to be
detected by test suite.

Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-04-15 12:17:32 -03:00
Hugo Parente Lima
24249a4538 Partially fix bug#181 "Support Qt message handling system".
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Reviewer: Anderson Lizardo <anderson.lizardo@openbossa.org>
2010-04-13 21:03:27 -03:00
Hugo Parente Lima
e7c5666bc3 Fix typo, QT_MULTIMEDIA* => QT_QTMULTIMEDIA*
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Reviewer: Anderson Lizardo <anderson.lizardo@openbossa.org>
2010-04-13 21:01:06 -03:00
Renato Filho
653bb5149b Created unittest for QtXmlPatterns.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-04-13 16:04:17 -03:00
Hugo Parente Lima
27458bcd2f Fix bug#197, among some reference leaks.
Reviewer: Renato Araújo <renato.filho@openbossa.org>
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
2010-04-12 18:37:20 -03:00
Hugo Parente Lima
f4c941bdad Add hack to find QtMultimedia module.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Reviewer: Renato Araújo <renato.filho@openbossa.org>
2010-04-12 17:30:05 -03:00
Hugo Parente Lima
1d90691a00 Fix modified type of QAbstractVideoBuffer::map method. 2010-04-12 17:30:02 -03:00
Hugo Parente Lima
7a3f28e1bf Do not throw an OverflowError on QString.number(-1). 2010-04-12 17:30:02 -03:00
Hugo Lima
7462401423 Install QtMultimedia header file. 2010-04-12 17:30:01 -03:00
Hugo Lima
bbb1b7ef98 Fix CMakeLists and typesystem of qtmultimedia to use the right typesystem file from QtGui. 2010-04-12 17:30:01 -03:00
Hugo Lima
354b8b6cea QtMultimedia doesn't exists in versions prior to 4.6, so we dont need to check if we had Qt4.6 to add specific Qt4.6 files. 2010-04-12 17:30:01 -03:00
Carlos Goncalves
3ddaabdefe Initial QtMultimedia bindings 2010-04-12 17:30:01 -03:00
Renato Filho
542095e1ee Fixed signal emission with pythonic signalture.
Created unittest.

Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-04-12 16:04:40 -03:00
Thomas Berg
9ca3e6148a Use '&&' instead of 'and'.
The 'and' keyword is not supported by msvc.

Reviewer: Anderson Lizardo <anderson.lizardo@openbossa.org>
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
2010-04-12 14:50:44 -03:00
Thomas Berg
7127770c64 Use heap allocation for array with unknown size.
With msvc, arrays can only allocated on the stack if the size
is known at compile time.
2010-04-10 06:21:42 +02:00
Hugo Lima
ce69493714 Initial bindings for QtXmlPatterns.
Reviewer: Renato Araújo <renato.filho@openbossa.org>
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
2010-04-09 18:29:04 -03:00
Hugo Parente Lima
f9e2b8a5c5 Suppress some known warnings from apiextractor. 2010-04-09 18:23:48 -03:00
Hugo Parente Lima
4d699fd85d Remove warnings about deprecated const char* to char* conversions. 2010-04-09 18:23:41 -03:00
Hugo Parente Lima
9498ae4612 Initial bindings for QtHelp
Reviewer: Renato Araújo <renato.filho@openbossa.org>
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
2010-04-09 18:18:17 -03:00
Lauro Neto
965a16322b Adding test for multiple QObject inheritance
Reviewer: Hugo Lima <hugo.lima@openbossa.org>
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
2010-04-09 17:58:09 -03:00
Hugo Parente Lima
fbf8774f58 Fix bug#200 "Add support to disable the binding generation of some modules."
Reviewer: Bruno Araújo <bruno.araujo@openbossa.org>
Reviewer: Anderson Lizardo <anderson.lizardo@openbossa.org>
2010-04-08 17:45:10 -03:00
Hugo Parente Lima
f8907f4e4e Fix bug#210, "Can't connect generic callable objects as a slot".
Reviewer: Bruno Araújo <bruno.araujo@openbossa.org>
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
2010-04-08 17:14:14 -03:00
Hugo Parente Lima
bd8d5dabb3 Small optimization in QObject::receivers
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
2010-04-06 19:12:55 -03:00
Hugo Parente Lima
fa9a91b59e QStrign uses the same hash function of str/unicode objects. 2010-04-06 19:11:16 -03:00
Hugo Parente Lima
fc08b88781 Fix QObject::connect(sender, signal, slot). 2010-04-06 19:11:15 -03:00
Hugo Parente Lima
9f9c1aed52 Better warning message when the signal emission fail. 2010-04-06 19:11:15 -03:00
Hugo Parente Lima
a5b2237ee0 None is convertible to QString, the result is a QString where QString.isNull is true. 2010-04-06 19:11:11 -03:00
Hugo Lima
826678cb91 Do not handle QVariant user types as Python objects, only the real Python objects.
Reviewer: Anderson Lizardo <anderson.lizardo@openbossa.org>
Reviewer: Bruno Araújo <bruno.araujo@openbossa.org>
2010-04-06 17:11:24 -03:00
Hugo Lima
9b338f9857 QVariant.toList returns a list when it contains a python sequence. 2010-04-05 14:36:06 -03:00
Hugo Lima
956d6fd530 Fix some issues with QVariant, including the QAbstractKinectScroller one. 2010-04-05 14:36:01 -03:00
Marcelo Lira
77c2be562b Extended QMatrix test with QPoint reverse multiplication.
Reviewed by Anderson Lizardo <anderson.lizardo@openbossa.org>
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
2010-03-31 16:49:21 -03:00
Anderson Lizardo
96e7b2db77 QEasingCurve::setCustomType typesystem workaround
Due to bug #201, typesystem signatures that take pointer to function
types are incorrectly expanded.

To workaround this bug, the typesystem signature for
QEasingCurve::setCustomType removal is:

<modify-function signature="setCustomType(double)" remove="all"/>

But for ARM, this same workaround does not work, and has to be:

<modify-function signature="setCustomType(float)" remove="all"/>

This is probably due to how apiextractor/shiboken is incorrectly
expanding the pointer to function signature. To remove setCustomType on
ARM (and thus allow the build to succeed), this commit adds both
signatures.

This is a temporary fix just while bug #201 is not fixed.

Reviewed-by: Lauro Moura <lauro.neto@openbossa.org>
Reviewed-by: Bruno Araujo <bruno.araujo@openbossa.org>
2010-03-31 14:33:21 -04:00
Anderson Lizardo
bf8b1e7d38 QtNetwork/typesystem_network.xml updates
Reviewed-by: Lauro Moura <lauro.neto@openbossa.org>
Reviewed-by: Hugo Lima <hugo.lima@openbossa.org>
2010-03-31 14:31:25 -04:00
Hugo Lima
5bd8147956 Adapt to changes in libshiboken
Reviewer: Anderson Lizardo <anderson.lizardo@openbossa.org>
Reviewer: Bruno Araújo <bruno.araujo@openbossa.org>
2010-03-31 15:09:15 -03:00
Hugo Lima
718dd06ecd Fix QObject::findChildren and QObject::findChild methods.
QUiTools unit tests uses these functions and will fail without this patch.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Reviewer: Anderson Lizardo <anderson.lizardo@openbossa.org>
2010-03-31 11:23:45 -03:00
Hugo Lima
771c2be893 Initial bindings for QtUiTools. 2010-03-30 17:15:59 -03:00
Hugo Lima
7107c2fef5 Removed unused/duplicated test due to a typo. 2010-03-30 11:55:22 -03:00
Marcelo Lira
a35a058834 Removes the user added copy constructor for QPoint class.
API Extractor already provides it.

Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Lauro Moura <lauro.neto@openbossa.org>
2010-03-26 20:39:19 -03:00
Marcelo Lira
17730b9af5 Added missing enums to QtOpenGL type system. 2010-03-26 18:26:12 -03:00
Hugo Lima
2e1a48c831 Version bump
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
2010-03-23 19:23:57 -03:00
Hugo Lima
d2b3cf4690 Fix file name of generated source package. 2010-03-23 19:23:01 -03:00
1487 changed files with 91640 additions and 9629 deletions

2
.gitattributes vendored Normal file
View file

@ -0,0 +1,2 @@
.gitignore export-ignore
.gitattributes export-ignore

View file

@ -1,38 +1,81 @@
include(icecc.cmake) # this must be the first line! include(cmake/Macros/icecc.cmake) # this must be the first line!
project(pysidebindings) project(pysidebindings)
cmake_minimum_required(VERSION 2.6) cmake_minimum_required(VERSION 2.6)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Macros/
set(CMAKE_CXX_FLAGS_RELEASE "-Wall -DNDEBUG -Os -Wl,-O1 -Wl,--hash-style=gnu -Wno-strict-aliasing -fvisibility=hidden") ${CMAKE_MODULE_PATH})
set(CMAKE_CXX_FLAGS_DEBUG "-g -fno-common -Wall -fno-strict-aliasing -fvisibility=hidden") find_package(Shiboken 1.1.1 REQUIRED)
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
option(AVOID_PROTECTED_HACK "Avoid protected hack on generated bindings." FALSE)
if (AVOID_PROTECTED_HACK OR WIN32)
add_definitions(-DAVOID_PROTECTED_HACK)
message(STATUS "Avoiding protected hack!")
endif()
find_package(PythonLibs REQUIRED)
find_package(PythonInterp REQUIRED)
find_package(Shiboken REQUIRED)
find_package(Qt4 4.5.0 REQUIRED) find_package(Qt4 4.5.0 REQUIRED)
find_file(GL_H "gl.h" PATH_SUFFIXES "GL")
include(FindQt4Extra)
set(BINDING_NAME PySide) set(XVFB_EXEC "")
set(BINDING_API_MAJOR_VERSION "0") option(USE_XVFB "Uses xvfb-run with the unit tests to avoid QtGui tests popping windows on the screen." FALSE)
set(BINDING_API_MINOR_VERSION "3") if(USE_XVFB)
set(BINDING_API_MICRO_VERSION "0") find_program(XVFB_RUN NAMES xvfb-run)
set(BINDING_API_VERSION "${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}.${BINDING_API_MICRO_VERSION}") if (NOT ${XVFB_RUN} MATCHES "XVFB_RUN-NOTFOUND")
set(XVFB_EXEC ${XVFB_RUN} -a)
message(STATUS "Using xvfb-run to perform QtGui tests.")
endif()
endif()
option(BUILD_TESTS "Build tests." TRUE)
option(ENABLE_VERSION_SUFFIX "Used to use current version in suffix to generated files. This is used to allow multiples versions installed simultaneous." FALSE)
set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" ) set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" )
set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib${LIB_SUFFIX})" FORCE) set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib${LIB_SUFFIX})" FORCE)
if(CMAKE_HOST_APPLE)
set(ALTERNATIVE_QT_INCLUDE_DIR "" CACHE PATH "The Alternative value to QT_INCLUDE_DIR. Necessary to fix bug on cmake 2.8 MACOS users")
endif()
if (NOT CMAKE_BUILD_TYPE) if(MSVC)
set(CMAKE_CXX_FLAGS "/Zc:wchar_t- /GR /EHsc /DNOCOLOR /DWIN32 /D_WINDOWS /D_SCL_SECURE_NO_WARNINGS")
else()
if(CMAKE_HOST_UNIX AND NOT CYGWIN)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fvisibility=hidden -Wno-strict-aliasing")
endif()
set(CMAKE_CXX_FLAGS_DEBUG "-g")
option(ENABLE_GCC_OPTIMIZATION "Enable specific GCC flags to optimization library size and performance. Only available on Release Mode" 0)
if(ENABLE_GCC_OPTIMIZATION)
set(CMAKE_BUILD_TYPE Release) set(CMAKE_BUILD_TYPE Release)
set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -Os -Wl,-O1")
if(NOT CMAKE_HOST_APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--hash-style=gnu")
endif()
endif()
if(CMAKE_HOST_APPLE)
if (NOT QT_INCLUDE_DIR)
set(QT_INCLUDE_DIR "/Library/Frameworks")
endif()
if(ALTERNATIVE_QT_INCLUDE_DIR)
set(QT_INCLUDE_DIR ${ALTERNATIVE_QT_INCLUDE_DIR})
endif()
string(REPLACE " " ":" QT_INCLUDE_DIR ${QT_INCLUDE_DIR})
endif()
endif()
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE ${SHIBOKEN_BUILD_TYPE})
endif()
set(BINDING_NAME PySide)
set(BINDING_API_MAJOR_VERSION "1")
set(BINDING_API_MINOR_VERSION "1")
set(BINDING_API_MICRO_VERSION "1")
set(BINDING_API_RELEASE_LEVEL "final") # alpha, beta, rc, or final
set(BINDING_API_SERIAL 1) # leave as 0 when release level is final
set(BINDING_API_VERSION "${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}.${BINDING_API_MICRO_VERSION}" CACHE STRING "PySide version" FORCE)
if (BINDING_API_RELEASE_LEVEL STREQUAL "final")
set(BINDING_API_VERSION_FULL "${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}.${BINDING_API_MICRO_VERSION}"
CACHE STRING "PySide version [full]" FORCE)
else()
set(BINDING_API_VERSION_FULL "${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}.${BINDING_API_MICRO_VERSION}~${BINDING_API_RELEASE_LEVEL}${BINDING_API_SERIAL}"
CACHE STRING "PySide version [full]" FORCE)
endif()
set(PYSIDE_QT_VERSION "${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}" CACHE STRING "Qt version used to compile PySide" FORCE)
if(ENABLE_VERSION_SUFFIX)
set(pyside_SUFFIX "-${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}")
endif() endif()
include(${QT_USE_FILE}) include(${QT_USE_FILE})
@ -40,12 +83,42 @@ if (${QTVERSION} VERSION_LESS 4.5.0)
message(FATAL_ERROR "You need Qt4.5, found ${QTVERSION}.") message(FATAL_ERROR "You need Qt4.5, found ${QTVERSION}.")
endif() endif()
set(BINDING_VERSION ${BINDING_API_VERSION}.${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}) # Configure OS support
find_program(GENERATOR generatorrunner REQUIRED) set(ENABLE_X11 "0")
set(ENABLE_MAC "0")
if (NOT GENERATOR) set(ENABLE_WIN "0")
message(FATAL_ERROR "You need to specify GENERATOR variable (-DGENERATOR=value)") set(ENABLE_SIMULATOR "0")
if(Q_WS_X11)
set(ENABLE_X11 "1")
if(Q_WS_MAEMO_5)
set(AUTO_OS "maemo")
else()
set(AUTO_OS "x11")
endif()
elseif(Q_WS_MAC)
set(ENABLE_MAC "1")
set(AUTO_OS "mac")
elseif(Q_WS_WIN)
set(ENABLE_WIN "1")
set(AUTO_OS "win")
elseif(Q_WS_SIMULATOR)
set(ENABLE_SIMULATOR "1")
set(AUTO_OS "simulator")
else()
message(FATAL_ERROR "OS not supported")
endif() endif()
message(STATUS "Detected OS: ${AUTO_OS}")
if (WIN32)
set(PATH_SEP "\;")
else()
set(PATH_SEP ":")
endif()
# Define supported Qt Version
set(SUPPORTED_QT_VERSION "${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}")
set(BINDING_VERSION ${BINDING_API_VERSION}.${QT_VERSION_MAJOR}.${QT_VERSION_MINOR})
# uninstall target # uninstall target
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake" configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake"
@ -55,30 +128,52 @@ add_custom_target(uninstall "${CMAKE_COMMAND}"
-P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-qt${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}+${BINDING_API_VERSION}) set(ARCHIVE_NAME pyside-qt${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}+${BINDING_API_VERSION_FULL})
add_custom_target(dist add_custom_target(dist
COMMAND mkdir -p "${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}" && COMMAND mkdir -p "${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}" &&
git log > "${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}/ChangeLog" && git log > "${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}/ChangeLog" &&
git archive --prefix=${ARCHIVE_NAME}/ HEAD --format=tar -o "${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar" && git archive --prefix=${ARCHIVE_NAME}/ HEAD --format=tar --output="${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar" &&
tar -C "${CMAKE_BINARY_DIR}" --owner=root --group=root -r "${ARCHIVE_NAME}/ChangeLog" -f "${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar" && tar -C "${CMAKE_BINARY_DIR}" --owner=root --group=root -r "${ARCHIVE_NAME}/ChangeLog" -f "${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar" &&
bzip2 -f9 "${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar" && bzip2 -f9 "${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar" &&
echo "Source package created at ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2.\n" echo "Source package created at ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2.\n"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
execute_process( if (NOT SITE_PACKAGE)
COMMAND ${PYTHON_EXECUTABLE} -c "from distutils import sysconfig; \\ execute_process(
print sysconfig.get_python_lib(1,0,prefix='${CMAKE_INSTALL_PREFIX}')" COMMAND ${SHIBOKEN_PYTHON_INTERPRETER} -c "from distutils import sysconfig; \\
print(sysconfig.get_python_lib(1,0,prefix='${CMAKE_INSTALL_PREFIX}'))"
OUTPUT_VARIABLE SITE_PACKAGE OUTPUT_VARIABLE SITE_PACKAGE
OUTPUT_STRIP_TRAILING_WHITESPACE) OUTPUT_STRIP_TRAILING_WHITESPACE)
if (NOT SITE_PACKAGE) if (NOT SITE_PACKAGE)
message(FATAL_ERROR "Could not detect Python module installation directory.") message(FATAL_ERROR "Could not detect Python module installation directory.")
elseif (APPLE)
message(STATUS "!!! The generated bindings will be installed on ${SITE_PACKAGE}, is it right!?")
endif()
endif() endif()
set(GENERATOR_EXTRA_FLAGS --generatorSet=shiboken --enable-parent-ctor-heuristic --enable-pyside-extensions --enable-return-value-heuristic) set(GENERATOR_EXTRA_FLAGS --generator-set=shiboken --enable-parent-ctor-heuristic --enable-pyside-extensions --enable-return-value-heuristic --use-isnull-as-nb_nonzero)
if(WIN32 OR DEFINED AVOID_PROTECTED_HACK)
enable_testing() message(STATUS "PySide will be generated avoiding the protected hack!")
set(GENERATOR_EXTRA_FLAGS ${GENERATOR_EXTRA_FLAGS} --avoid-protected-hack)
add_definitions(-DAVOID_PROTECTED_HACK)
else()
message(STATUS "PySide will be generated using the protected hack!")
endif()
add_subdirectory(libpyside) add_subdirectory(libpyside)
if(QT_QTUITOOLS_FOUND AND QT_QTDESIGNER_FOUND)
add_subdirectory(plugins)
endif()
# project directories # project directories
add_subdirectory(${BINDING_NAME}) add_subdirectory(PySide)
add_subdirectory(tests) if (BUILD_TESTS)
enable_testing()
add_subdirectory(tests)
endif ()
find_program(DOT_EXEC dot)
if (QT_SRC_DIR AND DOT_EXEC)
add_subdirectory(doc)
else ()
message(STATUS "QT_SRC_DIR variable not set or graphviz not found, apidoc generation targets disabled.")
endif()

View file

@ -1,34 +1,13 @@
project(pyside) project(pyside)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/__init__.py"
DESTINATION "${SITE_PACKAGE}/${BINDING_NAME}")
macro(execute_generator module sources typesystem_path) include(PySideModules)
add_custom_command(OUTPUT ${${sources}}
COMMAND ${GENERATOR} ${GENERATOR_EXTRA_FLAGS}
${pyside_SOURCE_DIR}/global.h
--include-paths=${pyside_SOURCE_DIR}:${QT_INCLUDE_DIR}
--typesystem-paths=${pyside_SOURCE_DIR}:${typesystem_path}
--output-directory=${CMAKE_CURRENT_BINARY_DIR}
--license-file=${CMAKE_CURRENT_SOURCE_DIR}/../licensecomment.txt
${CMAKE_CURRENT_SOURCE_DIR}/typesystem_${module}.xml
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Running generator for ${module}..."
)
endmacro(execute_generator)
# Only add subdirectory if the associated Qt module is found. # Configure include based on platform
macro(HAS_QT_MODULE var name) configure_file("${CMAKE_CURRENT_SOURCE_DIR}/global.h.in"
IF (${var}) "${CMAKE_CURRENT_BINARY_DIR}/pyside_global.h" @ONLY)
add_subdirectory(${name})
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_BINARY_DIR}/${name}/${name}${CMAKE_SHARED_MODULE_SUFFIX}"
"${CMAKE_BINARY_DIR}/PySide/${name}${CMAKE_SHARED_MODULE_SUFFIX}")
else()
message(STATUS "${name} NOT found. ${name} support disabled.")
endif()
endmacro(HAS_QT_MODULE)
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_SOURCE_DIR}/__init__.py" configure_file("${CMAKE_CURRENT_SOURCE_DIR}/__init__.py.in"
"${CMAKE_BINARY_DIR}/PySide/__init__.py") "${CMAKE_CURRENT_BINARY_DIR}/__init__.py" @ONLY)
HAS_QT_MODULE(QT_QTCORE_FOUND QtCore) HAS_QT_MODULE(QT_QTCORE_FOUND QtCore)
HAS_QT_MODULE(QT_QTGUI_FOUND QtGui) HAS_QT_MODULE(QT_QTGUI_FOUND QtGui)
@ -39,3 +18,23 @@ HAS_QT_MODULE(QT_QTXML_FOUND QtXml)
HAS_QT_MODULE(QT_QTTEST_FOUND QtTest) HAS_QT_MODULE(QT_QTTEST_FOUND QtTest)
HAS_QT_MODULE(QT_QTOPENGL_FOUND QtOpenGL) HAS_QT_MODULE(QT_QTOPENGL_FOUND QtOpenGL)
HAS_QT_MODULE(QT_QTSQL_FOUND QtSql) HAS_QT_MODULE(QT_QTSQL_FOUND QtSql)
if(QT_QTDESIGNER_FOUND)
HAS_QT_MODULE(QT_QTUITOOLS_FOUND QtUiTools)
endif()
HAS_QT_MODULE(QT_QTHELP_FOUND QtHelp)
HAS_QT_MODULE(QT_QTXMLPATTERNS_FOUND QtXmlPatterns)
HAS_QT_MODULE(QT_QTMAEMO5_FOUND QtMaemo5)
HAS_QT_MODULE(QT_QTSCRIPT_FOUND QtScript)
HAS_QT_MODULE(QT_QTSCRIPTTOOLS_FOUND QtScriptTools)
HAS_QT_MODULE(QT_QTMULTIMEDIA_FOUND QtMultimedia)
HAS_QT_MODULE(QT_PHONON_FOUND phonon)
HAS_QT_MODULE(QT_QTDECLARATIVE_FOUND QtDeclarative)
# install
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/__init__.py"
DESTINATION "${SITE_PACKAGE}/${BINDING_NAME}${pyside_SUFFIX}")
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_templates.xml
DESTINATION share/PySide${pyside_SUFFIX}/typesystems)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pyside_global.h
DESTINATION include/${BINDING_NAME}${pyside_SUFFIX})

View file

@ -1,5 +1,7 @@
project(QtCore) project(QtCore)
set(QtCore_gluecode "${CMAKE_CURRENT_SOURCE_DIR}/glue/qeasingcurve_glue.cpp")
if (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6) if (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6)
set (QtCore_46_SRC ) set (QtCore_46_SRC )
else() else()
@ -26,6 +28,22 @@ else()
${CMAKE_CURRENT_BINARY_DIR}/${BINDING_NAME}/QtCore/qvariantanimation_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/${BINDING_NAME}/QtCore/qvariantanimation_wrapper.cpp
) )
endif() endif()
if (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 7)
set (QtCore_47_SRC )
else()
set(QtCore_47_SRC
${CMAKE_CURRENT_BINARY_DIR}/${BINDING_NAME}/QtCore/qelapsedtimer_wrapper.cpp
)
endif()
if(ENABLE_WIN)
set(SPECIFIC_OS_FILES
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/msg_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/point_wrapper.cpp
)
else()
set(SPECIFIC_OS_FILES "")
endif()
set(QtCore_SRC set(QtCore_SRC
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qabstracteventdispatcher_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qabstracteventdispatcher_wrapper.cpp
@ -40,7 +58,6 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qbitarray_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qbuffer_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qbuffer_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qbytearray_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qbytearray_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qbytearraymatcher_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qbytearraymatcher_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qchar_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qchildevent_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qchildevent_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qcoreapplication_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qcoreapplication_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qcryptographichash_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qcryptographichash_wrapper.cpp
@ -52,6 +69,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qdiriterator_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qdynamicpropertychangeevent_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qdynamicpropertychangeevent_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qevent_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qevent_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qeventloop_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qeventloop_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qfactoryinterface_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qfile_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qfile_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qfileinfo_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qfileinfo_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qfilesystemwatcher_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qfilesystemwatcher_wrapper.cpp
@ -59,8 +77,6 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qfsfileengine_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qgenericargument_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qgenericargument_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qgenericreturnargument_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qgenericreturnargument_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qiodevice_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qiodevice_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qlatin1char_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qlatin1string_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qlibraryinfo_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qlibraryinfo_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qline_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qline_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qlinef_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qlinef_wrapper.cpp
@ -68,6 +84,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qlocale_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qmetaclassinfo_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qmetaclassinfo_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qmetaenum_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qmetaenum_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qmetaproperty_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qmetaproperty_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qmetamethod_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qmetaobject_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qmetaobject_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qmimedata_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qmimedata_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qmodelindex_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qmodelindex_wrapper.cpp
@ -75,6 +92,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qmutex_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qmutexlocker_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qmutexlocker_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qobject_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qobject_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qpersistentmodelindex_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qpersistentmodelindex_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qpluginloader_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qpoint_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qpoint_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qpointf_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qpointf_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qprocess_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qprocess_wrapper.cpp
@ -84,16 +102,14 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qrect_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qrectf_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qrectf_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qregexp_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qregexp_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qresource_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qresource_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qrunnable_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qsemaphore_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qsemaphore_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qsettings_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qsettings_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qsignalmapper_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qsignalmapper_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qsize_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qsize_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qsizef_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qsizef_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qsocketnotifier_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qsocketnotifier_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qstring_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qsysinfo_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qstringlist_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qstringmatcher_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qstringref_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qsystemlocale_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qsystemlocale_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qsystemsemaphore_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qsystemsemaphore_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qt_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qt_wrapper.cpp
@ -108,6 +124,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qtextencoder_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qtextstream_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qtextstream_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qtextstreammanipulator_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qtextstreammanipulator_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qthread_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qthread_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qthreadpool_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qtime_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qtime_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qtimeline_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qtimeline_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qtimer_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qtimer_wrapper.cpp
@ -115,7 +132,6 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qtimerevent_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qtranslator_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qtranslator_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qurl_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qurl_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/quuid_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/quuid_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qvariant_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qwaitcondition_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qwaitcondition_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qwritelocker_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qwritelocker_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qxmlstreamattribute_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qxmlstreamattribute_wrapper.cpp
@ -126,30 +142,32 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qxmlstreamnamespacedeclaration_wrapper
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qxmlstreamnotationdeclaration_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qxmlstreamnotationdeclaration_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qxmlstreamreader_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qxmlstreamreader_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qxmlstreamwriter_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qxmlstreamwriter_wrapper.cpp
${QtCore_46_SRC} ${QtCore_46_SRC}
${QtCore_47_SRC}
${SPECIFIC_OS_FILES}
) )
execute_generator(core QtCore_SRC "") configure_file("${CMAKE_CURRENT_SOURCE_DIR}/typesystem_core.xml.in"
"${CMAKE_CURRENT_BINARY_DIR}/typesystem_core.xml" @ONLY)
include_directories(${CMAKE_CURRENT_SOURCE_DIR} set(QtCore_typesystem_path "${QtCore_SOURCE_DIR}")
set(QtCore_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}/${BINDING_NAME}/QtCore/ ${CMAKE_CURRENT_BINARY_DIR}/${BINDING_NAME}/QtCore/
${QT_INCLUDE_DIR} ${QT_INCLUDE_DIR}
${SHIBOKEN_INCLUDE_DIR} ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR} ${libpyside_SOURCE_DIR}
${PYTHON_INCLUDE_PATH} ${SHIBOKEN_PYTHON_INCLUDE_DIR})
) set(QtCore_libraries pyside
add_library(QtCore MODULE ${QtCore_SRC}) ${SHIBOKEN_PYTHON_LIBRARIES}
set_property(TARGET QtCore PROPERTY PREFIX "")
target_link_libraries(QtCore
pyside
${PYTHON_LIBRARIES}
${SHIBOKEN_LIBRARY} ${SHIBOKEN_LIBRARY}
${QT_QTCORE_LIBRARY} ${QT_QTCORE_LIBRARY})
)
# install create_pyside_module(QtCore
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/QtCore.so QtCore_include_dirs
DESTINATION ${SITE_PACKAGE}/${BINDING_NAME}) QtCore_libraries
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/pyside_qtcore_python.h ""
DESTINATION include/PySide/QtCore/) QtCore_typesystem_path
QtCore_SRC
QtCore_gluecode
${CMAKE_CURRENT_BINARY_DIR}/typesystem_core.xml)

View file

@ -15,10 +15,10 @@ static Py_ssize_t SbkQByteArray_segcountproc(PyObject* self, Py_ssize_t* lenp)
static Py_ssize_t SbkQByteArray_readbufferproc(PyObject* self, Py_ssize_t segment, void** ptrptr) static Py_ssize_t SbkQByteArray_readbufferproc(PyObject* self, Py_ssize_t segment, void** ptrptr)
{ {
if (segment || Shiboken::cppObjectIsInvalid(self)) if (segment || !Shiboken::Object::isValid(self))
return -1; return -1;
QByteArray* cppSelf = Converter<QByteArray*>::toCpp(self); QByteArray* cppSelf = %CONVERTTOCPP[QByteArray*](self);
*ptrptr = reinterpret_cast<void*>(cppSelf->data()); *ptrptr = reinterpret_cast<void*>(cppSelf->data());
return cppSelf->size(); return cppSelf->size();
} }

View file

@ -2,40 +2,23 @@
static int QCoreApplicationArgCount; static int QCoreApplicationArgCount;
static char** QCoreApplicationArgValues; static char** QCoreApplicationArgValues;
/** void QCoreApplication_constructor(PyObject* self, PyObject* args, QCoreApplicationWrapper** cptr)
* Called at QtCore module exit
*/
void DeleteQCoreApplicationAtExit() {
if (QCoreApplication::instance()) {
delete QCoreApplication::instance();
for (int i = 0; i < QCoreApplicationArgCount; ++i)
delete[] QCoreApplicationArgValues[i];
}
}
int SbkQCoreApplication_Init(PyObject* self, PyObject* args, PyObject*)
{ {
if (QCoreApplication::instance()) { if (QCoreApplication::instance()) {
PyErr_SetString(PyExc_RuntimeError, "A QCoreApplication instance already exists."); PyErr_SetString(PyExc_RuntimeError, "A QCoreApplication instance already exists.");
return -1; return;
} }
int numArgs = PyTuple_GET_SIZE(args); int numArgs = PyTuple_GET_SIZE(args);
if (numArgs != 1) { if (numArgs != 1
|| !Shiboken::sequenceToArgcArgv(PyTuple_GET_ITEM(args, 0), &QCoreApplicationArgCount, &QCoreApplicationArgValues, "PySideApp")) {
PyErr_BadArgument(); PyErr_BadArgument();
return -1; return;
} }
if (!PySequenceToArgcArgv(PyTuple_GET_ITEM(args, 0), &QCoreApplicationArgCount, &QCoreApplicationArgValues, "PySideApp")) { *cptr = new QCoreApplicationWrapper(QCoreApplicationArgCount, QCoreApplicationArgValues);
PyErr_BadArgument();
return -1;
}
SbkBaseWrapper_setCptr(self, new QCoreApplication(QCoreApplicationArgCount, QCoreApplicationArgValues));
SbkBaseWrapper_setValidCppObject(self, 1);
Shiboken::BindingManager::instance().registerWrapper(reinterpret_cast<SbkBaseWrapper*>(self));
Shiboken::Object::releaseOwnership(reinterpret_cast<SbkObject*>(self));
PySide::registerCleanupFunction(&PySide::destroyQCoreApplication);
Py_INCREF(self); Py_INCREF(self);
Py_AtExit(DeleteQCoreApplicationAtExit);
return 1;
} }

View file

@ -0,0 +1,120 @@
#include <Python.h>
#include <shiboken.h>
#include <pysideweakref.h>
#include <QEasingCurve>
#include "glue/qeasingcurve_glue.h"
#define __ECF_ATT_NAME__ "__ecf__"
#define MAX_CUSTOM_FUNCTIONS 10
static void deleteData(void* data);
struct CustomFunctionsData
{
static CustomFunctionsData m_list[MAX_CUSTOM_FUNCTIONS];
PySideEasingCurveFunctor* m_obj;
QEasingCurve::EasingFunction m_func;
};
CustomFunctionsData CustomFunctionsData::m_list[MAX_CUSTOM_FUNCTIONS];
template<int N>
struct CustomFunctions
{
static void init()
{
CustomFunctionsData data;
data.m_obj = 0;
data.m_func = &CustomFunctions<N>::callback;
CustomFunctionsData::m_list[N] = data;
CustomFunctions<N-1>::init();
}
static qreal callback(qreal v)
{
return (*CustomFunctionsData::m_list[N].m_obj)(v);
}
};
template<>
struct CustomFunctions<0>
{
static void init()
{
CustomFunctionsData data;
data.m_obj = 0;
data.m_func = &CustomFunctions<0>::callback;
CustomFunctionsData::m_list[0] = data;
}
static qreal callback(qreal v)
{
return (*CustomFunctionsData::m_list[0].m_obj)(v);
}
};
void deleteData(void* data)
{
delete (PySideEasingCurveFunctor*)(data);
}
void PySideEasingCurveFunctor::init()
{
CustomFunctions<MAX_CUSTOM_FUNCTIONS-1>::init();
}
QEasingCurve::EasingFunction PySideEasingCurveFunctor::createCustomFuntion(PyObject* parent, PyObject* pyFunc)
{
for(int i=0; i < MAX_CUSTOM_FUNCTIONS; i++) {
CustomFunctionsData& data = CustomFunctionsData::m_list[i];
if (data.m_obj == 0) {
data.m_obj = new PySideEasingCurveFunctor(i, parent, pyFunc);
return data.m_func;
}
}
//PyErr_Format(PyExc_RuntimeError, "PySide only supports %d custom functions simultaneously.", MAX_CUSTOM_FUNCTIONS);
return 0;
}
PySideEasingCurveFunctor::~PySideEasingCurveFunctor()
{
CustomFunctionsData::m_list[m_index].m_obj = 0;
PyObject_SetAttrString(m_parent, __ECF_ATT_NAME__, Py_None);
}
qreal PySideEasingCurveFunctor::operator()(qreal progress)
{
Shiboken::GilState state;
PyObject* args = Py_BuildValue("(f)", progress);
PyObject* result = PyObject_CallObject(m_func, args);
qreal cppResult = 0.0;
if (result) {
Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter<qreal>(), result, &cppResult);
Py_DECREF(result);
}
Py_DECREF(args);
return cppResult;
}
PyObject* PySideEasingCurveFunctor::callable()
{
Py_INCREF(m_func);
return m_func;
}
PyObject* PySideEasingCurveFunctor::callable(PyObject* parent)
{
return PyObject_GetAttrString(parent, __ECF_ATT_NAME__);
}
PySideEasingCurveFunctor::PySideEasingCurveFunctor(int index, PyObject* parent, PyObject* pyFunc)
: m_parent(parent), m_func(pyFunc), m_index(index)
{
PyObject_SetAttrString(m_parent, __ECF_ATT_NAME__, m_func);
PySide::WeakRef::create(m_parent, deleteData, this);
}

View file

@ -0,0 +1,27 @@
#ifndef __QEASINGCURVE_GLUE__
#define __QEASINGCURVE_GLUE__
#include <Python.h>
#include <QEasingCurve>
class PySideEasingCurveFunctor
{
public:
static void init();
static QEasingCurve::EasingFunction createCustomFuntion(PyObject* parent, PyObject* pyFunc);
qreal operator()(qreal progress);
PyObject* callable(); //Return New reference
static PyObject* callable(PyObject* parent); //Return New reference
~PySideEasingCurveFunctor();
private:
PyObject* m_parent;
PyObject* m_func;
int m_index;
PySideEasingCurveFunctor(int index, PyObject* parent, PyObject *pyFunc);
};
#endif

View file

@ -1,24 +1,46 @@
static bool getReceiver(PyObject *callback, QObject **receiver, PyObject **self) static bool isDecorator(PyObject* method, PyObject* self)
{ {
Shiboken::AutoDecRef methodName(PyObject_GetAttrString(method, "__name__"));
if (!PyObject_HasAttr(self, methodName))
return true;
Shiboken::AutoDecRef otherMethod(PyObject_GetAttr(self, methodName));
return reinterpret_cast<PyMethodObject*>(otherMethod.object())->im_func != \
reinterpret_cast<PyMethodObject*>(method)->im_func;
}
static bool getReceiver(QObject *source, const char* signal, PyObject* callback, QObject** receiver, PyObject** self, QByteArray* callbackSig)
{
bool forceGlobalReceiver = false;
if (PyMethod_Check(callback)) { if (PyMethod_Check(callback)) {
*self = PyMethod_GET_SELF(callback); *self = PyMethod_GET_SELF(callback);
if (SbkQObject_Check(*self)) if (%CHECKTYPE[QObject*](*self))
*receiver = Converter<QObject*>::toCpp(*self); *receiver = %CONVERTTOCPP[QObject*](*self);
forceGlobalReceiver = isDecorator(callback, *self);
} else if (PyCFunction_Check(callback)) { } else if (PyCFunction_Check(callback)) {
*self = PyCFunction_GET_SELF(callback); *self = PyCFunction_GET_SELF(callback);
if (*self && SbkQObject_Check(*self)) if (*self && %CHECKTYPE[QObject*](*self))
*receiver = Converter<QObject*>::toCpp(*self); *receiver = %CONVERTTOCPP[QObject*](*self);
} else if (!PyFunction_Check(callback)) { } else if (PyCallable_Check(callback)) {
// Ok, just a callable object
*receiver = 0; *receiver = 0;
*self = 0; *self = 0;
qWarning() << "Invalid callback object.";
return false;
} }
bool usingGlobalReceiver = !*receiver; bool usingGlobalReceiver = !*receiver || forceGlobalReceiver;
// Check if this callback is a overwrite of a non-virtual Qt slot.
if (!usingGlobalReceiver && receiver && self) {
*callbackSig = PySide::Signal::getCallbackSignature(signal, *receiver, callback, usingGlobalReceiver).toAscii();
const QMetaObject* metaObject = (*receiver)->metaObject();
int slotIndex = metaObject->indexOfSlot(callbackSig->constData());
if (slotIndex != -1 && slotIndex < metaObject->methodOffset() && PyMethod_Check(callback))
usingGlobalReceiver = true;
}
if (usingGlobalReceiver) { if (usingGlobalReceiver) {
PySide::SignalManager& signalManager = PySide::SignalManager::instance(); PySide::SignalManager& signalManager = PySide::SignalManager::instance();
*receiver = signalManager.globalReceiver(); *receiver = signalManager.globalReceiver(source, callback);
*callbackSig = PySide::Signal::getCallbackSignature(signal, *receiver, callback, usingGlobalReceiver).toAscii();
} }
return usingGlobalReceiver; return usingGlobalReceiver;
@ -26,13 +48,17 @@ static bool getReceiver(PyObject *callback, QObject **receiver, PyObject **self)
static bool qobjectConnect(QObject* source, const char* signal, QObject* receiver, const char* slot, Qt::ConnectionType type) static bool qobjectConnect(QObject* source, const char* signal, QObject* receiver, const char* slot, Qt::ConnectionType type)
{ {
if (!PySide::checkSignal(signal)) if (!signal || !slot)
return false;
if (!PySide::Signal::checkQtSignal(signal))
return false; return false;
signal++; signal++;
PySide::SignalManager::registerMetaMethod(source, signal, QMetaMethod::Signal); if (!PySide::SignalManager::registerMetaMethod(source, signal, QMetaMethod::Signal))
return false;
bool isSignal = PySide::isSignal(slot); bool isSignal = PySide::Signal::isQtSignal(slot);
slot++; slot++;
PySide::SignalManager::registerMetaMethod(receiver, slot, isSignal ? QMetaMethod::Signal : QMetaMethod::Slot); PySide::SignalManager::registerMetaMethod(receiver, slot, isSignal ? QMetaMethod::Signal : QMetaMethod::Slot);
return QObject::connect(source, signal - 1, receiver, slot - 1, type); return QObject::connect(source, signal - 1, receiver, slot - 1, type);
@ -40,58 +66,73 @@ static bool qobjectConnect(QObject* source, const char* signal, QObject* receive
static bool qobjectConnectCallback(QObject* source, const char* signal, PyObject* callback, Qt::ConnectionType type) static bool qobjectConnectCallback(QObject* source, const char* signal, PyObject* callback, Qt::ConnectionType type)
{ {
if (!PySide::checkSignal(signal)) if (!signal || !PySide::Signal::checkQtSignal(signal))
return false; return false;
signal++; signal++;
PySide::SignalManager::registerMetaMethod(source, signal, QMetaMethod::Signal); int signalIndex = PySide::SignalManager::registerMetaMethodGetIndex(source, signal, QMetaMethod::Signal);
int signalIndex = source->metaObject()->indexOfMethod(signal); if (signalIndex == -1)
return false;
PySide::SignalManager& signalManager = PySide::SignalManager::instance(); PySide::SignalManager& signalManager = PySide::SignalManager::instance();
// Extract receiver from callback // Extract receiver from callback
QObject* receiver = 0; QObject* receiver = 0;
PyObject* self = 0; PyObject* self = 0;
bool usingGlobalReceiver = getReceiver(callback, &receiver, &self); QByteArray callbackSig;
if (receiver == 0 and self == 0) bool usingGlobalReceiver = getReceiver(source, signal, callback, &receiver, &self, &callbackSig);
if (receiver == 0 && self == 0)
return false; return false;
const QMetaObject* metaObject = receiver->metaObject(); const QMetaObject* metaObject = receiver->metaObject();
const QByteArray callbackSig = PySide::getCallbackSignature(signal, callback, usingGlobalReceiver).toAscii();
const char* slot = callbackSig.constData(); const char* slot = callbackSig.constData();
int slotIndex = metaObject->indexOfSlot(slot); int slotIndex = metaObject->indexOfSlot(slot);
if (slotIndex == -1) { if (slotIndex == -1) {
if (!usingGlobalReceiver and self and !((SbkBaseWrapper*)self)->containsCppWrapper) { if (!usingGlobalReceiver && self && !Shiboken::Object::hasCppWrapper((SbkObject*)self)) {
qWarning() << "You can't add dynamic slots on an object originated from C++."; qWarning() << "You can't add dynamic slots on an object originated from C++.";
if (usingGlobalReceiver)
signalManager.releaseGlobalReceiver(source, receiver);
return false; return false;
} }
if (usingGlobalReceiver) {
signalManager.addGlobalSlot(slot, callback); if (usingGlobalReceiver)
} else { slotIndex = signalManager.globalReceiverSlotIndex(receiver, slot);
PySide::SignalManager::registerMetaMethod(receiver, slot, QMetaMethod::Slot); else
slotIndex = PySide::SignalManager::registerMetaMethodGetIndex(receiver, slot, QMetaMethod::Slot);
if (slotIndex == -1) {
if (usingGlobalReceiver)
signalManager.releaseGlobalReceiver(source, receiver);
return false;
} }
slotIndex = metaObject->indexOfSlot(slot);
} }
if (QMetaObject::connect(source, signalIndex, receiver, slotIndex, type)) { if (QMetaObject::connect(source, signalIndex, receiver, slotIndex, type)) {
// FIXME: Need to cast to QObjectWrapper* and call the public version of connectNotify
// when avoiding the protected hack.
#ifndef AVOID_PROTECTED_HACK
source->connectNotify(signal);
#else
reinterpret_cast<QObjectWrapper*>(source)->connectNotify_protected(signal);
#endif
if (usingGlobalReceiver) if (usingGlobalReceiver)
signalManager.globalReceiverConnectNotify(source, slotIndex); signalManager.notifyGlobalReceiver(receiver);
#ifndef AVOID_PROTECTED_HACK
source->connectNotify(signal - 1);
#else
// Need to cast to QObjectWrapper* and call the public version of
// connectNotify when avoiding the protected hack.
reinterpret_cast<QObjectWrapper*>(source)->connectNotify(signal - 1);
#endif
return true; return true;
} }
if (usingGlobalReceiver)
signalManager.releaseGlobalReceiver(source, receiver);
return false; return false;
} }
static bool qobjectDisconnectCallback(QObject* source, const char* signal, PyObject* callback) static bool qobjectDisconnectCallback(QObject* source, const char* signal, PyObject* callback)
{ {
if (!PySide::checkSignal(signal)) if (!PySide::Signal::checkQtSignal(signal))
return false; return false;
PySide::SignalManager& signalManager = PySide::SignalManager::instance(); PySide::SignalManager& signalManager = PySide::SignalManager::instance();
@ -99,20 +140,28 @@ static bool qobjectDisconnectCallback(QObject* source, const char* signal, PyObj
// Extract receiver from callback // Extract receiver from callback
QObject* receiver = 0; QObject* receiver = 0;
PyObject* self = 0; PyObject* self = 0;
bool usingGlobalReceiver = getReceiver(callback, &receiver, &self); QByteArray callbackSig;
if (receiver == 0 and self == 0) bool usingGlobalReceiver = getReceiver(NULL, signal, callback, &receiver, &self, &callbackSig);
if (receiver == 0 && self == 0)
return false; return false;
const QMetaObject* metaObject = receiver->metaObject(); const QMetaObject* metaObject = receiver->metaObject();
const QByteArray callbackSig = PySide::getCallbackSignature(signal, callback, usingGlobalReceiver).toAscii(); int signalIndex = source->metaObject()->indexOfSignal(++signal);
QByteArray qtSlotName(callbackSig); int slotIndex = -1;
qtSlotName = qtSlotName.prepend('1');
if (QObject::disconnect(source, signal, receiver, qtSlotName.constData())) { slotIndex = metaObject->indexOfSlot(callbackSig);
if (usingGlobalReceiver) {
int slotIndex = metaObject->indexOfSlot(callbackSig.constData()); if (QMetaObject::disconnectOne(source, signalIndex, receiver, slotIndex)) {
signalManager.globalReceiverDisconnectNotify(source, slotIndex); if (usingGlobalReceiver)
} signalManager.releaseGlobalReceiver(source, receiver);
#ifndef AVOID_PROTECTED_HACK
source->disconnectNotify(callbackSig);
#else
// Need to cast to QObjectWrapper* and call the public version of
// connectNotify when avoiding the protected hack.
reinterpret_cast<QObjectWrapper*>(source)->disconnectNotify(callbackSig);
#endif
return true; return true;
} }
return false; return false;

View file

@ -0,0 +1,39 @@
static QObject* _findChildHelper(const QObject* parent, const QString& name, PyTypeObject* desiredType)
{
foreach(QObject* child, parent->children()) {
Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[QObject*](child));
if (PyType_IsSubtype(pyChild->ob_type, desiredType)
&& (name.isNull() || name == child->objectName())) {
return child;
}
}
QObject* obj;
foreach(QObject* child, parent->children()) {
obj = _findChildHelper(child, name, desiredType);
if (obj)
return obj;
}
return 0;
}
static inline bool _findChildrenComparator(const QObject*& child, const QRegExp& name)
{
return name.indexIn(child->objectName()) != -1;
}
static inline bool _findChildrenComparator(const QObject*& child, const QString& name)
{
return name.isNull() || name == child->objectName();
}
template<typename T>
static void _findChildrenHelper(const QObject* parent, const T& name, PyTypeObject* desiredType, PyObject* result)
{
foreach(const QObject* child, parent->children()) {
Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[QObject*](child));
if (PyType_IsSubtype(pyChild->ob_type, desiredType) && _findChildrenComparator(child, name))
PyList_Append(result, pyChild);
_findChildrenHelper(child, name, desiredType, result);
}
}

View file

@ -1,43 +0,0 @@
#if PY_VERSION_HEX < 0x03000000
// QByteArray buffer protocol functions
// see: http://www.python.org/dev/peps/pep-3118/
extern "C" {
static Py_ssize_t SbkQString_segcountproc(PyObject* self, Py_ssize_t* lenp)
{
if (lenp)
*lenp = self->ob_type->tp_as_sequence->sq_length(self);
return 1;
}
static Py_ssize_t SbkQString_readbufferproc(PyObject* self, Py_ssize_t segment, char** ptrptr)
{
if (segment || Shiboken::cppObjectIsInvalid(self))
return -1;
QString* cppSelf = Converter<QString*>::toCpp(self);
QByteArray decodedData = cppSelf->toLocal8Bit();
Shiboken::AutoDecRef decodedString(PyString_FromStringAndSize(decodedData.constData(), decodedData.size()));
// delete __encodedStr attr if it exists
Shiboken::AutoDecRef attrName(PyString_FromStringAndSize("__encodedStr", sizeof("__encodedStr")-1));
if (PyObject_HasAttr(self, attrName))
PyObject_DelAttr(self, attrName);
PyObject_SetAttr(self, attrName, decodedString);
*ptrptr = PyString_AS_STRING(decodedString.object());
return decodedData.size();
}
PyBufferProcs SbkQStringBufferProc = {
/*bf_getreadbuffer*/ 0,
/*bf_getwritebuffer*/ 0,
/*bf_getsegcount*/ &SbkQString_segcountproc,
/*bf_getcharbuffer*/ &SbkQString_readbufferproc
};
}
#endif

View file

@ -1,16 +0,0 @@
namespace Shiboken {
template <>
struct Converter<QBool> : public ValueTypeConverter<QBool>
{
using ValueTypeConverter<QBool>::toPython;
static PyObject* toPython(const QBool& cppobj)
{
return PyBool_FromLong((bool) cppobj);
}
static QBool toCpp(PyObject* pyobj)
{
return QBool(pyobj == Py_True);
}
};
}

View file

@ -1,30 +0,0 @@
namespace Shiboken {
inline bool Shiboken::Converter<QChar >::isConvertible(PyObject* pyObj)
{
return PyObject_TypeCheck(pyObj, SbkType<QChar>())
|| SbkPySide_QtCore_QChar_SpecialCharacter_Check(pyObj)
|| SbkQLatin1Char_Check(pyObj)
|| (PyString_Check(pyObj) && (PyString_Size(pyObj) == 1))
|| PyInt_Check(pyObj);
}
inline QChar Shiboken::Converter<QChar >::toCpp(PyObject* pyObj)
{
if (!Shiboken_TypeCheck(pyObj, QChar)) {
if (SbkPySide_QtCore_QChar_SpecialCharacter_Check(pyObj))
return QChar(Shiboken::Converter<QChar::SpecialCharacter >::toCpp(pyObj));
else if (SbkQLatin1Char_Check(pyObj))
return QChar(Shiboken::Converter<QLatin1Char >::toCpp(pyObj));
else if (PyString_Check(pyObj) && PyString_Size(pyObj) == 1)
return QChar(Shiboken::Converter<char >::toCpp(pyObj));
else if (PyInt_Check(pyObj))
return QChar(Shiboken::Converter<int >::toCpp(pyObj));
}
return *Converter<QChar*>::toCpp(pyObj);
}
inline PyObject* Converter<QChar>::toPython(const QChar& cppObj)
{
return ValueTypeConverter<QChar>::toPython(cppObj);
}
}

View file

@ -1,4 +0,0 @@
namespace Shiboken {
template<typename KT, typename VT>
struct Converter<QHash<KT, VT> > : QtDictConverter<QHash<KT, VT> > {};
}

View file

@ -1,4 +0,0 @@
namespace Shiboken {
template<typename T>
struct Converter<QList<T> > : StdListConverter<QList<T> > {};
}

View file

@ -1,5 +0,0 @@
namespace Shiboken {
template<typename KT, typename VT>
struct Converter<QMap<KT, VT> > : QtDictConverter<QMap<KT, VT> > {
};
}

View file

@ -1,4 +0,0 @@
namespace Shiboken {
template<typename FT, typename ST>
struct Converter<QPair<FT, ST> > : StdPairConverter<QPair<FT, ST> > {};
}

View file

@ -1,4 +0,0 @@
namespace Shiboken {
template<typename T>
struct Converter<QSet<T> > : QSequenceConverter<QSet<T> > {};
}

View file

@ -1,69 +0,0 @@
namespace Shiboken {
inline bool Converter<QString>::isConvertible(PyObject* pyObj)
{
SbkBaseWrapperType* shiboType = reinterpret_cast<SbkBaseWrapperType*>(SbkType<QString>());
return PyString_Check(pyObj)
|| PyObject_TypeCheck(pyObj, SbkType<QString>())
|| PyUnicode_Check(pyObj)
|| SbkQByteArray_Check(pyObj)
|| SbkQLatin1String_Check(pyObj)
#if PY_VERSION_HEX < 0x03000000
|| (pyObj->ob_type->tp_as_buffer
&& PyType_HasFeature(pyObj->ob_type, Py_TPFLAGS_HAVE_GETCHARBUFFER)
&& pyObj->ob_type->tp_as_buffer->bf_getcharbuffer)
#endif
|| SbkQChar_Check(pyObj)
|| (shiboType->ext_isconvertible && shiboType->ext_isconvertible(pyObj));
}
inline QString Converter<QString>::toCpp(PyObject* pyObj)
{
SbkBaseWrapperType* shiboType = reinterpret_cast<SbkBaseWrapperType*>(SbkType<QString>());
if (SbkQChar_Check(pyObj)) {
return QString(Converter< QChar >::toCpp(pyObj));
} else if (SbkQByteArray_Check(pyObj)) {
return QString(Converter< QByteArray >::toCpp(pyObj));
} else if (SbkQLatin1String_Check(pyObj)) {
return QString(Converter< QLatin1String >::toCpp(pyObj));
} else if (PyUnicode_Check(pyObj)) {
Py_UNICODE* unicode = PyUnicode_AS_UNICODE(pyObj);
#if defined(Py_UNICODE_WIDE)
// cast as Py_UNICODE can be a different type
return QString::fromUcs4(reinterpret_cast<const uint*>(unicode));
#else
return QString::fromUtf16(unicode, PyUnicode_GET_SIZE(pyObj));
#endif
} else if (PyString_Check(pyObj)) {
return QString(Converter< char * >::toCpp(pyObj));
}
#if PY_VERSION_HEX < 0x03000000
// Support for buffer objects on QString constructor
else if (pyObj->ob_type->tp_as_buffer
&& PyType_HasFeature(pyObj->ob_type, Py_TPFLAGS_HAVE_GETCHARBUFFER)
&& pyObj->ob_type->tp_as_buffer->bf_getcharbuffer) {
QByteArray data;
PyBufferProcs* bufferProcs = pyObj->ob_type->tp_as_buffer;
int segments = bufferProcs->bf_getsegcount(pyObj, 0);
for (int i = 0; i < segments; ++i) {
char* segmentData;
int length = bufferProcs->bf_getcharbuffer(pyObj, i, &segmentData);
if (length == -1)
break;
data.append(segmentData, length);
}
return QString(data);
}
#endif
else if (shiboType->ext_isconvertible && shiboType->ext_tocpp && shiboType->ext_isconvertible(pyObj)) {
QString* cptr = reinterpret_cast<QString*>(shiboType->ext_tocpp(pyObj));
std::auto_ptr<QString> cptr_auto_ptr(cptr);
return *cptr;
}
return *Converter<QString*>::toCpp(pyObj);
}
inline PyObject* Converter<QString>::toPython(const QString& cppObj)
{
return ValueTypeConverter<QString>::toPython(cppObj);
}
}

View file

@ -1,17 +0,0 @@
namespace Shiboken
{
inline bool Converter<QStringList>::isConvertible(PyObject* pyObj)
{
return StdListConverter<QStringList>::isConvertible(pyObj);
}
inline QStringList Converter<QStringList>::toCpp(PyObject* pyObj)
{
return StdListConverter<QStringList>::toCpp(pyObj);
}
inline PyObject* Converter<QStringList>::toPython(const QStringList& cppObj)
{
return ValueTypeConverter<QStringList>::toPython(cppObj);
}
}

View file

@ -1,94 +0,0 @@
// We use this thin wrapper instead of the plain PyObject pointer to avoid conflicts with specializations of T*
// in QVariant.
struct PyObjectHolder
{
PyObject* m_me;
PyObjectHolder(PyObject* me) : m_me(me) {}
PyObjectHolder() : m_me(Py_None) {}
operator PyObject*() { return m_me; }
};
/**
* Q_DECLARE_METATYPE(PyObjectHolder);
* Use the expanded version of Q_DECLARE_METATYPE macro to define a typename
* compatible with PyQt4
**/
QT_BEGIN_NAMESPACE
template <>
struct QMetaTypeId< PyObjectHolder >
{
enum { Defined = 1 };
static int qt_metatype_id()
{
static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0);
if (!metatype_id)
metatype_id =
qRegisterMetaType<PyObjectHolder>("PyQt_PyObject");
return metatype_id;
}
};
QT_END_NAMESPACE
namespace Shiboken {
// all types are convertible to QVariant
inline bool Converter<QVariant>::isConvertible(PyObject* pyobj)
{
return true;
}
inline QVariant Converter<QVariant>::toCpp(PyObject* pyobj)
{
if (SbkQVariant_Check(pyobj))
return *Converter<QVariant*>::toCpp(pyobj);
// voodoo stuff to avoid linking qtcore bindings with qtgui bindings
QString className(pyobj->ob_type->tp_name);
className = className.mid(className.lastIndexOf(".") + 1);
uint typeCode = QMetaType::type(className.toAscii());
if (!typeCode || typeCode > QVariant::UserType) {
// Check the implicit conversion stuff for most python-native types
if (SbkPySide_QtCore_QVariant_Type_CheckExact(pyobj)) {
QVariant::Type cpp_arg0 = Shiboken::Converter<QVariant::Type >::toCpp(pyobj);
// QVariant(QVariant::Type)
return QVariant(cpp_arg0);
} else if (SbkPySide_QtCore_Qt_GlobalColor_CheckExact(pyobj)) {
Qt::GlobalColor cpp_arg0 = Shiboken::Converter<Qt::GlobalColor >::toCpp(pyobj);
// QVariant(Qt::GlobalColor)
return QVariant(cpp_arg0);
} else if (PyBool_Check(pyobj)) {
bool cpp_arg0 = Shiboken::Converter<bool >::toCpp(pyobj);
// QVariant(bool)
return QVariant(cpp_arg0);
} else if (PyString_Check(pyobj)) {
const char * cpp_arg0 = Shiboken::Converter<const char * >::toCpp(pyobj);
// QVariant(const char*)
return QVariant(cpp_arg0);
} else if (PyFloat_Check(pyobj)) {
double cpp_arg0 = Shiboken::Converter<double >::toCpp(pyobj);
// QVariant(double)
return QVariant(cpp_arg0);
} else if (PyNumber_Check(pyobj)) {
int cpp_arg0 = Shiboken::Converter<int >::toCpp(pyobj);
// QVariant(int)
return QVariant(cpp_arg0);
} else if (PyLong_Check(pyobj)) {
qlonglong cpp_arg0 = Shiboken::Converter<qlonglong >::toCpp(pyobj);
// QVariant(qlonglong)
return QVariant(cpp_arg0);
} else {
Py_INCREF(pyobj);
return QVariant::fromValue<PyObjectHolder>(pyobj);
}
} else {
// Is a known Qt type
return QVariant(typeCode, reinterpret_cast<SbkBaseWrapper*>(pyobj)->cptr);
}
}
inline PyObject* Converter<QVariant>::toPython(const QVariant& cppObj)
{
return ValueTypeConverter<QVariant>::toPython(cppObj);
}
}

View file

@ -1,4 +0,0 @@
namespace Shiboken {
template<typename T>
struct Converter<QVector<T> > : StdListConverter<QVector<T> > {};
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,24 @@
<?xml version="1.0"?>
<!--
This file is part of PySide project.
Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
Contact: PySide team <contact@pyside.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-->
<typesystem package="PySide.QtCore">
<load-typesystem name="typesystem_core_@AUTO_OS@.xml" generate="yes"/>
<load-typesystem name="typesystem_core_common.xml" generate="yes"/>
</typesystem>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,23 @@
<?xml version="1.0"?>
<!--
This file is part of PySide project.
Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
Contact: PySide team <contact@pyside.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-->
<typesystem package="PySide.QtCore">
<primitive-type name="Qt::HANDLE" target-lang-api-name="PyObject" />
</typesystem>

View file

@ -0,0 +1,26 @@
<?xml version="1.0"?>
<!--
This file is part of PySide project.
Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
Contact: PySide team <contact@pyside.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-->
<typesystem package="PySide.QtCore">
<primitive-type name="Qt::HANDLE" target-lang-api-name="PyLong">
<!-- FIXME APIExtractor or shiboken do not support multiple includes by primitive type -->
<include file-name="QTextDocument" location="global"/>
</primitive-type>
</typesystem>

View file

@ -0,0 +1,57 @@
<?xml version="1.0"?>
<!--
This file is part of PySide project.
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
Contact: PySide team <contact@pyside.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-->
<typesystem package="PySide.QtCore">
<primitive-type name="Qt::HANDLE" target-lang-api-name="PyObject" />
<primitive-type name="HWND">
<conversion-rule>
<native-to-target>
#ifdef IS_PY3K
return PyCapsule_New(%in, 0, 0);
#else
return PyCObject_FromVoidPtr(%in, 0);
#endif
</native-to-target>
<target-to-native>
<add-conversion type="PyNone">
%out = 0;
</add-conversion>
<add-conversion check="checkPyCapsuleOrPyCObject(%in)" type="PyObject">
#ifdef IS_PY3K
%out = (%OUTTYPE)PyCapsule_GetPointer(%in, 0);
#else
%out = (%OUTTYPE)PyCObject_AsVoidPtr(%in);
#endif
</add-conversion>
</target-to-native>
</conversion-rule>
</primitive-type>
<inject-code class="native" position="beginning">
<insert-template name="checkPyCapsuleOrPyCObject_func"/>
</inject-code>
<value-type name="POINT">
<include file-name="wtypes.h" location="global"/>
</value-type>
<value-type name="MSG">
<include file-name="wtypes.h" location="global"/>
</value-type>
<suppress-warning text="class 'MSG' inherits from unknown base class 'tagMSG'"/>
<suppress-warning text="class not found for setup inheritance 'tagMSG'"/>
</typesystem>

View file

@ -0,0 +1,26 @@
<?xml version="1.0"?>
<!--
This file is part of PySide project.
Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
Contact: PySide team <contact@pyside.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-->
<typesystem package="PySide.QtCore">
<primitive-type name="Qt::HANDLE" target-lang-api-name="PyLong">
<!-- FIXME APIExtractor or shiboken do not support multiple includes by primitive type -->
<include file-name="QTextDocument" location="global"/>
</primitive-type>
</typesystem>

View file

@ -0,0 +1,62 @@
project(QtDeclarative)
set(QtDeclarative_registerType "${CMAKE_CURRENT_SOURCE_DIR}/pysideqmlregistertype.cpp")
set(QtDeclarative_SRC
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativecomponent_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativecontext_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeengine_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeerror_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeexpression_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeextensioninterface_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeextensionplugin_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeimageprovider_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeitem_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativelistreference_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativenetworkaccessmanagerfactory_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeparserstatus_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativepropertymap_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativepropertyvaluesource_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeproperty_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativescriptstring_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeview_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qtdeclarative_module_wrapper.cpp
)
set(QtDeclarative_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtNetwork_SOURCE_DIR}${PATH_SEP}${QtDeclarative_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}")
set(QtDeclarative_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
${QT_QTCORE_INCLUDE_DIR}
${QT_QTGUI_INCLUDE_DIR}
${QT_QTNETWORK_INCLUDE_DIR}
${QT_QTDECLARATIVE_INCLUDE_DIR}
${SHIBOKEN_PYTHON_INCLUDE_DIR}
${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
${QtGui_BINARY_DIR}/PySide/QtGui/
${QtCore_BINARY_DIR}/PySide/QtCore/
${QtNetwork_BINARY_DIR}/PySide/QtNetwork/
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative)
set(QtDeclarative_libraries pyside
${SHIBOKEN_PYTHON_LIBRARIES}
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${QT_QTNETWORK_LIBRARY}
${QT_QTSCRIPT_LIBRARY}
${QT_QTSVG_LIBRARY}
${QT_QTSQL_LIBRARY}
${QT_QTXMLPATTERNS_LIBRARY}
${QT_QTOPENGL_LIBRARY}
${QT_QTDECLARATIVE_LIBRARY})
set(QtDeclarative_deps QtGui QtNetwork)
create_pyside_module(QtDeclarative
QtDeclarative_include_dirs
QtDeclarative_libraries
QtDeclarative_deps
QtDeclarative_typesystem_path
QtDeclarative_SRC
QtDeclarative_registerType)

View file

@ -0,0 +1,366 @@
/*
* This file is part of the Shiboken Python Bindings Generator project.
*
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
*
* Contact: PySide team <contact@pyside.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "pysideqmlregistertype.h"
// Qt
#include <QObject>
#include <QDeclarativeEngine>
#include <QMutex>
// shiboken
#include <typeresolver.h>
#include <gilstate.h>
#include <sbkdbg.h>
// pyside
#include <pyside.h>
#include <dynamicqmetaobject.h>
#include <pysideproperty.h>
// auto generated headers
#include "qdeclarativeitem_wrapper.h"
#include "pyside_qtcore_python.h"
#include "pyside_qtdeclarative_python.h"
#ifndef PYSIDE_MAX_QML_TYPES
// Maximum number of different types the user cna export to QML using qmlRegisterType.
#define PYSIDE_MAX_QML_TYPES 50
#endif
// Forward declarations
static void propListMetaCall(PySideProperty* pp, PyObject* self, QMetaObject::Call call, void** args);
// All registered python types
static PyObject* pyTypes[PYSIDE_MAX_QML_TYPES];
static void (*createFuncs[PYSIDE_MAX_QML_TYPES])(void*);
// Mutex used to avoid race condition on PySide::nextQObjectMemoryAddr
static QMutex nextQmlElementMutex;
template<int N>
struct ElementFactoryBase
{
static void createInto(void* memory)
{
QMutexLocker locker(&nextQmlElementMutex);
PySide::setNextQObjectMemoryAddr(memory);
Shiboken::GilState state;
PyObject* obj = PyObject_CallObject(pyTypes[N], 0);
if (!obj || PyErr_Occurred())
PyErr_Print();
PySide::setNextQObjectMemoryAddr(0);
}
};
template<int N>
struct ElementFactory : ElementFactoryBase<N>
{
static void init()
{
createFuncs[N] = &ElementFactoryBase<N>::createInto;
ElementFactory<N-1>::init();
}
};
template<>
struct ElementFactory<0> : ElementFactoryBase<0>
{
static void init()
{
createFuncs[0] = &ElementFactoryBase<0>::createInto;
}
};
int PySide::qmlRegisterType(PyObject* pyObj, const char* uri, int versionMajor, int versionMinor, const char* qmlName)
{
using namespace Shiboken;
static PyTypeObject* qobjectType = Shiboken::Conversions::getPythonTypeObject("QObject*");
static PyTypeObject* qdeclarativeType = Shiboken::Conversions::getPythonTypeObject("QDeclarativeItem*");
assert(qobjectType);
static int nextType = 0;
if (nextType >= PYSIDE_MAX_QML_TYPES) {
PyErr_Format(PyExc_TypeError, "QML doesn't really like language bindings, so you can only export %d types to QML.", PYSIDE_MAX_QML_TYPES);
return -1;
}
if (!PySequence_Contains(((PyTypeObject*)pyObj)->tp_mro, (PyObject*)qobjectType)) {
PyErr_Format(PyExc_TypeError, "A type inherited from %s expected, got %s.", qobjectType->tp_name, ((PyTypeObject*)pyObj)->tp_name);
return -1;
}
bool isDeclarativeType = PySequence_Contains(((PyTypeObject*)pyObj)->tp_mro, (PyObject*)qdeclarativeType);
QMetaObject* metaObject = reinterpret_cast<QMetaObject*>(ObjectType::getTypeUserData(reinterpret_cast<SbkObjectType*>(pyObj)));
Q_ASSERT(metaObject);
// Inc ref the type object, don't worry about dec ref them because there's no way to unregister a QML type
Py_INCREF(pyObj);
// All ready... now the ugly code begins... :-)
pyTypes[nextType] = pyObj;
// Init proxy object static meta object
QDeclarativePrivate::RegisterType type;
type.version = 0;
if (isDeclarativeType) {
type.typeId = qMetaTypeId<QDeclarativeItem*>();
type.listId = qMetaTypeId<QDeclarativeListProperty<QDeclarativeItem> >();
type.attachedPropertiesFunction = QDeclarativePrivate::attachedPropertiesFunc<QDeclarativeItem>();
type.attachedPropertiesMetaObject = QDeclarativePrivate::attachedPropertiesMetaObject<QDeclarativeItem>();
type.parserStatusCast = QDeclarativePrivate::StaticCastSelector<QDeclarativeItem, QDeclarativeParserStatus>::cast();
type.valueSourceCast = QDeclarativePrivate::StaticCastSelector<QDeclarativeItem, QDeclarativePropertyValueSource>::cast();
type.valueInterceptorCast = QDeclarativePrivate::StaticCastSelector<QDeclarativeItem, QDeclarativePropertyValueInterceptor>::cast();
} else {
type.typeId = qMetaTypeId<QObject*>();
type.listId = qMetaTypeId<QDeclarativeListProperty<QObject> >();
type.attachedPropertiesFunction = QDeclarativePrivate::attachedPropertiesFunc<QObject>();
type.attachedPropertiesMetaObject = QDeclarativePrivate::attachedPropertiesMetaObject<QObject>();
type.parserStatusCast = QDeclarativePrivate::StaticCastSelector<QObject, QDeclarativeParserStatus>::cast();
type.valueSourceCast = QDeclarativePrivate::StaticCastSelector<QObject, QDeclarativePropertyValueSource>::cast();
type.valueInterceptorCast = QDeclarativePrivate::StaticCastSelector<QObject, QDeclarativePropertyValueInterceptor>::cast();
}
type.objectSize = PySide::getSizeOfQObject(reinterpret_cast<SbkObjectType*>(pyObj));
type.create = createFuncs[nextType];
type.uri = uri;
type.versionMajor = versionMajor;
type.versionMinor = versionMinor;
type.elementName = qmlName;
type.metaObject = metaObject;
type.extensionObjectCreate = 0;
type.extensionMetaObject = 0;
type.customParser = 0;
int qmlTypeId = QDeclarativePrivate::qmlregister(QDeclarativePrivate::TypeRegistration, &type);
++nextType;
return qmlTypeId;
}
extern "C"
{
// This is the user data we store in the property.
struct DeclarativeListProperty
{
PyTypeObject* type;
PyObject* append;
PyObject* at;
PyObject* clear;
PyObject* count;
};
static int propListTpInit(PyObject* self, PyObject* args, PyObject* kwds)
{
static const char *kwlist[] = {"type", "append", "at", "clear", "count", 0};
PySideProperty* pySelf = reinterpret_cast<PySideProperty*>(self);
DeclarativeListProperty* data = new DeclarativeListProperty;
memset(data, 0, sizeof(DeclarativeListProperty));
if (!PyArg_ParseTupleAndKeywords(args, kwds,
"OO|OOO:QtDeclarative.ListProperty", (char**) kwlist,
&data->type,
&data->append,
&data->at,
&data->clear,
&data->count)) {
return 0;
}
PySide::Property::setMetaCallHandler(pySelf, &propListMetaCall);
PySide::Property::setTypeName(pySelf, "QDeclarativeListProperty<QDeclarativeItem>");
PySide::Property::setUserData(pySelf, data);
return 1;
}
void propListTpFree(void* self)
{
PySideProperty* pySelf = reinterpret_cast<PySideProperty*>(self);
delete reinterpret_cast<DeclarativeListProperty*>(PySide::Property::userData(pySelf));
// calls base type constructor
Py_TYPE(pySelf)->tp_base->tp_free(self);
}
PyTypeObject PropertyListType = {
PyVarObject_HEAD_INIT(0, 0)
"ListProperty", /*tp_name*/
sizeof(PySideProperty), /*tp_basicsize*/
0, /*tp_itemsize*/
0, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_compare*/
0, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_hash */
0, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT, /*tp_flags*/
0, /*tp_doc */
0, /*tp_traverse */
0, /*tp_clear */
0, /*tp_richcompare */
0, /*tp_weaklistoffset */
0, /*tp_iter */
0, /*tp_iternext */
0, /*tp_methods */
0, /*tp_members */
0, /*tp_getset */
&PySidePropertyType, /*tp_base */
0, /*tp_dict */
0, /*tp_descr_get */
0, /*tp_descr_set */
0, /*tp_dictoffset */
propListTpInit, /*tp_init */
0, /*tp_alloc */
0, /*tp_new */
propListTpFree, /*tp_free */
0, /*tp_is_gc */
0, /*tp_bases */
0, /*tp_mro */
0, /*tp_cache */
0, /*tp_subclasses */
0, /*tp_weaklist */
0, /*tp_del */
};
} // extern "C"
// Implementation of QDeclarativeListProperty<T>::AppendFunction callback
void propListAppender(QDeclarativeListProperty<QDeclarativeItem>* propList, QDeclarativeItem* item)
{
Shiboken::GilState state;
Shiboken::AutoDecRef args(PyTuple_New(2));
PyTuple_SET_ITEM(args, 0, Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QOBJECT_IDX], propList->object));
PyTuple_SET_ITEM(args, 1, Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtDeclarativeTypes[SBK_QDECLARATIVEITEM_IDX], item));
DeclarativeListProperty* data = reinterpret_cast<DeclarativeListProperty*>(propList->data);
Shiboken::AutoDecRef retVal(PyObject_CallObject(data->append, args));
if (PyErr_Occurred())
PyErr_Print();
}
// Implementation of QDeclarativeListProperty<T>::CountFunction callback
int propListCount(QDeclarativeListProperty<QDeclarativeItem>* propList)
{
Shiboken::GilState state;
Shiboken::AutoDecRef args(PyTuple_New(1));
PyTuple_SET_ITEM(args, 0, Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QOBJECT_IDX], propList->object));
DeclarativeListProperty* data = reinterpret_cast<DeclarativeListProperty*>(propList->data);
Shiboken::AutoDecRef retVal(PyObject_CallObject(data->count, args));
// Check return type
int cppResult = 0;
PythonToCppFunc pythonToCpp;
if (PyErr_Occurred())
PyErr_Print();
else if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter<int>(), retVal)))
pythonToCpp(retVal, &cppResult);
return cppResult;
}
// Implementation of QDeclarativeListProperty<T>::AtFunction callback
QDeclarativeItem* propListAt(QDeclarativeListProperty<QDeclarativeItem>* propList, int index)
{
Shiboken::GilState state;
Shiboken::AutoDecRef args(PyTuple_New(2));
PyTuple_SET_ITEM(args, 0, Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QOBJECT_IDX], propList->object));
PyTuple_SET_ITEM(args, 1, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<int>(), &index));
DeclarativeListProperty* data = reinterpret_cast<DeclarativeListProperty*>(propList->data);
Shiboken::AutoDecRef retVal(PyObject_CallObject(data->at, args));
QDeclarativeItem* result = 0;
if (PyErr_Occurred())
PyErr_Print();
else if (PyType_IsSubtype(Py_TYPE(retVal), data->type))
Shiboken::Conversions::pythonToCppPointer((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QDECLARATIVEITEM_IDX], retVal, &result);
return result;
}
// Implementation of QDeclarativeListProperty<T>::ClearFunction callback
void propListClear(QDeclarativeListProperty<QDeclarativeItem>* propList)
{
Shiboken::GilState state;
Shiboken::AutoDecRef args(PyTuple_New(1));
PyTuple_SET_ITEM(args, 0, Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QOBJECT_IDX], propList->object));
DeclarativeListProperty* data = reinterpret_cast<DeclarativeListProperty*>(propList->data);
Shiboken::AutoDecRef retVal(PyObject_CallObject(data->clear, args));
if (PyErr_Occurred())
PyErr_Print();
}
// qt_metacall specialization for ListProperties
static void propListMetaCall(PySideProperty* pp, PyObject* self, QMetaObject::Call call, void** args)
{
if (call != QMetaObject::ReadProperty)
return;
DeclarativeListProperty* data = reinterpret_cast<DeclarativeListProperty*>(PySide::Property::userData(pp));
QObject* qobj;
Shiboken::Conversions::pythonToCppPointer((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QOBJECT_IDX], self, &qobj);
QDeclarativeListProperty<QDeclarativeItem> declProp(qobj, data, &propListAppender);
if (data->count)
declProp.count = &propListCount;
if (data->at)
declProp.at = &propListAt;
if (data->clear)
declProp.clear = &propListClear;
// Copy the data to the memory location requested by the meta call
void* v = args[0];
*reinterpret_cast<QDeclarativeListProperty<QDeclarativeItem>*>(v) = declProp;
}
void PySide::initQmlSupport(PyObject* module)
{
ElementFactory<PYSIDE_MAX_QML_TYPES - 1>::init();
// Export DeclarativeListProperty type
if (PyType_Ready(&PropertyListType) < 0)
return;
Py_INCREF((PyObject*)&PropertyListType);
PyModule_AddObject(module, PropertyListType.tp_name, (PyObject*)&PropertyListType);
}

View file

@ -0,0 +1,57 @@
/*
* This file is part of the Shiboken Python Bindings Generator project.
*
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
*
* Contact: PySide team <contact@pyside.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef PYSIDEQMLREGISTERTYPE_H
#define PYSIDEQMLREGISTERTYPE_H
#include <Python.h>
struct SbkObjectType;
namespace PySide
{
extern void* nextQmlElementMemoryAddr;
/**
* Init the QML support doign things like registering QtDeclarative.ListProperty and create the necessary stuff for
* qmlRegisterType.
*
* \param module QtDeclarative python module
*/
void initQmlSupport(PyObject* module);
/**
* PySide implementation of qmlRegisterType<T> function.
*
* \param pyObj Python type to be registered.
* \param uri QML element uri.
* \param versionMajor QML component major version.
* \param versionMinor QML component minor version.
* \param qmlName QML element name
* \return the metatype id of the registered type.
*/
int qmlRegisterType(PyObject* pyObj, const char* uri, int versionMajor, int versionMinor, const char* qmlName);
}
#endif

View file

@ -0,0 +1,169 @@
<?xml version="1.0"?>
<!--
This file is part of PySide project.
Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
Contact: PySide team <contact@pyside.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-->
<typesystem package="PySide.QtDeclarative">
<load-typesystem name="typesystem_core.xml" generate="no"/>
<load-typesystem name="typesystem_network.xml" generate="no"/>
<load-typesystem name="typesystem_gui.xml" generate="no"/>
<add-function signature="qmlRegisterType(PyTypeObject, const char*, int, int, const char*)" return-type="int">
<inject-documentation format="target" mode="append">
This function registers the Python type in the QML system with the name qmlName, in the library imported from uri having the version number composed from versionMajor and versionMinor.
Returns the QML type id.
For example, this registers a Python class MySliderItem as a QML type named Slider for version 1.0 of a module called "com.mycompany.qmlcomponents":
::
qmlRegisterType(MySliderItem, "com.mycompany.qmlcomponents", 1, 0, "Slider")
Once this is registered, the type can be used in QML by importing the specified module name and version number:
::
import com.mycompany.qmlcomponents 1.0
Slider { ... }
Note that it's perfectly reasonable for a library to register types to older versions than the actual version of the library. Indeed, it is normal for the new library to allow QML written to previous versions to continue to work, even if more advanced versions of some of its types are available.
</inject-documentation>
<inject-code class="target">
int %0 = PySide::qmlRegisterType(%ARGUMENT_NAMES);
%PYARG_0 = %CONVERTTOPYTHON[int](%0);
</inject-code>
</add-function>
<enum-type identified-by-value="QML_HAS_ATTACHED_PROPERTIES" since="4.7">
<extra-includes>
<include file-name="QtDeclarative" location="global"/>
<!-- FIXME The include tag doesn't work on modules -->
<include file-name="pysideqmlregistertype.h" location="local"/>
</extra-includes>
</enum-type>
<inject-code class="target" position="end">
PySide::initQmlSupport(module);
</inject-code>
<object-type name="QDeclarativeExtensionInterface"/>
<object-type name="QDeclarativeComponent">
<enum-type name="Status"/>
<!-- This ctor isn't part of Qt public API -->
<modify-function signature="QDeclarativeComponent(QObject*)" remove="all" />
</object-type>
<object-type name="QDeclarativeContext">
<modify-function signature="setContextProperty(const QString &amp;, QObject*)">
<inject-code class="target" position="end">
QByteArray key("%FUNCTION_NAME_");
key.append(%1.toLocal8Bit());
Shiboken::Object::keepReference(reinterpret_cast&lt;SbkObject*&gt;(%PYSELF), key.constData(), %PYARG_2);
</inject-code>
</modify-function>
</object-type>
<object-type name="QDeclarativeEngine">
<enum-type name="ObjectOwnership" />
<modify-function signature="QDeclarativeEngine(QObject*)">
<modify-argument index="1">
<rename to="parent" /> <!-- Qt names this just p -->
</modify-argument>
</modify-function>
<modify-function signature="setNetworkAccessManagerFactory(QDeclarativeNetworkAccessManagerFactory*)">
<modify-argument index="1">
<parent index="this" action="add" />
</modify-argument>
</modify-function>
<modify-function signature="importPlugin(QString,QString,QString*)">
<modify-argument index="3">
<remove-argument/>
</modify-argument>
<modify-argument index="return">
<replace-type modified-type="(ok, errorString)" />
</modify-argument>
<inject-code class="target" position="beginning">
QString errorString;
%BEGIN_ALLOW_THREADS
%RETURN_TYPE ok_ = %CPPSELF.%FUNCTION_NAME(%1, %2, &amp;errorString);
%END_ALLOW_THREADS
%PYARG_0 = PyTuple_New(2);
PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[%RETURN_TYPE](ok_));
PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[QString](errorString));
</inject-code>
</modify-function>
</object-type>
<value-type name="QDeclarativeError" />
<object-type name="QDeclarativeExpression">
<modify-function signature="evaluate(bool*)">
<modify-argument index="1">
<remove-argument/>
</modify-argument>
<inject-code class="target" position="beginning">
<insert-template name="fix_bool*"/>
</inject-code>
</modify-function>
</object-type>
<object-type name="QDeclarativeExtensionPlugin" />
<object-type name="QDeclarativeImageProvider">
<enum-type name="ImageType" />
</object-type>
<object-type name="QDeclarativeItem">
<extra-includes>
<include file-name="pysideqmlregistertype.h" location="local"/>
</extra-includes>
<enum-type name="TransformOrigin" />
</object-type>
<value-type name="QDeclarativeListReference" />
<object-type name="QDeclarativeNetworkAccessManagerFactory" >
<modify-function signature="create(QObject *)">
<modify-argument index="return">
<define-ownership class="target" owner="c++"/>
</modify-argument>
</modify-function>
</object-type>
<object-type name="QDeclarativeParserStatus" />
<value-type name="QDeclarativeProperty">
<enum-type name="PropertyTypeCategory" />
<enum-type name="Type" />
</value-type>
<object-type name="QDeclarativePropertyMap">
<modify-documentation xpath="description/code[1]">&lt;code># create our data
ownerData = QDeclarativePropertyMap()
ownerData.insert(&quot;name&quot;, &quot;John Smith&quot;)
ownerData.insert(&quot;phone&quot;, &quot;555-5555&quot;)
# expose it to the UI layer
view = QDeclarativeView()
ctxt = view.rootContext()
ctxt.setContextProperty(&quot;owner&quot;, ownerData)
view.setSource(QUrl.fromLocalFile(&quot;main.qml&quot;))
view.show()&lt;/code></modify-documentation>
</object-type>
<object-type name="QDeclarativePropertyValueSource" />
<value-type name="QDeclarativeScriptString" />
<object-type name="QDeclarativeView">
<enum-type name="ResizeMode" />
<enum-type name="Status" />
</object-type>
</typesystem>

View file

@ -1,55 +1,22 @@
project(QtGui) project(QtGui)
# Check QtGui support if(ENABLE_X11)
macro(CHECK_QT_GUI_MACRO macro_display_name qt_macro module_sources global_sources)
if (DEFINED PYSIDE_${qt_macro})
if (PYSIDE_${qt_macro})
list(APPEND ${global_sources} ${${module_sources}})
endif()
else()
set(SRC_FILE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/test${qt_macro}.cxx)
file(WRITE ${SRC_FILE}
"#include <QtGui>\n"
"int main() { \n"
"#ifdef ${qt_macro}\n"
"#error not supported.\n"
"#endif\n"
"}\n")
try_compile(Q_WORKS ${CMAKE_BINARY_DIR}
${SRC_FILE}
CMAKE_FLAGS
-DINCLUDE_DIRECTORIES:STRING=${QT_QTGUI_INCLUDE_DIR}\;${QT_INCLUDE_DIR}
-DLINK_LIBRARIES:PATH=${QT_QTGUI_LIBRARY_RELEASE}
OUTPUT_VARIABLE OUTPUT)
set("PYSIDE_${qt_macro}" ${Q_WORKS} CACHE STRING "Has this Qt module been found by pyside?")
if(Q_WORKS)
message(STATUS "Testing support to ${macro_display_name} -- enabled")
list(APPEND ${global_sources} ${${module_sources}})
else()
message(STATUS "Testing support to ${macro_display_name} -- disabled")
endif()
endif()
endmacro(CHECK_QT_GUI_MACRO)
if(Q_WS_X11)
set(MODULE_NAME gui_x11)
set(SPECIFIC_OS_FILES set(SPECIFIC_OS_FILES
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qx11info_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qx11info_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qx11embedcontainer_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qx11embedwidget_wrapper.cpp
) )
elseif(Q_WS_MAC) if(Q_WS_MAEMO_5)
set(MODULE_NAME gui_mac)
set(SPECIFIC_OS_FILES set(SPECIFIC_OS_FILES
${SPECIFIC_OS_FILES}
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qabstractkineticscroller_wrapper.cpp
) )
else() endif()
message(FATAL_ERROR "OS not supported") endif()
endif(Q_WS_X11)
if (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6) if (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6)
set (QtGui_46_SRC ) set(QtGui_46_SRC "")
else() else()
set(QtGui_46_SRC set(QtGui_46_SRC
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qmatrix2x2_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qmatrix2x2_wrapper.cpp
@ -62,6 +29,7 @@ else()
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qmatrix4x3_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qmatrix4x3_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qmatrix4x4_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qmatrix4x4_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qgesture_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qgesture_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qgestureevent_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qgesturerecognizer_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qgesturerecognizer_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qgraphicsanchor_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qgraphicsanchor_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qgraphicsanchorlayout_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qgraphicsanchorlayout_wrapper.cpp
@ -80,6 +48,8 @@ else()
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qpinchgesture_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qpinchgesture_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qquaternion_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qquaternion_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qswipegesture_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qswipegesture_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qtapandholdgesture_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qtapgesture_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qtilerules_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qtilerules_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qtouchevent_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qtouchevent_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qtouchevent_touchpoint_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qtouchevent_touchpoint_wrapper.cpp
@ -87,7 +57,34 @@ else()
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qvector3d_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qvector3d_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qvector4d_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qvector4d_wrapper.cpp
) )
endif (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6) endif ()
if (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 7)
set(QtGui_47_SRC "")
else()
set(QtGui_47_SRC
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qpainter_pixmapfragment_wrapper.cpp
)
endif()
set(QtGui_OPTIONAL_SRC )
set(QtGui_DROPPED_ENTRIES )
check_qt_class(QtGui QAbstractPageSetupDialog QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
check_qt_class(QtGui QAbstractPrintDialog QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
check_qt_class(QtGui QGtkStyle QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
check_qt_class(QtGui QPageSetupDialog QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
check_qt_class(QtGui QPrintDialog QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
check_qt_class(QtGui QPrintEngine QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
check_qt_class(QtGui QPrintPreviewDialog QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
check_qt_class(QtGui QPrintPreviewWidget QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
check_qt_class(QtGui QPrinter QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
check_qt_class(QtGui QPrinterInfo QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
check_qt_class(QtGui QSessionManager QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
check_qt_class(QtGui QSizeGrip QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
check_qt_class(QtGui QSystemTrayIcon QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
check_qt_class(QtGui QMacStyle QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
qt4_wrap_cpp(QPYTEXTOBJECT_MOC "${pyside_SOURCE_DIR}/qpytextobject.h")
set(QtGui_SRC set(QtGui_SRC
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qabstractbutton_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qabstractbutton_wrapper.cpp
@ -101,6 +98,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qabstractspinbox_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qabstracttextdocumentlayout_paintcontext_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qabstracttextdocumentlayout_paintcontext_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qabstracttextdocumentlayout_selection_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qabstracttextdocumentlayout_selection_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qabstracttextdocumentlayout_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qabstracttextdocumentlayout_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qaccessibleevent_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qactionevent_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qactionevent_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qactiongroup_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qactiongroup_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qaction_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qaction_wrapper.cpp
@ -251,6 +249,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qpen_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qpictureio_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qpictureio_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qpicture_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qpicture_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qpixmapcache_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qpixmapcache_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qpixmapcache_key_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qpixmap_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qpixmap_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qplaintextdocumentlayout_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qplaintextdocumentlayout_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qplaintextedit_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qplaintextedit_wrapper.cpp
@ -260,6 +259,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qpolygon_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qprogressbar_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qprogressbar_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qprogressdialog_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qprogressdialog_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qproxymodel_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qproxymodel_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qpytextobject_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qpushbutton_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qpushbutton_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qradialgradient_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qradialgradient_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qradiobutton_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qradiobutton_wrapper.cpp
@ -269,7 +269,6 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qresizeevent_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qrubberband_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qrubberband_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qscrollarea_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qscrollarea_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qscrollbar_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qscrollbar_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qsessionmanager_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qshortcutevent_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qshortcutevent_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qshortcut_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qshortcut_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qshowevent_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qshowevent_wrapper.cpp
@ -404,80 +403,38 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qwizard_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qworkspace_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qworkspace_wrapper.cpp
${SPECIFIC_OS_FILES} ${SPECIFIC_OS_FILES}
${QPYTEXTOBJECT_MOC}
${QtGui_46_SRC} ${QtGui_46_SRC}
${QtGui_47_SRC}
${QtGui_OPTIONAL_SRC}
) )
#Check GtkStyle configure_file("${CMAKE_CURRENT_SOURCE_DIR}/typesystem_gui.xml.in"
set(QT_GTKSTYLE_SRCS
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qgtkstyle_wrapper.cpp
)
CHECK_QT_GUI_MACRO("GtkStyle" QT_NO_STYLE_GTK QT_GTKSTYLE_SRCS QtGui_SRC)
#Check SystemTray
set(QT_SYSTEMTRAY_SRCS
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qsystemtrayicon_wrapper.cpp
)
CHECK_QT_GUI_MACRO("SystemTray" QT_NO_SYSTEMTRAYICON QT_SYSTEMTRAY_SRCS QtGui_SRC)
#Check QT_PRINTDIALOG support
set(QT_PRINTDIALOG_SRCS
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qabstractpagesetupdialog_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qabstractprintdialog_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qpagesetupdialog_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qprintdialog_wrapper.cpp
)
CHECK_QT_GUI_MACRO("PrintDialog Support" QT_NO_PRINTDIALOG QT_PRINTDIALOG_SRCS QtGui_SRC)
#Check QT_PRITPREVIEW support
set(QT_PRINTPREVIEW_SRCS
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qprintpreviewwidget_wrapper.cpp
)
CHECK_QT_GUI_MACRO("PrintPreview Support" QT_NO_PRINTPREVIEWWIDGET QT_PRINTPREVIEW_SRCS QtGui_SRC)
#Check QT_PRINTPREVIEWDIALOG support
set(QT_PRINTPREVIEWDIALOG_SRCS
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qprintpreviewdialog_wrapper.cpp
)
CHECK_QT_GUI_MACRO("PrintPreviewDialog Support" QT_NO_PRINTPREVIEWDIALOG QT_PRINTPREVIEWDIALOG_SRCS QtGui_SRC)
#Check QT_PRINTER
set(QT_PRINTER_SRCS
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qprinter_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qprinterinfo_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qprintengine_wrapper.cpp
)
CHECK_QT_GUI_MACRO("Printer Support" QT_NO_PRINTER QT_PRINTER_SRCS QtGui_SRC)
#Check QT_SIZEGRIP support
set(QT_SIZEGRIP_SRCS
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qsizegrip_wrapper.cpp
)
CHECK_QT_GUI_MACRO("SizeGrip Support" QT_NO_SIZEGRIP QT_SIZEGRIP_SRCS QtGui_SRC)
configure_file(typesystem_gui.xml.in
"${CMAKE_CURRENT_BINARY_DIR}/typesystem_gui.xml" @ONLY) "${CMAKE_CURRENT_BINARY_DIR}/typesystem_gui.xml" @ONLY)
execute_generator(gui QtGui_SRC "${CMAKE_CURRENT_BINARY_DIR}:${QtCore_SOURCE_DIR}") set(QtGui_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}")
include_directories(${CMAKE_CURRENT_SOURCE_DIR} set(QtGui_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/
${pyside_SOURCE_DIR}
${QT_INCLUDE_DIR} ${QT_INCLUDE_DIR}
${SHIBOKEN_INCLUDE_DIR} ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR} ${libpyside_SOURCE_DIR}
${PYTHON_INCLUDE_PATH} ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_BINARY_DIR}/PySide/QtCore/ ${QtCore_BINARY_DIR}/PySide/QtCore/)
) set(QtGui_libraries pyside
add_library(QtGui MODULE ${QtGui_SRC}) ${SHIBOKEN_PYTHON_LIBRARIES}
set_property(TARGET QtGui PROPERTY PREFIX "")
target_link_libraries(QtGui
pyside
${PYTHON_LIBRARIES}
${SHIBOKEN_LIBRARY} ${SHIBOKEN_LIBRARY}
${QT_QTGUI_LIBRARY} ${QT_QTGUI_LIBRARY})
) set(QtGui_deps "QtCore")
add_dependencies(QtGui QtCore)
# install create_pyside_module(QtGui
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/QtGui.so DESTINATION "${SITE_PACKAGE}/PySide") QtGui_include_dirs
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/pyside_qtgui_python.h QtGui_libraries
DESTINATION include/PySide/QtGui/) QtGui_deps
QtGui_typesystem_path
QtGui_SRC
""
${CMAKE_CURRENT_BINARY_DIR}/typesystem_gui.xml)
install(FILES ${pyside_SOURCE_DIR}/qpytextobject.h DESTINATION include/PySide/QtGui/)

View file

@ -3,49 +3,48 @@ extern PyObject* moduleQtGui;
static int QApplicationArgCount; static int QApplicationArgCount;
static char** QApplicationArgValues; static char** QApplicationArgValues;
static const char QAPP_MACRO[] = "qApp";
void DeleteQApplicationAtExit() { bool QApplicationConstructorStart(PyObject* argv)
if (QApplication::instance()) {
delete QApplication::instance();
for (int i = 0; i < QApplicationArgCount; ++i)
delete[] QApplicationArgValues[i];
}
}
int SbkQApplication_Init(PyObject* self, PyObject* args, PyObject*)
{ {
if (QApplication::instance()) { if (QApplication::instance()) {
PyErr_SetString(PyExc_RuntimeError, "A QApplication instance already exists."); PyErr_SetString(PyExc_RuntimeError, "A QApplication instance already exists.");
return -1; return false;
} }
int numArgs = PyTuple_GET_SIZE(args); return Shiboken::sequenceToArgcArgv(argv, &QApplicationArgCount, &QApplicationArgValues, "PySideApp");
if (numArgs != 1) { }
PyErr_BadArgument();
return -1; void QApplicationConstructorEnd(PyObject* self)
} {
// Verify if qApp is in main module
if (!PySequenceToArgcArgv(PyTuple_GET_ITEM(args, 0), &QApplicationArgCount, &QApplicationArgValues, "PySideApp")) { PyObject* globalsDict = PyEval_GetGlobals();
PyErr_BadArgument(); if (globalsDict) {
return -1; PyObject* qAppObj = PyDict_GetItemString(globalsDict, QAPP_MACRO);
} if (qAppObj)
PyDict_SetItemString(globalsDict, QAPP_MACRO, self);
SbkBaseWrapper_setCptr(self, new QApplication(QApplicationArgCount, QApplicationArgValues)); }
SbkBaseWrapper_setValidCppObject(self, 1);
Shiboken::BindingManager::instance().registerWrapper(reinterpret_cast<SbkBaseWrapper*>(self)); PyObject_SetAttrString(moduleQtGui, QAPP_MACRO, self);
PySide::registerCleanupFunction(&PySide::destroyQCoreApplication);
// Verify if qApp is in main module Py_INCREF(self);
const char QAPP_MACRO[] = "qApp"; }
PyObject* localsDict = PyEval_GetLocals();
if (localsDict) { static void QApplicationConstructor(PyObject* self, PyObject* argv, QApplicationWrapper** cptr)
PyObject* qAppObj = PyDict_GetItemString(localsDict, QAPP_MACRO); {
if (qAppObj) if (QApplicationConstructorStart(argv)) {
PyDict_SetItemString(localsDict, QAPP_MACRO, self); *cptr = new QApplicationWrapper(QApplicationArgCount, QApplicationArgValues);
} Shiboken::Object::releaseOwnership(reinterpret_cast<SbkObject*>(self));
PyObject_SetAttrString(moduleQtGui, QAPP_MACRO, self); QApplicationConstructorEnd(self);
}
Py_INCREF(self); }
Py_AtExit(DeleteQApplicationAtExit);
template <typename T>
return 1; static void QApplicationConstructor(PyObject* self, PyObject* argv, T extraArg, QApplicationWrapper** cptr)
{
if (QApplicationConstructorStart(argv)) {
*cptr = new QApplicationWrapper(QApplicationArgCount, QApplicationArgValues, extraArg);
Shiboken::Object::releaseOwnership(reinterpret_cast<SbkObject*>(self));
QApplicationConstructorEnd(self);
}
} }

View file

@ -0,0 +1,122 @@
void addLayoutOwnership(QLayout* layout, QLayoutItem* item);
void removeLayoutOwnership(QLayout* layout, QWidget* widget);
inline QByteArray retrieveObjectName(PyObject* obj)
{
Shiboken::AutoDecRef objName(PyObject_Str(obj));
return Shiboken::String::toCString(objName);
}
inline void addLayoutOwnership(QLayout* layout, QWidget* widget)
{
//transfer ownership to parent widget
QWidget *lw = layout->parentWidget();
QWidget *pw = widget->parentWidget();
Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[QWidget*](widget));
//Transfer parent to layout widget
if (pw && lw && pw != lw)
Shiboken::Object::setParent(0, pyChild);
if (!lw && !pw) {
//keep the reference while the layout is orphan
Shiboken::AutoDecRef pyParent(%CONVERTTOPYTHON[QWidget*](layout));
Shiboken::Object::keepReference(reinterpret_cast<SbkObject*>(pyParent.object()), retrieveObjectName(pyParent).data(), pyChild, true);
} else {
if (!lw)
lw = pw;
Shiboken::AutoDecRef pyParent(%CONVERTTOPYTHON[QWidget*](lw));
Shiboken::Object::setParent(pyParent, pyChild);
}
}
inline void addLayoutOwnership(QLayout* layout, QLayout* other)
{
//transfer all children widgets from other to layout parent widget
QWidget* parent = layout->parentWidget();
if (!parent) {
//keep the reference while the layout is orphan
Shiboken::AutoDecRef pyParent(%CONVERTTOPYTHON[QLayout*](layout));
Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[QLayout*](other));
Shiboken::Object::keepReference(reinterpret_cast<SbkObject*>(pyParent.object()), retrieveObjectName(pyParent).data(), pyChild, true);
return;
}
for (int i=0, i_max=other->count(); i < i_max; i++) {
QLayoutItem* item = other->itemAt(i);
if (PyErr_Occurred() || !item)
return;
addLayoutOwnership(layout, item);
}
Shiboken::AutoDecRef pyParent(%CONVERTTOPYTHON[QLayout*](layout));
Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[QLayout*](other));
Shiboken::Object::setParent(pyParent, pyChild);
}
inline void addLayoutOwnership(QLayout* layout, QLayoutItem* item)
{
if (!item)
return;
QWidget* w = item->widget();
if (w)
addLayoutOwnership(layout, w);
else {
QLayout* l = item->layout();
if (l)
addLayoutOwnership(layout, l);
}
Shiboken::AutoDecRef pyParent(%CONVERTTOPYTHON[QLayout*](layout));
Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[QLayoutItem*](item));
Shiboken::Object::setParent(pyParent, pyChild);
}
static void removeWidgetFromLayout(QLayout* layout, QWidget* widget)
{
QWidget* parent = widget->parentWidget();
if (!parent) {
//remove reference on layout
Shiboken::AutoDecRef pyParent(%CONVERTTOPYTHON[QWidget*](layout));
Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[QWidget*](widget));
Shiboken::Object::removeReference(reinterpret_cast<SbkObject*>(pyParent.object()), retrieveObjectName(pyParent).data(), pyChild);
} else {
//give the ownership to parent
Shiboken::AutoDecRef pyParent(%CONVERTTOPYTHON[QWidget*](parent));
Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[QWidget*](widget));
Shiboken::Object::setParent(pyParent, pyChild);
}
}
inline void removeLayoutOwnership(QLayout* layout, QLayoutItem* item)
{
QWidget* w = item->widget();
if (w)
removeWidgetFromLayout(layout, w);
else {
QLayout* l = item->layout();
if (l)
removeLayoutOwnership(layout, l);
}
Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[QLayoutItem*](item));
Shiboken::Object::invalidate(pyChild);
Shiboken::Object::setParent(0, pyChild);
}
inline void removeLayoutOwnership(QLayout* layout, QWidget* widget)
{
if (!widget)
return;
for (int i=0, i_max=layout->count(); i < i_max; i++) {
QLayoutItem* item = layout->itemAt(i);
if (PyErr_Occurred() || !item)
return;
if (item->widget() == widget)
removeLayoutOwnership(layout, item);
}
}

View file

@ -0,0 +1,21 @@
inline PyObject* addActionWithPyObject(QMenu* self, const QIcon& icon, const QString& text, PyObject* callback, const QKeySequence& shortcut)
{
QAction* act = new QAction(text, self);
if (!icon.isNull())
act->setIcon(icon);
if (!shortcut.isEmpty())
act->setShortcut(shortcut);
self->addAction(act);
PyObject* pyAct = %CONVERTTOPYTHON[QAction*](act);
Shiboken::AutoDecRef result(PyObject_CallMethod(pyAct, "connect", "OsO", pyAct, SIGNAL(triggered()), callback));
if (result.isNull()) {
Py_DECREF(pyAct);
return 0;
}
return pyAct;
}

View file

@ -1,23 +0,0 @@
inline PyObject*
addActionWithPyObject(QMenu *self, const QIcon& icon, const QString& text, PyObject *callback, const QKeySequence &shortcut)
{
QAction *act = new QAction(text, self);
if (!icon.isNull())
act->setIcon(icon);
if (!shortcut.isEmpty())
act->setShortcut(shortcut);
self->addAction(act);
PyObject *pyAct = Shiboken::Converter<QAction*>::toPython(act);
PyObject* result = PyObject_CallMethod(pyAct, "connect", "OsO", pyAct, SIGNAL(triggered(bool)), callback);
if (result == 0) {
Py_DECREF(pyAct);
return 0;
}
return pyAct;
}

View file

@ -5,7 +5,7 @@ addActionWithPyObject(QMenuBar* self, const QString& text, PyObject* callback)
self->addAction(act); self->addAction(act);
PyObject* pyAct = Shiboken::Converter<QAction*>::toPython(act); PyObject* pyAct = %CONVERTTOPYTHON[QAction*](act);
PyObject* result = PyObject_CallMethod(pyAct, "connect", "OsO", pyAct, PyObject* result = PyObject_CallMethod(pyAct, "connect", "OsO", pyAct,
SIGNAL(triggered(bool)), callback); SIGNAL(triggered(bool)), callback);

View file

@ -1,4 +1,10 @@
// Init qApp macro to None. // Init qApp macro to None.
Py_INCREF(Py_None); if (qApp) {
PyModule_AddObject(module, "qApp", Py_None); PyObject* pyApp = %CONVERTTOPYTHON[QApplication*](qApp);
Py_INCREF(pyApp);
PyModule_AddObject(module, "qApp", pyApp);
} else {
Py_INCREF(Py_None);
PyModule_AddObject(module, "qApp", Py_None);
}
moduleQtGui = module; moduleQtGui = module;

View file

@ -0,0 +1,65 @@
static QString retrieveObjectName(PyObject *obj)
{
Shiboken::AutoDecRef objName(PyObject_Str(obj));
return QString(Shiboken::String::toCString(objName));
}
/**
* Tranfer objects ownership from layout to widget
**/
static inline void qwidgetReparentLayout(QWidget *parent, QLayout *layout)
{
Shiboken::AutoDecRef pyParent(%CONVERTTOPYTHON[QWidget*](parent));
for (int i=0; i < layout->count(); i++) {
QLayoutItem* item = layout->itemAt(i);
if (PyErr_Occurred() || !item)
return;
QWidget* w = item->widget();
if (w) {
QWidget* pw = w->parentWidget();
if (pw != parent) {
Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[QWidget*](w));
Shiboken::Object::setParent(pyParent, pyChild);
}
} else {
QLayout* l = item->layout();
if (l)
qwidgetReparentLayout(parent, l);
}
}
Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[QLayout*](layout));
Shiboken::Object::setParent(pyParent, pyChild);
//remove previous references
Shiboken::Object::keepReference(reinterpret_cast<SbkObject*>(pyChild.object()), qPrintable(retrieveObjectName(pyChild)), Py_None);
}
static inline void qwidgetSetLayout(QWidget *self, QLayout *layout)
{
if (!layout || self->layout())
return;
QObject* oldParent = layout->parent();
if (oldParent && oldParent != self) {
if (oldParent->isWidgetType()) {
// remove old parent policy
Shiboken::AutoDecRef pyLayout(%CONVERTTOPYTHON[QLayout*](layout));
Shiboken::Object::setParent(Py_None, pyLayout);
} else {
PyErr_Format(PyExc_RuntimeError, "QWidget::setLayout: Attempting to set QLayout \"%s\" on %s \"%s\", when the QLayout already has a parent",
qPrintable(layout->objectName()), self->metaObject()->className(), qPrintable(self->objectName()));
return;
}
}
if (oldParent != self) {
qwidgetReparentLayout(self, layout);
if (PyErr_Occurred())
return;
self->setLayout(layout);
}
}

View file

@ -1,39 +0,0 @@
/**
* Tranfer objects ownership from layout to widget
**/
static inline void
qwidgetReparentLayout(QWidget *parent, QLayout *layout)
{
Shiboken::AutoDecRef pyParent(Shiboken::Converter<QWidget*>::toPython(parent));
for (int i=0; i < layout->count(); i++)
{
QLayoutItem *item = layout->itemAt(i);
QWidget *w = item->widget();
if (w)
{
Shiboken::AutoDecRef pyChild(Shiboken::Converter<QWidget*>::toPython(w));
Shiboken::setParent(pyParent, pyChild);
}
else
{
QLayout *l = item->layout();
if (l)
qwidgetReparentLayout(parent, l);
}
}
Shiboken::AutoDecRef pyChild(Shiboken::Converter<QLayout*>::toPython(layout));
Shiboken::setParent(pyParent, pyChild);
}
static inline void
qwidgetSetLayout(QWidget *self, QLayout *layout)
{
if (self->layout())
return;
qwidgetReparentLayout(self, layout);
self->setLayout(layout);
}

View file

@ -1,44 +0,0 @@
namespace Shiboken {
inline bool Converter< QPixmap >::isConvertible(PyObject* pyobj)
{
if (ValueTypeConverter<QPixmap>::isConvertible(pyobj))
return true;
SbkBaseWrapperType* shiboType = reinterpret_cast<SbkBaseWrapperType*>(SbkType<QPixmap>());
bool isVariant = SbkQVariant_Check(pyobj);
if (isVariant) {
QVariant var(Converter<QVariant>::toCpp(pyobj));
return var.type() == QVariant::Pixmap;
} else if (SbkQSize_Check(pyobj) || SbkQString_Check(pyobj)) {
return true;
} else if (shiboType->ext_isconvertible) {
return shiboType->ext_isconvertible(pyobj);
}
return false;
}
inline QPixmap Converter< QPixmap >::toCpp(PyObject* pyobj)
{
SbkBaseWrapperType* shiboType = reinterpret_cast<SbkBaseWrapperType*>(SbkType<QPixmap>());
bool isVariant = SbkQVariant_Check(pyobj);
if (isVariant) {
QVariant var(Converter<QVariant>::toCpp(pyobj));
return var.value<QPixmap>();
} else if (SbkQSize_Check(pyobj)) {
return QPixmap(Shiboken::Converter<QSize& >::toCpp(pyobj));
} else if (SbkQString_Check(pyobj)) {
return QPixmap(Shiboken::Converter<QString& >::toCpp(pyobj));
} else if (shiboType->ext_isconvertible && shiboType->ext_tocpp && shiboType->ext_isconvertible(pyobj)) {
QPixmap* cptr = reinterpret_cast<QPixmap*>(shiboType->ext_tocpp(pyobj));
std::auto_ptr<QPixmap> cptr_auto_ptr(cptr);
return *cptr;
}
return *Converter<QPixmap*>::toCpp(pyobj);
}
inline PyObject* Converter<QPixmap>::toPython(const QPixmap& cppObj)
{
return ValueTypeConverter<QPixmap>::toPython(cppObj);
}
}

View file

@ -1,6 +1,25 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!--
This file is part of PySide project.
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
Contact: PySide team <contact@pyside.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-->
<typesystem package="PySide.QtGui"> <typesystem package="PySide.QtGui">
<load-typesystem name="typesystem_core.xml" generate="no"/> <load-typesystem name="typesystem_core.xml" generate="no"/>
<!-- TODO: Replace x11 for a proper variable which identifies the current platform --> <load-typesystem name="typesystem_gui_@AUTO_OS@.xml" generate="yes"/>
<load-typesystem name="typesystem_gui_x11.xml" generate="yes"/> <load-typesystem name="typesystem_gui_common.xml" generate="yes"/>
</typesystem> </typesystem>

File diff suppressed because it is too large Load diff

View file

@ -1,12 +1,34 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<typesystem package="PySide.QtGui"> <!--
This file is part of PySide project.
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
Contact: PySide team <contact@pyside.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-->
<typesystem package="PySide.QtGui">
<rejection class="*" function-name="qt_mac_set_cursor"/> <rejection class="*" function-name="qt_mac_set_cursor"/>
<rejection class="*" function-name="macMenu"/> <rejection class="*" function-name="macMenu"/>
<!-- qApp macro register --> <primitive-type name="Qt::HANDLE" target-lang-api-name="PyObject"/>
<inject-code class="target" file="glue/qtgui_boost.cpp" position="end"/> <object-type name="QMacStyle" >
<inject-code class="native" file="glue/qtgui_glue.cpp" position="beginning"/> <enum-type name="FocusRectPolicy"/>
<enum-type name="WidgetSizePolicy"/>
</object-type>
<load-typesystem name="typesystem_gui.xml" generate="yes"/> <suppress-warning text="enum 'QPixmap::ShareMode' does not have a type entry or is not an enum" />
<suppress-warning text="enum 'QSysInfo::Endian' is specified in typesystem, but not declared" />
<suppress-warning text="type 'QGtkStyle' is specified in typesystem, but not defined. This could potentially lead to compilation errors." />
</typesystem> </typesystem>

View file

@ -0,0 +1,30 @@
<?xml version="1.0"?>
<!--
This file is part of PySide project.
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
Contact: PySide team <contact@pyside.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-->
<typesystem package="PySide.QtGui">
<object-type name="QAbstractKineticScroller">
<enum-type name="Mode"/>
<enum-type name="OvershootPolicy"/>
<enum-type name="State"/>
</object-type>
<load-typesystem name="typesystem_gui_x11.xml" generate="yes"/>
</typesystem>

View file

@ -0,0 +1,52 @@
<?xml version="1.0"?>
<!--
This file is part of PySide project.
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
Contact: PySide team <contact@pyside.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-->
<typesystem package="PySide.QtGui">
<!-- These classes are not present in Qt Simulator build, even though
QT_NO_PRINTER is *not* set -->
<rejection class="QAbstractPageSetupDialog"/>
<rejection class="QAbstractPrintDialog"/>
<rejection class="QPageSetupDialog"/>
<rejection class="QPrintDialog"/>
<rejection class="QPrintPreviewDialog"/>
<rejection class="QPrintPreviewWidget"/>
<rejection class="QPrintEngine"/>
<rejection class="QPrinterInfo"/>
<rejection class="QPrinter"/>
<object-type name="QPlainTextEdit">
<modify-function signature="print(QPrinter*)const" remove="all"/>
</object-type>
<object-type name="QTextDocument">
<modify-function signature="print(QPrinter*)const" remove="all"/>
</object-type>
<object-type name="QTextEdit">
<modify-function signature="print(QPrinter*)const" remove="all"/>
</object-type>
<!-- Qt::HANDLE is typedef to "void *", which gives compilation errors on
conversion templates -->
<value-type name="QCursor">
<modify-function signature="QCursor(Qt::HANDLE)" remove="all"/>
</value-type>
<value-type name="QFont">
<modify-function signature="handle()const" remove="all"/>
</value-type>
</typesystem>

View file

@ -0,0 +1,49 @@
<?xml version="1.0"?>
<!--
This file is part of PySide project.
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
Contact: PySide team <contact@pyside.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-->
<typesystem package="PySide.QtGui">
<primitive-type name="WId" target-lang-api-name="PyObject">
<conversion-rule>
<native-to-target>
#ifdef IS_PY3K
return PyCapsule_New(%in, 0, 0);
#else
return PyCObject_FromVoidPtr(%in, 0);
#endif
</native-to-target>
<target-to-native>
<add-conversion type="PyNone">
%out = 0;
</add-conversion>
<add-conversion check="checkPyCapsuleOrPyCObject(%in)" type="PyObject">
#ifdef IS_PY3K
%out = (%OUTTYPE)PyCapsule_GetPointer(%in, 0);
#else
%out = (%OUTTYPE)PyCObject_AsVoidPtr(%in);
#endif
</add-conversion>
</target-to-native>
</conversion-rule>
</primitive-type>
<inject-code class="native" position="beginning">
<insert-template name="checkPyCapsuleOrPyCObject_func"/>
</inject-code>
<enum-type name="QPixmap::HBitmapFormat" />
</typesystem>

View file

@ -1,12 +1,50 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!--
This file is part of PySide project.
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
Contact: PySide team <contact@pyside.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-->
<typesystem package="PySide.QtGui"> <typesystem package="PySide.QtGui">
<rejection class="" function-name="qt_x11_getX11InfoForWindow"/> <rejection class="" function-name="qt_x11_getX11InfoForWindow"/>
<rejection class="QX11Info" field-name="x11data"/> <rejection class="QX11Info" field-name="x11data"/>
<value-type name="QX11Info"> <value-type name="QX11Info">
<modify-function signature="visual()const" remove="all"/> <add-function signature="display()" return-type="unsigned long" static="yes">
<modify-function signature="appVisual(int)" remove="all"/> <inject-code>
%PYARG_0 = PyLong_FromVoidPtr(%TYPE::%FUNCTION_NAME());
</inject-code>
</add-function>
<modify-function signature="visual()const">
<inject-code>
%PYARG_0 = PyLong_FromVoidPtr(%CPPSELF.%FUNCTION_NAME());
</inject-code>
</modify-function>
<modify-function signature="appVisual(int)">
<inject-code>
%PYARG_0 = PyLong_FromVoidPtr(%CPPSELF.%FUNCTION_NAME());
</inject-code>
</modify-function>
</value-type> </value-type>
<object-type name="QX11EmbedContainer">
<enum-type name="Error"/>
</object-type>
<object-type name="QX11EmbedWidget">
<enum-type name="Error"/>
</object-type>
<load-typesystem name="typesystem_gui_common.xml" generate="yes"/> <enum-type name="QPixmap::ShareMode"/>
</typesystem> </typesystem>

View file

@ -0,0 +1,42 @@
project(QtHelp)
set(QtHelp_SRC
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtHelp/qhelpcontentitem_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtHelp/qhelpcontentmodel_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtHelp/qhelpcontentwidget_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtHelp/qhelpenginecore_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtHelp/qhelpengine_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtHelp/qhelpindexmodel_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtHelp/qhelpindexwidget_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtHelp/qhelpsearchengine_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtHelp/qhelpsearchquerywidget_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtHelp/qhelpsearchquery_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtHelp/qhelpsearchresultwidget_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtHelp/qthelp_module_wrapper.cpp
)
set(QtHelp_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtHelp_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}")
set(QtHelp_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
${QT_QTCORE_INCLUDE_DIR}
${QT_QTGUI_INCLUDE_DIR}
${QT_QTHELP_INCLUDE_DIR}
${SHIBOKEN_PYTHON_INCLUDE_DIR}
${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
${QtGui_BINARY_DIR}/PySide/QtGui/
${QtCore_BINARY_DIR}/PySide/QtCore/
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtHelp)
set(QtHelp_libraries pyside
${SHIBOKEN_PYTHON_LIBRARIES}
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${QT_QTHELP_LIBRARY})
set(QtHelp_deps QtGui)
create_pyside_module(QtHelp
QtHelp_include_dirs
QtHelp_libraries
QtHelp_deps
QtHelp_typesystem_path
QtHelp_SRC
"")

View file

@ -0,0 +1,44 @@
<?xml version="1.0"?>
<!--
This file is part of PySide project.
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
Contact: PySide team <contact@pyside.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-->
<typesystem package="PySide.QtHelp">
<load-typesystem name="typesystem_gui.xml" generate="no" />
<value-type name="QHelpContentItem">
<modify-function signature="parent() const">
<modify-argument index="return">
<define-ownership owner="default"/>
</modify-argument>
</modify-function>
</value-type>
<object-type name="QHelpContentModel" polymorphic-id-expression="qobject_cast&lt;QHelpContentModel*&gt;(%1)"/>
<object-type name="QHelpContentWidget"/>
<object-type name="QHelpEngine" />
<object-type name="QHelpEngineCore"/>
<object-type name="QHelpIndexModel"/>
<object-type name="QHelpIndexWidget"/>
<object-type name="QHelpSearchEngine"/>
<value-type name="QHelpSearchQuery">
<enum-type name="FieldName"/>
</value-type>
<object-type name="QHelpSearchQueryWidget"/>
<object-type name="QHelpSearchResultWidget"/>
</typesystem>

View file

@ -0,0 +1,50 @@
project(QtMaemo5)
set(QtMaemo5_SRC
${CMAKE_CURRENT_BINARY_DIR}/${BINDING_NAME}/QtMaemo5/qmaemo5abstractpickselector_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/${BINDING_NAME}/QtMaemo5/qmaemo5datepickselector_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/${BINDING_NAME}/QtMaemo5/qmaemo5editbar_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/${BINDING_NAME}/QtMaemo5/qmaemo5informationbox_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/${BINDING_NAME}/QtMaemo5/qmaemo5listpickselector_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/${BINDING_NAME}/QtMaemo5/qmaemo5timepickselector_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/${BINDING_NAME}/QtMaemo5/qmaemo5valuebutton_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/${BINDING_NAME}/QtMaemo5/qtmaemo5_module_wrapper.cpp
)
set(QtMaemo5_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtMaemo5_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}")
# QT_QTMAEMO5_* variables are not defined by CMake
if(NOT QT_QTMAEMO5_INCLUDE_DIR)
FIND_PATH(QT_QTMAEMO5_INCLUDE_DIR QtMaemo5
PATHS ${QT_HEADERS_DIR}/QtMaemo5 NO_DEFAULT_PATH)
endif()
if(NOT QT_QTMAEMO5_LIBRARY)
FIND_LIBRARY(QT_QTMAEMO5_LIBRARY QtMaemo5
PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
endif()
set(QtMaemo5_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
${QT_QTCORE_INCLUDE_DIR}
${QT_QTGUI_INCLUDE_DIR}
${QT_QTMAEMO5_INCLUDE_DIR}
${SHIBOKEN_PYTHON_INCLUDE_DIR}
${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
${QtCore_BINARY_DIR}/${BINDING_NAME}/QtCore/
${QtGui_BINARY_DIR}/${BINDING_NAME}/QtGui/
${CMAKE_CURRENT_BINARY_DIR}/${BINDING_NAME}/QtMaemo5)
set(QtMaemo5_libraries pyside
${SHIBOKEN_PYTHON_LIBRARIES}
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${QT_QTMAEMO5_LIBRARY})
set(QtMaemo5_deps QtGui)
create_pyside_module(QtMaemo5
QtMaemo5_include_dirs
QtMaemo5_libraries
QtMaemo5_deps
QtMaemo5_typesystem_path
QtMaemo5_SRC
"")

View file

@ -0,0 +1,89 @@
<?xml version="1.0"?>
<!--
This file is part of PySide project.
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
Contact: PySide team <contact@pyside.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-->
<typesystem package="PySide.QtMaemo5">
<load-typesystem name="typesystem_gui.xml" generate="no"/>
<object-type name="QMaemo5AbstractPickSelector">
<modify-function signature="widget(QWidget*)">
<modify-argument index="return">
<parent index="1" action="add"/>
</modify-argument>
</modify-function>
</object-type>
<object-type name="QMaemo5DatePickSelector"/>
<object-type name="QMaemo5EditBar">
<modify-function signature="addButton(QAbstractButton*)">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
<modify-function signature="removeButton(QAbstractButton*)">
<modify-argument index="1">
<parent index="this" action="remove"/>
</modify-argument>
</modify-function>
</object-type>
<object-type name="QMaemo5InformationBox">
<modify-function signature="setWidget(QWidget*)">
<modify-argument index="1">
<reference-count action="set"/>
</modify-argument>
</modify-function>
<modify-function signature="paintEvent(QPaintEvent*)">
<modify-argument index="1" invalidate-after-use="yes"/>
</modify-function>
<modify-function signature="showEvent(QShowEvent*)">
<modify-argument index="1" invalidate-after-use="yes"/>
</modify-function>
</object-type>
<object-type name="QMaemo5ListPickSelector">
<modify-function signature="setModel(QAbstractItemModel*)">
<modify-argument index="1">
<reference-count action="set"/>
</modify-argument>
</modify-function>
<modify-function signature="widget(QWidget*)">
<modify-argument index="return">
<parent index="1" action="add"/>
</modify-argument>
</modify-function>
</object-type>
<object-type name="QMaemo5TimePickSelector"/>
<object-type name="QMaemo5ValueButton">
<enum-type name="ValueLayout"/>
<modify-function signature="setPickSelector(QMaemo5AbstractPickSelector*)">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
<modify-function signature="paintEvent(QPaintEvent*)">
<modify-argument index="1" invalidate-after-use="yes"/>
</modify-function>
</object-type>
</typesystem>

View file

@ -0,0 +1,48 @@
project(QtMultimedia)
set(QtMultimedia_SRC
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMultimedia/qaudio_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMultimedia/qabstractvideobuffer_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMultimedia/qaudioenginefactoryinterface_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMultimedia/qvideosurfaceformat_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMultimedia/qabstractvideosurface_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMultimedia/qaudiodeviceinfo_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMultimedia/qabstractaudiodeviceinfo_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMultimedia/qabstractaudiooutput_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMultimedia/qabstractaudioinput_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMultimedia/qaudioengineplugin_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMultimedia/qaudioformat_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMultimedia/qaudioinput_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMultimedia/qaudiooutput_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMultimedia/qvideoframe_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMultimedia/qtmultimedia_module_wrapper.cpp
)
set(QtMultimedia_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}")
set(QtMultimedia_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMultimedia/
${QT_INCLUDE_DIR}
${QT_QTCORE_INCLUDE_DIR}
${QT_QTGUI_INCLUDE_DIR}
${QT_QTMULTIMEDIA_INCLUDE_DIR}
${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_BINARY_DIR}/PySide/QtCore/
${QtGui_BINARY_DIR}/PySide/QtGui/)
set(QtMultimedia_libraries pyside
${SHIBOKEN_PYTHON_LIBRARIES}
${SHIBOKEN_LIBRARY}
${QT_QTMULTIMEDIA_LIBRARY}
${QT_QTGUI_LIBRARY})
set(QtMultimedia_deps QtGui)
create_pyside_module(QtMultimedia
QtMultimedia_include_dirs
QtMultimedia_libraries
QtMultimedia_deps
QtMultimedia_typesystem_path
QtMultimedia_SRC
"")

View file

@ -0,0 +1,151 @@
<?xml version="1.0"?>
<!--
This file is part of PySide project.
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
Contact: PySide team <contact@pyside.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-->
<typesystem package="PySide.QtMultimedia">
<load-typesystem name="typesystem_gui.xml" generate="no" />
<rejection class="" function-name="qobject_cast&lt;QAudioEngineFactoryInterface*&gt;"/>
<rejection class="" function-name="qobject_interface_iid&lt;QAudioEngineFactoryInterface*&gt;"/>
<namespace-type name="QAudio">
<enum-type name="Error"/>
<enum-type name="Mode"/>
<enum-type name="State"/>
</namespace-type>
<value-type name="QVideoSurfaceFormat">
<enum-type name="Direction"/>
<enum-type name="YCbCrColorSpace"/>
</value-type>
<object-type name="QAbstractVideoBuffer">
<enum-type name="HandleType"/>
<enum-type name="MapMode"/>
<modify-function signature="map(QAbstractVideoBuffer::MapMode, int*, int*)" remove="all"/>
<!-- TODO: discuss a way to have this working with the virtual method.
<modify-function signature="map(QAbstractVideoBuffer::MapMode, int*, int*)">
<modify-argument index="0">
<replace-type modified-type="PyObject"/>
</modify-argument>
<modify-argument index="2">
<remove-argument/>
</modify-argument>
<modify-argument index="3">
<remove-argument/>
</modify-argument>
<inject-code class="target" position="beginning">
<insert-template name="fix_arg,int*,int*"/>
</inject-code>
</modify-function>
-->
</object-type>
<object-type name="QAbstractVideoSurface">
<enum-type name="Error"/>
</object-type>
<object-type name="QVideoFrame">
<enum-type name="FieldType"/>
<enum-type name="PixelFormat"/>
</object-type>
<value-type name="QAudioFormat">
<enum-type name="Endian"/>
<enum-type name="SampleType"/>
</value-type>
<value-type name="QAudioDeviceInfo"/>
<object-type name="QAbstractAudioDeviceInfo"/>
<object-type name="QAbstractAudioOutput">
<modify-function signature="start(QIODevice *)">
<modify-argument index="return">
<define-ownership class="target" owner="c++"/>
</modify-argument>
</modify-function>
</object-type>
<object-type name="QAbstractAudioInput">
<modify-function signature="start(QIODevice *)">
<modify-argument index="return">
<define-ownership class="target" owner="c++"/>
</modify-argument>
</modify-function>
</object-type>
<object-type name="QAudioEnginePlugin">
<modify-function signature="createInput(const QByteArray&amp;, const QAudioFormat&amp;)">
<modify-argument index="return">
<define-ownership class="target" owner="default"/>
</modify-argument>
</modify-function>
<modify-function signature="createOutput(const QByteArray&amp;, const QAudioFormat&amp;)">
<modify-argument index="return">
<define-ownership class="target" owner="default"/>
</modify-argument>
</modify-function>
<modify-function signature="createDeviceInfo(const QByteArray&amp;, QAudio::Mode)">
<modify-argument index="return">
<define-ownership class="target" owner="default"/>
</modify-argument>
</modify-function>
</object-type>
<object-type name="QAudioEngineFactoryInterface">
<modify-function signature="createInput(const QByteArray&amp;, const QAudioFormat&amp;)">
<modify-argument index="return">
<define-ownership class="target" owner="default"/>
</modify-argument>
</modify-function>
<modify-function signature="createOutput(const QByteArray&amp;, const QAudioFormat&amp;)">
<modify-argument index="return">
<define-ownership class="target" owner="default"/>
</modify-argument>
</modify-function>
<modify-function signature="createDeviceInfo(const QByteArray&amp;, QAudio::Mode)">
<modify-argument index="return">
<define-ownership class="target" owner="default"/>
</modify-argument>
</modify-function>
</object-type>
<object-type name="QAudioInput">
<modify-function signature="start()">
<modify-argument index="return">
<define-ownership class="target" owner="c++"/>
</modify-argument>
</modify-function>
<modify-function signature="start(QIODevice*)">
<modify-argument index="1">
<define-ownership class="target" owner="c++"/>
</modify-argument>
</modify-function>
</object-type>
<object-type name="QAudioOutput">
<modify-function signature="start()">
<modify-argument index="return">
<define-ownership class="target" owner="c++"/>
</modify-argument>
</modify-function>
<modify-function signature="start(QIODevice*)">
<modify-argument index="1">
<define-ownership class="target" owner="c++"/>
</modify-argument>
</modify-function>
</object-type>
</typesystem>

View file

@ -1,119 +1,83 @@
project(QtNetwork) project(QtNetwork)
# Check QtNetwork support if (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} GREATER 6)
macro(CHECK_QT_NETWORK_MACRO macro_display_name qt_macro module_sources global_sources) set (QtNetwork_47_SRC
if (DEFINED PYSIDE_${qt_macro}) ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkconfiguration_wrapper.cpp
if (PYSIDE_${qt_macro}) ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkconfigurationmanager_wrapper.cpp
list(APPEND ${global_sources} ${${module_sources}}) ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworksession_wrapper.cpp
endif()
else()
set(SRC_FILE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/test${qt_macro}.cxx)
file(WRITE ${SRC_FILE}
"#include <QtNetwork>\n"
"int main() { \n"
"#ifdef ${qt_macro}\n"
"#error not supported.\n"
"#endif\n"
"}\n")
try_compile(Q_WORKS ${CMAKE_BINARY_DIR}
${SRC_FILE}
CMAKE_FLAGS
-DINCLUDE_DIRECTORIES:STRING=${QT_QTNETWORK_INCLUDE_DIR}\;${QT_INCLUDE_DIR}
-DLINK_LIBRARIES:PATH=${QT_QTNETWORK_LIBRARY_RELEASE}
OUTPUT_VARIABLE OUTPUT)
set("PYSIDE_${qt_macro}" ${Q_WORKS} CACHE STRING "Has this Qt module been found by pyside?")
if(Q_WORKS)
message(STATUS "Testing support to ${macro_display_name} -- enabled")
list(APPEND ${global_sources} ${${module_sources}})
else()
message(STATUS "Testing support to ${macro_display_name} -- disabled")
endif()
endif()
endmacro(CHECK_QT_NETWORK_MACRO)
if(Q_WS_X11)
set(MODULE_NAME network_x11)
set(SPECIFIC_OS_FILES
)
elseif(Q_WS_MAC)
set(MODULE_NAME network_mac)
set(SPECIFIC_OS_FILES
) )
else() else()
message(FATAL_ERROR "OS not supported") set(QtNetwork_47_SRC )
endif(Q_WS_X11) endif ()
if (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6) set(QtNetwork_OPTIONAL_SRC )
set (QtNetwork_46_SRC ) set(QtNetwork_DROPPED_ENTRIES )
else() check_qt_class(QtNetwork QSslCertificate QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
set(QtNetwork_46_SRC check_qt_class(QtNetwork QSslCipher QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
) check_qt_class(QtNetwork QSslConfiguration QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
endif (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6) check_qt_class(QtNetwork QSslError QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
check_qt_class(QtNetwork QSslKey QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
check_qt_class(QtNetwork QSslSocket QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
set(QtNetwork_SRC set(QtNetwork_SRC
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qabstractnetworkcache_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qabstractsocket_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qabstractsocket_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qauthenticator_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qauthenticator_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qftp_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qftp_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qhostaddress_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qhostaddress_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qhostinfo_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qhostinfo_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qhttp_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qhttpheader_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qhttpheader_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qhttprequestheader_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qhttprequestheader_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qhttpresponseheader_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qhttpresponseheader_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qhttp_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qipv6address_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qipv6address_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qlocalserver_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qlocalserver_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qlocalsocket_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qlocalsocket_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkaccessmanager_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkaccessmanager_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkaddressentry_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkaddressentry_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkcookiejar_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkcachemetadata_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkcookie_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkcookie_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkcookiejar_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkdiskcache_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkinterface_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkinterface_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkproxy_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkproxy_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkproxyfactory_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkproxyquery_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkreply_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkreply_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkrequest_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkrequest_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qsslcipher_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qsslconfiguration_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qsslerror_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qsslkey_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qsslsocket_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qssl_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qssl_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qtcpserver_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qtcpserver_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qtcpsocket_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qtcpsocket_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qtnetwork_module_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qtnetwork_module_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qudpsocket_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qudpsocket_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qurlinfo_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qurlinfo_wrapper.cpp
${SPECIFIC_OS_FILES}
${QtNetwork_46_SRC} ${QtNetwork_47_SRC}
${QtNetwork_OPTIONAL_SRC}
) )
execute_generator(network QtNetwork_SRC "${CMAKE_CURRENT_BINARY_DIR}:${QtCore_SOURCE_DIR}") set(QtNetwork_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}")
set(QtNetwork_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/
${QT_INCLUDE_DIR} ${QT_INCLUDE_DIR}
${QT_QTNETWORK_INCLUDE_DIR} ${QT_QTNETWORK_INCLUDE_DIR}
${SHIBOKEN_INCLUDE_DIR} ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR} ${libpyside_SOURCE_DIR}
${PYTHON_INCLUDE_PATH} ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_BINARY_DIR}/PySide/QtCore/ ${QtCore_BINARY_DIR}/PySide/QtCore/)
) set(QtNetwork_libraries pyside
${SHIBOKEN_PYTHON_LIBRARIES}
add_library(QtNetwork MODULE ${QtNetwork_SRC})
set_property(TARGET QtNetwork PROPERTY PREFIX "")
target_link_libraries(QtNetwork
pyside
${PYTHON_LIBRARIES}
${SHIBOKEN_LIBRARY} ${SHIBOKEN_LIBRARY}
${QT_QTNETWORK_LIBRARY} ${QT_QTNETWORK_LIBRARY})
)
add_dependencies(QtNetwork QtCore)
# install set(QtNetwork_deps QtCore)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/QtNetwork.so
DESTINATION ${SITE_PACKAGE}/PySide) create_pyside_module(QtNetwork
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/pyside_qtnetwork_python.h QtNetwork_include_dirs
DESTINATION include/PySide/QtNetwork/) QtNetwork_libraries
QtNetwork_deps
QtNetwork_typesystem_path
QtNetwork_SRC
""
""
QtNetwork_DROPPED_ENTRIES)

View file

@ -1,6 +0,0 @@
char data[%ARGUMENT_NAMES];
QHostAddress ha;
quint16 port;
%RETURN_TYPE retval = %CPPSELF.%FUNCTION_NAME(data, %ARGUMENT_NAMES, &ha, &port);
%PYARG_0 = Shiboken::makeTuple(QByteArray(data, retval), ha, port);

View file

@ -1,49 +1,45 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!--
This file is part of PySide project.
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
Contact: PySide team <contact@pyside.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-->
<typesystem package="PySide.QtNetwork"> <typesystem package="PySide.QtNetwork">
<load-typesystem name="typesystem_core.xml" generate="no" /> <load-typesystem name="typesystem_core.xml" generate="no"/>
<namespace-type name="QSsl"> <namespace-type name="QSsl">
<enum-type name="AlternateNameEntryType"/>
<enum-type name="EncodingFormat"/>
<enum-type name="KeyAlgorithm"/>
<enum-type name="KeyType"/>
<enum-type name="SslProtocol"/>
<extra-includes> <extra-includes>
<include file-name="qssl.h" location="global"/> <include file-name="qssl.h" location="global"/>
</extra-includes> </extra-includes>
</namespace-type> </namespace-type>
<rejection class="QIPv6Address" field-name="c"/> <rejection class="QIPv6Address" field-name="c"/>
<rejection class="QSslCertificate"/>
<enum-type name="QAbstractSocket::NetworkLayerProtocol"/>
<enum-type name="QAbstractSocket::SocketError"/>
<enum-type name="QAbstractSocket::SocketState"/>
<enum-type name="QAbstractSocket::SocketType"/>
<enum-type name="QFtp::Command"/>
<enum-type name="QFtp::Error"/>
<enum-type name="QFtp::State"/>
<enum-type name="QFtp::TransferMode"/>
<enum-type name="QFtp::TransferType"/>
<enum-type name="QHostAddress::SpecialAddress"/>
<enum-type name="QHttp::Error"/>
<enum-type name="QHttp::State"/>
<enum-type name="QHttp::ConnectionMode"/>
<enum-type name="QNetworkInterface::InterfaceFlag" flags="QNetworkInterface::InterfaceFlags"/>
<enum-type name="QNetworkProxy::Capability"/>
<enum-type name="QNetworkProxy::ProxyType"/>
<enum-type name="QUdpSocket::BindFlag" flags="QUdpSocket::BindMode"/>
<enum-type name="QUrlInfo::PermissionSpec"/>
<enum-type name="QHostInfo::HostInfoError"/>
<enum-type name="QSsl::KeyType"/>
<enum-type name="QSsl::EncodingFormat"/>
<enum-type name="QSsl::KeyAlgorithm"/>
<enum-type name="QSsl::AlternateNameEntryType"/>
<enum-type name="QSsl::SslProtocol"/>
<enum-type name="QLocalSocket::LocalSocketError"/>
<enum-type name="QLocalSocket::LocalSocketState"/>
<enum-type name="QNetworkAccessManager::Operation"/>
<enum-type name="QNetworkCookie::RawForm"/>
<enum-type name="QNetworkReply::NetworkError"/>
<enum-type name="QNetworkRequest::Attribute" extensible="yes"/>
<enum-type name="QNetworkRequest::CacheLoadControl"/>
<enum-type name="QNetworkRequest::KnownHeaders"/>
<object-type name="QAbstractSocket"> <object-type name="QAbstractSocket">
<enum-type name="NetworkLayerProtocol"/>
<enum-type name="SocketError"/>
<enum-type name="SocketOption" since="4.6"/>
<enum-type name="SocketState"/>
<enum-type name="SocketType"/>
<modify-function signature="connectToHost(const QString&amp;, quint16, QFlags&lt;QIODevice::OpenModeFlag>)" allow-thread="yes" /> <modify-function signature="connectToHost(const QString&amp;, quint16, QFlags&lt;QIODevice::OpenModeFlag>)" allow-thread="yes" />
<modify-function signature="connectToHost(const QHostAddress&amp;, quint16, QFlags&lt;QIODevice::OpenModeFlag>)" allow-thread="yes" /> <modify-function signature="connectToHost(const QHostAddress&amp;, quint16, QFlags&lt;QIODevice::OpenModeFlag>)" allow-thread="yes" />
<modify-function signature="disconnectFromHost()" allow-thread="yes" /> <modify-function signature="disconnectFromHost()" allow-thread="yes" />
@ -52,6 +48,11 @@
</object-type> </object-type>
<object-type name="QFtp"> <object-type name="QFtp">
<enum-type name="Command"/>
<enum-type name="Error"/>
<enum-type name="State"/>
<enum-type name="TransferMode"/>
<enum-type name="TransferType"/>
<modify-function signature="connectToHost(const QString&amp;, quint16)" allow-thread="yes" /> <modify-function signature="connectToHost(const QString&amp;, quint16)" allow-thread="yes" />
<modify-function signature="login(const QString&amp;, const QString&amp;)" allow-thread="yes" /> <modify-function signature="login(const QString&amp;, const QString&amp;)" allow-thread="yes" />
<modify-function signature="close()" allow-thread="yes" /> <modify-function signature="close()" allow-thread="yes" />
@ -80,7 +81,9 @@
</object-type> </object-type>
<object-type name="QHttp"> <object-type name="QHttp">
<modify-function signature="closeConnection()" remove="all"/> <enum-type name="ConnectionMode"/>
<enum-type name="Error"/>
<enum-type name="State"/>
<modify-function signature="readAll()" allow-thread="yes"/> <modify-function signature="readAll()" allow-thread="yes"/>
<modify-function signature="read(char*, qint64)" allow-thread="yes"> <modify-function signature="read(char*, qint64)" allow-thread="yes">
<modify-argument index="return"> <modify-argument index="return">
@ -93,6 +96,9 @@
<insert-template name="read_wrapper"/> <insert-template name="read_wrapper"/>
</inject-code> </inject-code>
</modify-function> </modify-function>
<!-- ### Obsolete methods -->
<modify-function signature="closeConnection()" remove="all"/>
<!-- ### -->
</object-type> </object-type>
<object-type name="QTcpServer"> <object-type name="QTcpServer">
<modify-function signature="waitForNewConnection(int,bool*)" allow-thread="yes"> <modify-function signature="waitForNewConnection(int,bool*)" allow-thread="yes">
@ -105,7 +111,7 @@
<remove-argument/> <remove-argument/>
</modify-argument> </modify-argument>
<modify-argument index="return"> <modify-argument index="return">
<replace-type modified-type="PyTuple*"/> <replace-type modified-type="(retval, timeOut)"/>
</modify-argument> </modify-argument>
<inject-code class="target" position="beginning"> <inject-code class="target" position="beginning">
<insert-template name="fix_args,bool*"/> <insert-template name="fix_args,bool*"/>
@ -114,6 +120,7 @@
</object-type> </object-type>
<object-type name="QTcpSocket"/> <object-type name="QTcpSocket"/>
<object-type name="QUdpSocket"> <object-type name="QUdpSocket">
<enum-type name="BindFlag" flags="BindMode"/>
<modify-function signature="readDatagram(char*, qint64, QHostAddress*, quint16*)" allow-thread="yes"> <modify-function signature="readDatagram(char*, qint64, QHostAddress*, quint16*)" allow-thread="yes">
<modify-argument index="1"> <modify-argument index="1">
<remove-argument/> <remove-argument/>
@ -127,19 +134,29 @@
<remove-argument/> <remove-argument/>
</modify-argument> </modify-argument>
<modify-argument index="return"> <modify-argument index="return">
<replace-type modified-type="PyTuple*"/> <replace-type modified-type="(data, address, port)"/>
</modify-argument> </modify-argument>
<inject-code class="target" position="beginning" file="glue/qudpsocket_read_datagram_glue.cpp"/> <inject-code class="target" position="beginning">
Shiboken::AutoArrayPointer&lt;char&gt; data(%ARGUMENT_NAMES);
QHostAddress ha;
quint16 port;
%BEGIN_ALLOW_THREADS
%RETURN_TYPE retval = %CPPSELF.%FUNCTION_NAME(data, %ARGUMENT_NAMES, &amp;ha, &amp;port);
%END_ALLOW_THREADS
QByteArray ba(data, retval);
%PYARG_0 = PyTuple_New(3);
PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[QByteArray](ba));
PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[QHostAddress](ha));
PyTuple_SET_ITEM(%PYARG_0, 2, %CONVERTTOPYTHON[quint16](port));
</inject-code>
</modify-function> </modify-function>
<modify-function signature="writeDatagram(const char*,qint64,QHostAddress,quint16)" remove="all"/>
<modify-function signature="writeDatagram(const QByteArray&amp;, const QHostAddress&amp;, quint16)" allow-thread="yes"/> <modify-function signature="writeDatagram(const QByteArray&amp;, const QHostAddress&amp;, quint16)" allow-thread="yes"/>
<!-- ### writeDatagram(QByteArray, ...) does the trick -->
<modify-function signature="writeDatagram(const char*,qint64,const QHostAddress&amp;,quint16)" remove="all"/>
<!-- ### -->
</object-type> </object-type>
<object-type name="QHttpHeader"> <object-type name="QHttpHeader" />
<modify-function signature="operator=(QHttpHeader)" remove="all"/>
<modify-function signature="QHttpHeader(QHttpHeader)" remove="all"/>
</object-type>
<object-type name="QLocalServer"> <object-type name="QLocalServer">
<modify-function signature="waitForNewConnection(int,bool*)" allow-thread="yes"> <modify-function signature="waitForNewConnection(int,bool*)" allow-thread="yes">
<!-- FIXME --> <!-- FIXME -->
@ -154,13 +171,30 @@
<insert-template name="fix_args,bool*"/> <insert-template name="fix_args,bool*"/>
</inject-code> </inject-code>
<modify-argument index="return"> <modify-argument index="return">
<replace-type modified-type="PyTuple*"/> <replace-type modified-type="(retval, timeOut)"/>
</modify-argument> </modify-argument>
</modify-function> </modify-function>
</object-type> </object-type>
<object-type name="QLocalSocket"/> <object-type name="QLocalSocket">
<enum-type name="LocalSocketError"/>
<enum-type name="LocalSocketState"/>
</object-type>
<object-type name="QNetworkAccessManager"> <object-type name="QNetworkAccessManager">
<enum-type name="NetworkAccessibility" since="4.7"/>
<enum-type name="Operation"/>
<modify-function signature="createRequest(QNetworkAccessManager::Operation, const QNetworkRequest&amp;, QIODevice *)">
<modify-argument index="3" invalidate-after-use="yes"/>
<modify-argument index="return">
<define-ownership class="target" owner="default"/>
</modify-argument>
</modify-function>
<modify-function signature="get(const QNetworkRequest&amp;)" allow-thread="yes"/>
<modify-function signature="post(const QNetworkRequest &amp;, QIODevice *)" allow-thread="yes"/>
<modify-function signature="post(const QNetworkRequest &amp;, const QByteArray &amp;)" allow-thread="yes"/>
<modify-function signature="put(const QNetworkRequest &amp;, QIODevice *)" allow-thread="yes"/>
<modify-function signature="put(const QNetworkRequest &amp;, const QByteArray &amp;)" allow-thread="yes"/>
<modify-function signature="sendCustomRequest(const QNetworkRequest &amp;, const QByteArray &amp;, QIODevice *)" allow-thread="yes" since="4.7" />
<modify-function signature="setCookieJar(QNetworkCookieJar*)"> <modify-function signature="setCookieJar(QNetworkCookieJar*)">
<modify-argument index="1"> <modify-argument index="1">
<define-ownership class="target" owner="c++"/> <define-ownership class="target" owner="c++"/>
@ -168,104 +202,143 @@
</modify-function> </modify-function>
</object-type> </object-type>
<object-type name="QNetworkCookieJar"/> <object-type name="QNetworkCookieJar"/>
<object-type name="QNetworkReply"/> <object-type name="QNetworkReply">
<enum-type name="NetworkError"/>
</object-type>
<value-type name="QHostAddress" hash-function="qHash"> <value-type name="QHostAddress" hash-function="qHash">
<enum-type name="SpecialAddress"/>
<!-- ### QHostAddress(QIPv6Address) does this -->
<modify-function signature="QHostAddress(quint8*)" remove="all" /> <modify-function signature="QHostAddress(quint8*)" remove="all" />
<modify-function signature="operator=(QString)" remove="all"/> <!-- ### -->
<modify-function signature="operator=(QHostAddress)" remove="all"/> <modify-function signature="setAddress(quint8*)" remove="all" />
<modify-function signature="writeDatagram(const char*,qint64,const QHostAddress&amp;,quint16)" remove="all" />
<!--
<inject-code class="target" position="end">
python::implicitly_convertible&lt;QHostAddress::SpecialAddress,QHostAddress&gt;();
</inject-code>
-->
</value-type> </value-type>
<value-type name="QHostInfo"> <value-type name="QHostInfo">
<modify-function signature="operator=(QHostInfo)" remove="all"/> <enum-type name="HostInfoError"/>
<modify-function signature="lookupHost(QString,QObject*,const char*)" access="private"/> <modify-function signature="lookupHost(QString,QObject*,const char*)" access="private"/>
</value-type> </value-type>
<value-type name="QHttpRequestHeader"> <value-type name="QHttpRequestHeader" />
<modify-function signature="operator=(QHttpRequestHeader)" remove="all"/>
</value-type>
<value-type name="QHttpResponseHeader"> <value-type name="QHttpResponseHeader" />
<modify-function signature="operator=(QHttpResponseHeader)" remove="all"/>
</value-type>
<value-type name="QNetworkAddressEntry"> <value-type name="QNetworkAddressEntry" />
<modify-function signature="operator=(QNetworkAddressEntry)" remove="all"/>
</value-type>
<value-type name="QNetworkInterface"> <value-type name="QNetworkInterface">
<modify-function signature="operator=(QNetworkInterface)" remove="all"/> <enum-type name="InterfaceFlag" flags="InterfaceFlags"/>
</value-type> </value-type>
<value-type name="QNetworkProxy"> <value-type name="QNetworkProxy">
<modify-function signature="operator=(QNetworkProxy)" remove="all"/> <enum-type name="Capability" flags="Capabilities" />
<enum-type name="ProxyType"/>
</value-type>
<object-type name="QNetworkProxyFactory" />
<value-type name="QNetworkProxyQuery">
<enum-type name="QueryType" />
</value-type> </value-type>
<value-type name="QUrlInfo"> <value-type name="QUrlInfo">
<modify-function signature="operator=(QUrlInfo)" remove="all"/> <enum-type name="PermissionSpec"/>
</value-type> </value-type>
<value-type name="QIPv6Address"> <value-type name="QIPv6Address">
<modify-function signature="operator[](int)const"> <add-function signature="__len__">
<remove/> <inject-code class="target" position="beginning">
</modify-function> return 16;
<modify-function signature="operator[](int)"> </inject-code>
<remove/> </add-function>
</modify-function> <add-function signature="__getitem__">
<inject-code class="target" position="beginning">
if (_i >= 16) {
PyErr_SetString(PyExc_IndexError, "index out of bounds");
return 0;
}
if (_i &lt; 0)
_i = 16 - qAbs(_i);
uint item = %CPPSELF.c[_i];
return %CONVERTTOPYTHON[uint](item);
</inject-code>
</add-function>
<add-function signature="__len__">
<inject-code class="target" position="beginning">
return 16;
</inject-code>
</add-function>
<add-function signature="__setitem__">
<inject-code class="target" position="beginning">
if (_i >= 16) {
PyErr_SetString(PyExc_IndexError, "index out of bounds");
return -1;
}
if (_i &lt; 0)
_i = 16 - qAbs(_i);
quint8 item = %CONVERTTOCPP[quint8](_value);
%CPPSELF.c[_i] = item;
return 0;
</inject-code>
</add-function>
</value-type> </value-type>
<value-type name="QAuthenticator"> <value-type name="QAuthenticator" />
<modify-function signature="operator=(QAuthenticator)" remove="all"/>
</value-type>
<value-type name="QNetworkCookie"> <value-type name="QNetworkCookie">
<modify-function signature="operator=(QNetworkCookie)" remove="all"/> <enum-type name="RawForm"/>
<extra-includes> <extra-includes>
<include file-name="QDateTime" location="global"/> <include file-name="QDateTime" location="global"/>
</extra-includes> </extra-includes>
</value-type> </value-type>
<value-type name="QNetworkRequest"> <value-type name="QNetworkRequest">
<modify-function signature="operator=(QNetworkRequest)" remove="all"/> <enum-type name="Attribute" extensible="yes"/>
<enum-type name="LoadControl" since="4.7"/>
<enum-type name="Priority" since="4.7"/>
<enum-type name="CacheLoadControl"/>
<enum-type name="KnownHeaders"/>
</value-type> </value-type>
<enum-type name="QSslError::SslError"/>
<enum-type name="QSslCertificate::SubjectInfo"/>
<enum-type name="QSslSocket::SslMode"/>
<enum-type name="QSslSocket::PeerVerifyMode"/>
<value-type name="QSslCipher"/>
<value-type name="QSslError"/>
<value-type name="QSslKey"/>
<!-- TODO QSslCertificate requires QMultiMap which isn't implemented yet <!-- TODO QSslCertificate requires QMultiMap which isn't implemented yet
<value-type name="QSslCertificate"/> <value-type name="QSslCertificate"/>
--> -->
<value-type name="QSslConfiguration"/> <enum-type name="QSslCertificate::SubjectInfo"/>
<object-type name="QSslSocket"> <!-- Qt 4.7 -->
<modify-function signature="connectToHostEncrypted(const QString&amp;, quint16, QFlags&lt;QIODevice::OpenModeFlag>)" allow-thread="yes" /> <value-type name="QNetworkConfiguration" since="4.7">
<modify-function signature="waitForEncrypted(int)" allow-thread="yes" /> <enum-type name="BearerType" />
<enum-type name="Purpose" since="4.7"/>
<enum-type name="StateFlag" flags="StateFlags" since="4.7"/>
<enum-type name="Type" since="4.7"/>
</value-type>
<object-type name="QNetworkConfigurationManager" since="4.7">
<enum-type name="Capability" flags="Capabilities" since="4.7"/>
</object-type> </object-type>
<object-type name="QNetworkSession" since="4.7">
<enum-type name="SessionError" since="4.7"/>
<enum-type name="State" since="4.7"/>
</object-type>
<object-type name="QAbstractNetworkCache"/>
<object-type name="QNetworkDiskCache"/>
<value-type name="QNetworkCacheMetaData"/>
<suppress-warning text="Shadowing: QAbstractSocket::*"/> <suppress-warning text="Shadowing: QAbstractSocket::*"/>
<!-- For people building without SSL support -->
<!--
<suppress-warning text="WARNING(MetaJavaBuilder) :: namespace 'com.trolltech.qt.network.QSslSocket' for enum 'SslMode' is not declared"/>
<suppress-warning text="WARNING(MetaJavaBuilder) :: type 'QSslError' is specified in typesystem, but not defined. This could potentially lead to compilation errors."/>
<suppress-warning text="WARNING(MetaJavaBuilder) :: type 'QSslCipher' is specified in typesystem, but not defined. This could potentially lead to compilation errors."/>
<suppress-warning text="WARNING(MetaJavaBuilder) :: type 'QSslKey' is specified in typesystem, but not defined. This could potentially lead to compilation errors."/>
<suppress-warning text="WARNING(MetaJavaBuilder) :: namespace 'com.trolltech.qt.network.QSslError' for enum 'SslError' is not declared"/>
<suppress-warning text="WARNING(MetaJavaBuilder) :: type 'QSslCertificate' is specified in typesystem, but not defined. This could potentially lead to compilation errors."/>
<suppress-warning text="WARNING(MetaJavaBuilder) :: namespace 'com.trolltech.qt.network.QSslSocket' for enum 'PeerVerifyMode' is not declared"/>
<suppress-warning text="WARNING(MetaJavaBuilder) :: namespace 'com.trolltech.qt.network.QSslCertificate' for enum 'SubjectInfo' is not declared"/>
<suppress-warning text="WARNING(MetaJavaBuilder) :: type 'QSslConfiguration' is specified in typesystem, but not defined. This could potentially lead to compilation errors."/>
<suppress-warning text="WARNING(MetaJavaBuilder) :: type 'QSslSocket' is specified in typesystem, but not defined. This could potentially lead to compilation errors."/>
-->
<!-- The following entries may be present in the system or not. Keep this section organized. -->
<value-type name="QSslCertificate"/>
<value-type name="QSslCipher"/>
<value-type name="QSslConfiguration"/>
<value-type name="QSslError">
<enum-type name="SslError"/>
</value-type>
<value-type name="QSslKey"/>
<object-type name="QSslSocket">
<enum-type name="SslMode"/>
<enum-type name="PeerVerifyMode"/>
<modify-function signature="connectToHostEncrypted(const QString&amp;, quint16, QFlags&lt;QIODevice::OpenModeFlag>)" allow-thread="yes" />
<modify-function signature="waitForEncrypted(int)" allow-thread="yes" />
</object-type>
<!-- The above entries may be present in the system or not. Keep this section organized. -->
</typesystem> </typesystem>

View file

@ -10,6 +10,15 @@ else()
) )
endif() endif()
if (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 7)
set(QtOpenGL_47_SRC )
else()
set(QtOpenGL_47_SRC
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtOpenGL/qglbuffer_wrapper.cpp
)
endif()
set(QtOpenGL_SRC set(QtOpenGL_SRC
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtOpenGL/qgl_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtOpenGL/qgl_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtOpenGL/qglcolormap_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtOpenGL/qglcolormap_wrapper.cpp
@ -20,33 +29,30 @@ set(QtOpenGL_SRC
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtOpenGL/qglwidget_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtOpenGL/qglwidget_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtOpenGL/qtopengl_module_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtOpenGL/qtopengl_module_wrapper.cpp
${QtOpenGL_46_SRC} ${QtOpenGL_46_SRC}
${QtOpenGL_47_SRC}
) )
execute_generator(opengl QtOpenGL_SRC "${CMAKE_CURRENT_BINARY_DIR}:${QtCore_SOURCE_DIR}:${QtGui_BINARY_DIR}:${QtGui_SOURCE_DIR}:${QtOpenGL_SOURCE_DIR}") set(QtOpenGL_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtOpenGL_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}")
set(QtOpenGL_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${QT_QTCORE_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR}
${QT_QTGUI_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR}
${QT_QTOPENGL_INCLUDE_DIR} ${QT_QTOPENGL_INCLUDE_DIR}
${PYTHON_INCLUDE_PATH} ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${SHIBOKEN_INCLUDE_DIR} ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR} ${libpyside_SOURCE_DIR}
${QtGui_BINARY_DIR}/PySide/QtGui/ ${QtGui_BINARY_DIR}/PySide/QtGui/
${QtCore_BINARY_DIR}/PySide/QtCore/ ${QtCore_BINARY_DIR}/PySide/QtCore/
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtOpenGL) ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtOpenGL)
add_library(QtOpenGL MODULE ${QtOpenGL_SRC}) set(QtOpenGL_libraries pyside
set_target_properties(QtOpenGL PROPERTIES PREFIX "") ${SHIBOKEN_PYTHON_LIBRARIES}
target_link_libraries(QtOpenGL
pyside
${PYTHON_LIBRARIES}
${QT_QTCORE_LIBRARY} ${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY} ${QT_QTGUI_LIBRARY}
${QT_QTOPENGL_LIBRARY}) ${QT_QTOPENGL_LIBRARY})
add_dependencies(QtOpenGL QtGui) set(QtOpenGL_deps QtGui)
create_pyside_module(QtOpenGL
# install QtOpenGL_include_dirs
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/QtOpenGL.so QtOpenGL_libraries
DESTINATION ${SITE_PACKAGE}/PySide) QtOpenGL_deps
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtOpenGL/pyside_qtopengl_python.h QtOpenGL_typesystem_path
DESTINATION include/PySide/QtOpenGL/) QtOpenGL_SRC
"")

View file

@ -1,33 +1,65 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!--
This file is part of PySide project.
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
Contact: PySide team <contact@pyside.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-->
<typesystem package="PySide.QtOpenGL"> <typesystem package="PySide.QtOpenGL">
<load-typesystem name="typesystem_gui.xml" generate="no" /> <load-typesystem name="typesystem_gui.xml" generate="no" />
<rejection class="QGLColormap::QGLColormapData"/> <primitive-type name="GLbitfield"/>
<rejection class="QGLWidget" function-name="setMouseTracking"/> <primitive-type name="GLboolean"/>
<primitive-type name="GLbyte"/>
<primitive-type name="GLclampd"/>
<primitive-type name="GLclampf"/>
<primitive-type name="GLdouble"/>
<primitive-type name="GLenum"/>
<primitive-type name="GLfloat"/>
<primitive-type name="GLint"/>
<primitive-type name="GLshort"/>
<primitive-type name="GLsizei"/>
<primitive-type name="GLubyte"/>
<primitive-type name="GLuint"/>
<primitive-type name="GLushort"/>
<enum-type name="QGL::FormatOption" flags="QGL::FormatOptions" force-integer="yes"/> <rejection class="QGLColormap::QGLColormapData"/>
<enum-type name="QGLFormat::OpenGLVersionFlag" flags="QGLFormat::OpenGLVersionFlags"/> <rejection class="QGLContext" field-name="currentCtx"/>
<enum-type name="QGLFramebufferObject::Attachment"/>
<namespace-type name="QGL"> <namespace-type name="QGL">
<enum-type name="FormatOption" flags="FormatOptions" force-integer="yes"/>
<extra-includes> <extra-includes>
<include file-name="qgl.h" location="global"/> <include file-name="qgl.h" location="global"/>
</extra-includes> </extra-includes>
</namespace-type> </namespace-type>
<value-type name="QGLColormap"> <value-type name="QGLColormap">
<modify-function signature="operator=(QGLColormap)" remove="all"/>
<modify-function signature="setEntries(int,const unsigned int*,int)"> <modify-function signature="setEntries(int,const unsigned int*,int)">
<access modifier="private"/> <access modifier="private"/>
</modify-function> </modify-function>
</value-type> </value-type>
<value-type name="QGLFormat"> <value-type name="QGLFormat">
<modify-function signature="operator=(QGLFormat)" remove="all"/> <enum-type name="OpenGLContextProfile" since="4.7"/>
<enum-type name="OpenGLVersionFlag" flags="OpenGLVersionFlags"/>
</value-type> </value-type>
<rejection class="QGLContext" field-name="currentCtx" />
<object-type name="QGLContext"> <object-type name="QGLContext">
<enum-type name="BindOption" flags="BindOptions" since="4.6"/>
<modify-function signature="chooseContext(const QGLContext*)"> <modify-function signature="chooseContext(const QGLContext*)">
<modify-argument index="1" invalidate-after-use="yes"/> <modify-argument index="1" invalidate-after-use="yes"/>
</modify-function> </modify-function>
@ -35,18 +67,14 @@
<modify-argument index="1" invalidate-after-use="yes"/> <modify-argument index="1" invalidate-after-use="yes"/>
</modify-function> </modify-function>
<modify-function signature="getProcAddress(QString)const"> <!-- ### Obsolete functions and ctors -->
<remove/>
</modify-function>
<modify-field name="currentCtx" read="false" write="false"/>
<modify-function signature="setDevice(QPaintDevice*)">
<remove/>
</modify-function>
<modify-function signature="generateFontDisplayLists(QFont, int)" remove="all"/> <modify-function signature="generateFontDisplayLists(QFont, int)" remove="all"/>
<modify-function signature="tryVisual(const QGLFormat&amp;, int)" remove="all"/> <modify-function signature="QGLContext(const QGLFormat&amp;, QPaintDevice*)" remove="all" />
<modify-function signature="chooseVisual()" remove="all"/> <!-- ### -->
</object-type>
<object-type name="QGLFramebufferObject">
<enum-type name="Attachment"/>
</object-type> </object-type>
<object-type name="QGLFramebufferObject"/>
<object-type name="QGLPixelBuffer"> <object-type name="QGLPixelBuffer">
<extra-includes> <extra-includes>
<include file-name="QImage" location="global"/> <include file-name="QImage" location="global"/>
@ -65,18 +93,647 @@
<parent index="2" action="add"/> <parent index="2" action="add"/>
</modify-argument> </modify-argument>
</modify-function> </modify-function>
<!--- Obsolete --> <!-- ### Not part of Qt public API -->
<modify-function signature="setContext(QGLContext*,const QGLContext*,bool)" remove="all" /> <modify-function signature="setContext(QGLContext*,const QGLContext*,bool)" remove="all" />
<!-- ### -->
<!--- ### Obsolete functions -->
<modify-function signature="fontDisplayListBase(QFont, int)" remove="all"/> <modify-function signature="fontDisplayListBase(QFont, int)" remove="all"/>
<modify-function signature="setFormat(QGLFormat)" remove="all"/> <modify-function signature="setFormat(QGLFormat)" remove="all"/>
<!-- ### -->
</object-type> </object-type>
<value-type name="QGLFramebufferObjectFormat"/> <value-type name="QGLFramebufferObjectFormat" since="4.6"/>
<object-type name="QGLShader"/> <object-type name="QGLShader" since="4.6">
<object-type name="QGLShaderProgram"> <enum-type name="ShaderTypeBit" flags="ShaderType"/>
<modify-function signature="setUniformValue(int, Array)" remove="all" />
<modify-function signature="setUniformValue(const char*, Array)" remove="all" />
<modify-function signature="setAttributeValue(int,const float*,int,int)" remove="all" />
<modify-function signature="setAttributeValue(const char*,const float*,int,int)" remove="all" />
</object-type> </object-type>
<template name="callArrayFunction">
int _size = PySequence_Size(%PYARG_2);
if (_size) {
$ATTR_TYPE *_list = new $ATTR_TYPE[_size];
if (_size) {
Shiboken::AutoDecRef fast(PySequence_Fast(%PYARG_2, "Failed to parse sequence with type %VECTOR_TYPE."));
for(int i=0; i &lt; _size; i++) {
PyObject* pv = PySequence_Fast_GET_ITEM(fast.object(), i);
_list[i] = %CONVERTTOCPP[$ATTR_TYPE](pv);
}
}
%CPPSELF.%FUNCTION_NAME(%1, _list, $ARG0);
delete[] _list;
} else {
%CPPSELF.%FUNCTION_NAME(%1, ($ATTR_TYPE*)NULL, $ARG1);
}
</template>
<object-type name="QGLShaderProgram" since="4.6">
<!-- setAttributeArray -->
<modify-function signature="setAttributeArray(int, const QVector2D*, int)" rename="setAttributeArray2D">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
<inject-code>
<insert-template name="callArrayFunction">
<replace from="$ARG0" to="%3" />
<replace from="$ARG1" to="%3" />
<replace from="$ATTR_TYPE" to="QVector2D"/>
</insert-template>
</inject-code>
</modify-function>
<modify-function signature="setAttributeArray(int, const QVector3D*, int)" rename="setAttributeArray3D">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
<inject-code>
<insert-template name="callArrayFunction">
<replace from="$ARG0" to="%3" />
<replace from="$ARG1" to="%3" />
<replace from="$ATTR_TYPE" to="QVector3D"/>
</insert-template>
</inject-code>
</modify-function>
<modify-function signature="setAttributeArray(int, const QVector4D*, int)" rename="setAttributeArray4D">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
<inject-code>
<insert-template name="callArrayFunction">
<replace from="$ARG0" to="%3" />
<replace from="$ARG1" to="%3" />
<replace from="$ATTR_TYPE" to="QVector4D"/>
</insert-template>
</inject-code>
</modify-function>
<modify-function signature="setAttributeArray(const char*, const QVector2D*, int)" rename="setAttributeArray2D">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
<inject-code>
<insert-template name="callArrayFunction">
<replace from="$ARG0" to="%3" />
<replace from="$ARG1" to="%3" />
<replace from="$ATTR_TYPE" to="QVector2D"/>
</insert-template>
</inject-code>
</modify-function>
<modify-function signature="setAttributeArray(const char*, const QVector3D*, int)" rename="setAttributeArray3D">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
<inject-code>
<insert-template name="callArrayFunction">
<replace from="$ARG0" to="%3" />
<replace from="$ARG1" to="%3" />
<replace from="$ATTR_TYPE" to="QVector3D"/>
</insert-template>
</inject-code>
</modify-function>
<modify-function signature="setAttributeArray(const char*, const QVector4D*, int)" rename="setAttributeArray4D">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
<inject-code>
<insert-template name="callArrayFunction">
<replace from="$ARG0" to="%3" />
<replace from="$ARG1" to="%3" />
<replace from="$ATTR_TYPE" to="QVector4D"/>
</insert-template>
</inject-code>
</modify-function>
<!-- setUniformValueArray -->
<modify-function signature="setUniformValueArray(int, const GLint*, int)" rename="setUniformValueArrayInt">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
<modify-argument index="3">
<remove-argument />
</modify-argument>
<inject-code>
<insert-template name="callArrayFunction">
<replace from="$ARG0" to="_size" />
<replace from="$ARG1" to="0" />
<replace from="$ATTR_TYPE" to="GLint"/>
</insert-template>
</inject-code>
</modify-function>
<modify-function signature="setUniformValueArray(int, const GLuint*, int)" rename="setUniformValueArrayUint">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
<modify-argument index="3">
<remove-argument />
</modify-argument>
<inject-code>
<insert-template name="callArrayFunction">
<replace from="$ARG0" to="_size" />
<replace from="$ARG1" to="0" />
<replace from="$ATTR_TYPE" to="GLuint"/>
</insert-template>
</inject-code>
</modify-function>
<modify-function signature="setUniformValueArray(int, const QVector2D*, int)" rename="setUniformValueArray2D">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
<modify-argument index="3">
<remove-argument />
</modify-argument>
<inject-code>
<insert-template name="callArrayFunction">
<replace from="$ARG0" to="_size" />
<replace from="$ARG1" to="0" />
<replace from="$ATTR_TYPE" to="QVector2D"/>
</insert-template>
</inject-code>
</modify-function>
<modify-function signature="setUniformValueArray(int, const QVector3D*, int)" rename="setUniformValueArray3D">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
<modify-argument index="3">
<remove-argument />
</modify-argument>
<inject-code>
<insert-template name="callArrayFunction">
<replace from="$ARG0" to="_size" />
<replace from="$ARG1" to="0" />
<replace from="$ATTR_TYPE" to="QVector3D"/>
</insert-template>
</inject-code>
</modify-function>
<modify-function signature="setUniformValueArray(int, const QVector4D*, int)" rename="setUniformValueArray4D">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
<modify-argument index="3">
<remove-argument />
</modify-argument>
<inject-code>
<insert-template name="callArrayFunction">
<replace from="$ARG0" to="_size" />
<replace from="$ARG1" to="0" />
<replace from="$ATTR_TYPE" to="QVector4D"/>
</insert-template>
</inject-code>
</modify-function>
<modify-function signature="setUniformValueArray(int, const QMatrix2x2*, int)" rename="setUniformValueArray2x2">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
<modify-argument index="3">
<remove-argument />
</modify-argument>
<inject-code>
<insert-template name="callArrayFunction">
<replace from="$ARG0" to="_size" />
<replace from="$ARG1" to="0" />
<replace from="$ATTR_TYPE" to="QMatrix2x2"/>
</insert-template>
</inject-code>
</modify-function>
<modify-function signature="setUniformValueArray(int, const QMatrix2x3*, int)" rename="setUniformValueArray2x3">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
<modify-argument index="3">
<remove-argument />
</modify-argument>
<inject-code>
<insert-template name="callArrayFunction">
<replace from="$ARG0" to="_size" />
<replace from="$ARG1" to="0" />
<replace from="$ATTR_TYPE" to="QMatrix2x3"/>
</insert-template>
</inject-code>
</modify-function>
<modify-function signature="setUniformValueArray(int, const QMatrix2x4*, int)" rename="setUniformValueArray2x4">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
<modify-argument index="3">
<remove-argument />
</modify-argument>
<inject-code>
<insert-template name="callArrayFunction">
<replace from="$ARG0" to="_size" />
<replace from="$ARG1" to="0" />
<replace from="$ATTR_TYPE" to="QMatrix2x4"/>
</insert-template>
</inject-code>
</modify-function>
<modify-function signature="setUniformValueArray(int, const QMatrix3x2*, int)" rename="setUniformValueArray3x2">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
<modify-argument index="3">
<remove-argument />
</modify-argument>
<inject-code>
<insert-template name="callArrayFunction">
<replace from="$ARG0" to="_size" />
<replace from="$ARG1" to="0" />
<replace from="$ATTR_TYPE" to="QMatrix3x2"/>
</insert-template>
</inject-code>
</modify-function>
<modify-function signature="setUniformValueArray(int, const QMatrix3x3*, int)" rename="setUniformValueArray3x3">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
<modify-argument index="3">
<remove-argument />
</modify-argument>
<inject-code>
<insert-template name="callArrayFunction">
<replace from="$ARG0" to="_size" />
<replace from="$ARG1" to="0" />
<replace from="$ATTR_TYPE" to="QMatrix3x3"/>
</insert-template>
</inject-code>
</modify-function>
<modify-function signature="setUniformValueArray(int, const QMatrix3x4*, int)" rename="setUniformValueArray3x4">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
<modify-argument index="3">
<remove-argument />
</modify-argument>
<inject-code>
<insert-template name="callArrayFunction">
<replace from="$ARG0" to="_size" />
<replace from="$ARG1" to="0" />
<replace from="$ATTR_TYPE" to="QMatrix3x4"/>
</insert-template>
</inject-code>
</modify-function>
<modify-function signature="setUniformValueArray(int, const QMatrix4x2*, int)" rename="setUniformValueArray4x2">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
<modify-argument index="3">
<remove-argument />
</modify-argument>
<inject-code>
<insert-template name="callArrayFunction">
<replace from="$ARG0" to="_size" />
<replace from="$ARG1" to="0" />
<replace from="$ATTR_TYPE" to="QMatrix4x2"/>
</insert-template>
</inject-code>
</modify-function>
<modify-function signature="setUniformValueArray(int, const QMatrix4x3*, int)" rename="setUniformValueArray4x3">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
<modify-argument index="3">
<remove-argument />
</modify-argument>
<inject-code>
<insert-template name="callArrayFunction">
<replace from="$ARG0" to="_size" />
<replace from="$ARG1" to="0" />
<replace from="$ATTR_TYPE" to="QMatrix4x3"/>
</insert-template>
</inject-code>
</modify-function>
<modify-function signature="setUniformValueArray(int, const QMatrix4x4*, int)" rename="setUniformValueArray4x4">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
<modify-argument index="3">
<remove-argument />
</modify-argument>
<inject-code>
<insert-template name="callArrayFunction">
<replace from="$ARG0" to="_size" />
<replace from="$ARG1" to="0" />
<replace from="$ATTR_TYPE" to="QMatrix4x4"/>
</insert-template>
</inject-code>
</modify-function>
<modify-function signature="setUniformValueArray(const char*, const GLint*, int)" rename="setUniformValueArrayInt">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
<modify-argument index="3">
<remove-argument />
</modify-argument>
<inject-code>
<insert-template name="callArrayFunction">
<replace from="$ARG0" to="_size" />
<replace from="$ARG1" to="0" />
<replace from="$ATTR_TYPE" to="GLint"/>
</insert-template>
</inject-code>
</modify-function>
<modify-function signature="setUniformValueArray(const char*, const GLuint*, int)" rename="setUniformValueArrayUint">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
<modify-argument index="3">
<remove-argument />
</modify-argument>
<inject-code>
<insert-template name="callArrayFunction">
<replace from="$ARG0" to="_size" />
<replace from="$ARG1" to="0" />
<replace from="$ATTR_TYPE" to="GLuint"/>
</insert-template>
</inject-code>
</modify-function>
<modify-function signature="setUniformValueArray(const char*, const QVector2D*, int)" rename="setUniformValueArray2D">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
<modify-argument index="3">
<remove-argument />
</modify-argument>
<inject-code>
<insert-template name="callArrayFunction">
<replace from="$ARG0" to="_size" />
<replace from="$ARG1" to="0" />
<replace from="$ATTR_TYPE" to="QVector2D"/>
</insert-template>
</inject-code>
</modify-function>
<modify-function signature="setUniformValueArray(const char*, const QVector3D*, int)" rename="setUniformValueArray3D">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
<modify-argument index="3">
<remove-argument />
</modify-argument>
<inject-code>
<insert-template name="callArrayFunction">
<replace from="$ARG0" to="_size" />
<replace from="$ARG1" to="0" />
<replace from="$ATTR_TYPE" to="QVector3D"/>
</insert-template>
</inject-code>
</modify-function>
<modify-function signature="setUniformValueArray(const char*, const QVector4D*, int)" rename="setUniformValueArray4D">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
<modify-argument index="3">
<remove-argument />
</modify-argument>
<inject-code>
<insert-template name="callArrayFunction">
<replace from="$ARG0" to="_size" />
<replace from="$ARG1" to="0" />
<replace from="$ATTR_TYPE" to="QVector4D"/>
</insert-template>
</inject-code>
</modify-function>
<modify-function signature="setUniformValueArray(const char*, const QMatrix2x2*, int)" rename="setUniformValueArray2x2">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
<modify-argument index="3">
<remove-argument />
</modify-argument>
<inject-code>
<insert-template name="callArrayFunction">
<replace from="$ARG0" to="_size" />
<replace from="$ARG1" to="0" />
<replace from="$ATTR_TYPE" to="QMatrix2x2"/>
</insert-template>
</inject-code>
</modify-function>
<modify-function signature="setUniformValueArray(const char*, const QMatrix2x3*, int)" rename="setUniformValueArray2x3">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
<modify-argument index="3">
<remove-argument />
</modify-argument>
<inject-code>
<insert-template name="callArrayFunction">
<replace from="$ARG0" to="_size" />
<replace from="$ARG1" to="0" />
<replace from="$ATTR_TYPE" to="QMatrix2x3"/>
</insert-template>
</inject-code>
</modify-function>
<modify-function signature="setUniformValueArray(const char*, const QMatrix2x4*, int)" rename="setUniformValueArray2x4">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
<modify-argument index="3">
<remove-argument />
</modify-argument>
<inject-code>
<insert-template name="callArrayFunction">
<replace from="$ARG0" to="_size" />
<replace from="$ARG1" to="0" />
<replace from="$ATTR_TYPE" to="QMatrix2x4"/>
</insert-template>
</inject-code>
</modify-function>
<modify-function signature="setUniformValueArray(const char*, const QMatrix3x2*, int)" rename="setUniformValueArray3x2">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
<modify-argument index="3">
<remove-argument />
</modify-argument>
<inject-code>
<insert-template name="callArrayFunction">
<replace from="$ARG0" to="_size" />
<replace from="$ARG1" to="0" />
<replace from="$ATTR_TYPE" to="QMatrix3x2"/>
</insert-template>
</inject-code>
</modify-function>
<modify-function signature="setUniformValueArray(const char*, const QMatrix3x3*, int)" rename="setUniformValueArray3x3">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
<modify-argument index="3">
<remove-argument />
</modify-argument>
<inject-code>
<insert-template name="callArrayFunction">
<replace from="$ARG0" to="_size" />
<replace from="$ARG1" to="0" />
<replace from="$ATTR_TYPE" to="QMatrix3x3"/>
</insert-template>
</inject-code>
</modify-function>
<modify-function signature="setUniformValueArray(const char*, const QMatrix3x4*, int)" rename="setUniformValueArray3x4">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
<modify-argument index="3">
<remove-argument />
</modify-argument>
<inject-code>
<insert-template name="callArrayFunction">
<replace from="$ARG0" to="_size" />
<replace from="$ARG1" to="0" />
<replace from="$ATTR_TYPE" to="QMatrix3x4"/>
</insert-template>
</inject-code>
</modify-function>
<modify-function signature="setUniformValueArray(const char*, const QMatrix4x2*, int)" rename="setUniformValueArray4x2">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
<modify-argument index="3">
<remove-argument />
</modify-argument>
<inject-code>
<insert-template name="callArrayFunction">
<replace from="$ARG0" to="_size" />
<replace from="$ARG1" to="0" />
<replace from="$ATTR_TYPE" to="QMatrix4x2"/>
</insert-template>
</inject-code>
</modify-function>
<modify-function signature="setUniformValueArray(const char*, const QMatrix4x3*, int)" rename="setUniformValueArray4x3">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
<modify-argument index="3">
<remove-argument />
</modify-argument>
<inject-code>
<insert-template name="callArrayFunction">
<replace from="$ARG0" to="_size" />
<replace from="$ARG1" to="0" />
<replace from="$ATTR_TYPE" to="QMatrix4x3"/>
</insert-template>
</inject-code>
</modify-function>
<modify-function signature="setUniformValueArray(const char*, const QMatrix4x4*, int)" rename="setUniformValueArray4x4">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
<modify-argument index="3">
<remove-argument />
</modify-argument>
<inject-code>
<insert-template name="callArrayFunction">
<replace from="$ARG0" to="_size" />
<replace from="$ARG1" to="0" />
<replace from="$ATTR_TYPE" to="QMatrix4x4"/>
</insert-template>
</inject-code>
</modify-function>
<!-- ### TODO: must evaluate if anything other than removal should be done. -->
<modify-function signature="setAttributeArray(int,const GLfloat*,int,int)" remove="all" />
<modify-function signature="setAttributeArray(const char*,const GLfloat*,int,int)" remove="all" />
<modify-function signature="setUniformValueArray(int,const GLfloat*,int,int)" remove="all" />
<modify-function signature="setUniformValueArray(const char*,const GLfloat*,int,int)" remove="all" />
<!-- ### -->
<!-- ### Use QMatrixZxY overloads -->
<modify-function signature="setUniformValue(int,Array)" remove="all" />
<modify-function signature="setUniformValue(const char*,Array)" remove="all" />
<modify-function signature="setAttributeValue(int,const GLfloat*,int,int)" remove="all" />
<modify-function signature="setAttributeValue(const char*,const GLfloat*,int,int)" remove="all" />
<modify-function signature="setAttributeArray(int, GLenum, const void*, int, int)" remove="all" since="4.7" />
<modify-function signature="setAttributeArray(const char*, GLenum, const void*, int, int)" remove="all" since="4.7" />
<!-- ### -->
</object-type>
<!-- Qt 4.7 -->
<object-type name="QGLBuffer" since="4.7">
<enum-type name="Access" since="4.7"/>
<enum-type name="Type" since="4.7"/>
<enum-type name="UsagePattern" since="4.7"/>
<modify-function signature="allocate(const void*, int)">
<modify-argument index="1">
<replace-type modified-type="QByteArray&amp;"/>
</modify-argument>
<modify-argument index="2">
<replace-default-expression with="-1"/>
</modify-argument>
<inject-code class="target" position="beginning">
int size = (%2 &lt; 0) ? %1.size() : %2;
%CPPSELF.allocate((const void*) %1.data(), size);
</inject-code>
</modify-function>
<modify-function signature="map(QGLBuffer::Access)">
<inject-code>
Py_ssize_t dataSize = %CPPSELF.size();
void* data = %CPPSELF.map(%1);
if (!data) {
Py_INCREF(Py_None);
%PYARG_0 = Py_None;
} else if (%1 == QGLBuffer::ReadOnly) {
%PYARG_0 = Shiboken::Buffer::newObject(data, dataSize, Shiboken::Buffer::ReadOnly);
} else {
%PYARG_0 = Shiboken::Buffer::newObject(data, dataSize, Shiboken::Buffer::ReadWrite);
}
</inject-code>
</modify-function>
<modify-function signature="read(int, void*, int)">
<modify-argument index="2">
<remove-argument/>
</modify-argument>
<modify-argument index="return">
<replace-type modified-type="(retval, data)"/>
</modify-argument>
<inject-code class="target" position="beginning">
char *data = new char[%3];
bool result = %CPPSELF.read(%1, data, %3);
QByteArray ret;
if (result)
ret.append((const char*)data, %3);
%PYARG_0 = PyTuple_New(2);
PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[bool](result));
PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[QByteArray](ret));
delete[] data;
</inject-code>
</modify-function>
<modify-function signature="write(int, const void*, int)">
<modify-argument index="2">
<replace-type modified-type="QByteArray&amp;"/>
</modify-argument>
<modify-argument index="3">
<replace-default-expression with="-1"/>
</modify-argument>
<inject-code class="target" position="beginning">
int size = (%3 &lt; 0) ? %2.size() : %3;
%CPPSELF.write(%1, (const void*) %2.data(), size);
</inject-code>
</modify-function>
</object-type>
</typesystem> </typesystem>

View file

@ -0,0 +1,49 @@
project(QtScript)
if (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 7)
set (QtScript_47_SRC )
else()
set(QtScript_47_SRC
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScript/qscriptprogram_wrapper.cpp
)
endif()
set(QtScript_SRC
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScript/qscriptable_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScript/qscriptclass_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScript/qscriptclasspropertyiterator_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScript/qscriptcontext_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScript/qscriptcontextinfo_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScript/qscriptengineagent_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScript/qtscript_module_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScript/qscriptengine_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScript/qscriptextensioninterface_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScript/qscriptextensionplugin_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScript/qscriptstring_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScript/qscriptvalue_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScript/qscriptvalueiterator_wrapper.cpp
${QtScript_47_SRC}
)
set(QtScript_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}")
set(QtScript_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScript
${QT_INCLUDE_DIR}
${QT_QTSCRIPT_INCLUDE_DIR}
${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_BINARY_DIR}/PySide/QtCore )
set(QtScript_libraries pyside
${SHIBOKEN_PYTHON_LIBRARIES}
${SHIBOKEN_LIBRARY}
${QT_QTCORE_LIBRARY}
${QT_QTSCRIPT_LIBRARY})
set(QtScript_deps QtCore)
create_pyside_module(QtScript
QtScript_include_dirs
QtScript_libraries
QtScript_deps
QtScript_typesystem_path
QtScript_SRC
"")

View file

@ -0,0 +1,115 @@
<?xml version="1.0"?>
<!--
This file is part of PySide project.
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
Contact: PySide team <contact@pyside.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-->
<typesystem package="PySide.QtScript">
<load-typesystem name="typesystem_core.xml" generate="no" />
<object-type name="QScriptable"/>
<object-type name="QScriptClass">
<enum-type name="Extension"/>
<enum-type name="QueryFlag"/>
</object-type>
<object-type name="QScriptClassPropertyIterator"/>
<object-type name="QScriptContext">
<enum-type name="Error"/>
<enum-type name="ExecutionState"/>
</object-type>
<value-type name="QScriptContextInfo">
<enum-type name="FunctionType"/>
</value-type>
<object-type name="QScriptEngineAgent">
<enum-type name="Extension"/>
</object-type>
<object-type name="QScriptEngine">
<enum-type name="QObjectWrapOption" flags="QObjectWrapOptions"/>
<enum-type name="ValueOwnership"/>
<!-- Not supported BUG #957-->
<modify-function signature="scriptValueFromQMetaObject()" remove="all" />
</object-type>
<object-type name="QScriptExtensionInterface"/>
<object-type name="QScriptExtensionPlugin"/>
<value-type name="QScriptProgram" since="4.7"/>
<value-type name="QScriptString">
<modify-function signature="toArrayIndex(bool*)const">
<modify-argument index="1">
<remove-argument/>
</modify-argument>
<inject-code class="target" position="beginning">
<insert-template name="fix_bool*"/>
</inject-code>
</modify-function>
</value-type>
<value-type name="QScriptValue">
<enum-type name="PropertyFlag" flags="PropertyFlags"/>
<enum-type name="ResolveFlag" flags="ResolveFlags"/>
<enum-type name="SpecialValue"/>
<add-function signature="__repr__" return-type="PyObject*">
<inject-code class="target" position="beginning">
if (%CPPSELF.isVariant() || %CPPSELF.isString()) {
QString format = QString().sprintf("%s(\"%s\")", ((PyObject*)%PYSELF)->ob_type->tp_name, qPrintable(%CPPSELF.toString()));
%PYARG_0 = Shiboken::String::fromCString(qPrintable(format));
} else {
%PYARG_0 = Shiboken::String::fromCString(
((PyObject* )%PYSELF)->ob_type->tp_name);
}
</inject-code>
</add-function>
<add-function signature="__mgetitem__">
<inject-code>
Shiboken::AutoDecRef key(PyObject_Str(_key));
QVariant res = %CPPSELF.property(Shiboken::String::toCString(key.object())).toVariant();
if (res.isValid()) {
return %CONVERTTOPYTHON[QVariant](res);
} else {
PyObject* errorType = PyInt_Check(_key) ? PyExc_IndexError : PyExc_KeyError;
PyErr_SetString(errorType, "Key not found.");
return 0;
}
</inject-code>
</add-function>
<add-function signature="__iter__()" return-type="PyObject*">
<inject-code>
%PYARG_0 = Shiboken::createWrapper(new QScriptValueIterator(*%CPPSELF), true, true);
</inject-code>
</add-function>
</value-type>
<object-type name="QScriptValueIterator">
<add-function signature="__iter__()" return-type="PyObject*">
<inject-code>
<insert-template name="__iter__" />
</inject-code>
</add-function>
<add-function signature="__next__()" return-type="PyObject*">
<inject-code>
if (%CPPSELF.hasNext()) {
%CPPSELF.next();
QString name = %CPPSELF.name();
QVariant value = %CPPSELF.value().toVariant();
%PYARG_0 = PyTuple_New(2);
PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[QString](name));
PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[QVariant](value));
} else {
PyErr_SetNone(PyExc_StopIteration);
}
</inject-code>
</add-function>
</object-type>
</typesystem>

View file

@ -0,0 +1,37 @@
project(QtScriptTools)
set(QtScriptTools_SRC
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScriptTools/qtscripttools_module_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScriptTools/qscriptenginedebugger_wrapper.cpp
)
set(QtScriptTools_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtScript_SOURCE_DIR}${PATH_SEP}${QtScriptTools_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}")
set(QtScriptTools_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
${QT_QTCORE_INCLUDE_DIR}
${QT_GUI_INCLUDE_DIR}
${QT_QTSCRIPT_INCLUDE_DIR}
${QT_QTSCRIPTTOOLS_INCLUDE_DIR}
${SHIBOKEN_PYTHON_INCLUDE_DIR}
${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
${QtCore_BINARY_DIR}/PySide/QtCore/
${QtGui_BINARY_DIR}/PySide/QtGui/
${QtScript_BINARY_DIR}/PySide/QtScript/
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScriptTools)
set(QtScriptTools_libraries pyside
${SHIBOKEN_PYTHON_LIBRARIES}
${QT_QTCORE_LIBRARY}
${QT_GUI_LIBRARY}
${QT_QTSCRIPT_LIBRARY}
${QT_QTSCRIPTTOOLS_LIBRARY})
set(QtScriptTools_deps QtCore QtScript QtGui)
create_pyside_module(QtScriptTools
QtScriptTools_include_dirs
QtScriptTools_libraries
QtScriptTools_deps
QtScriptTools_typesystem_path
QtScriptTools_SRC
"")

View file

@ -0,0 +1,33 @@
<?xml version="1.0"?>
<!--
This file is part of PySide project.
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
Contact: PySide team <contact@pyside.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-->
<typesystem package="PySide.QtScriptTools">
<load-typesystem name="typesystem_script.xml" generate="no" />
<load-typesystem name="typesystem_gui.xml" generate="no" />
<object-type name="QScriptEngineDebugger">
<enum-type name="DebuggerAction"/>
<enum-type name="DebuggerState" since="4.6"/>
<enum-type name="DebuggerWidget"/>
<extra-includes>
<include file-name="QScriptEngine" location="global"/>
</extra-includes>
</object-type>
</typesystem>

View file

@ -21,32 +21,27 @@ set(QtSql_SRC
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSql/qtsql_module_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSql/qtsql_module_wrapper.cpp
) )
execute_generator(sql QtSql_SRC "${CMAKE_CURRENT_BINARY_DIR}:${QtCore_SOURCE_DIR}:${QtGui_BINARY_DIR}:${QtGui_SOURCE_DIR}:${QtSql_SOURCE_DIR}") set(QtSql_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtSql_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}")
set(QtSql_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${QT_QTCORE_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR}
${QT_QTGUI_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR}
${QT_QTSQL_INCLUDE_DIR} ${QT_QTSQL_INCLUDE_DIR}
${PYTHON_INCLUDE_PATH} ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${SHIBOKEN_INCLUDE_DIR} ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR} ${libpyside_SOURCE_DIR}
${QtCore_BINARY_DIR}/PySide/QtCore/ ${QtCore_BINARY_DIR}/PySide/QtCore/
${QtGui_BINARY_DIR}/PySide/QtGui/ ${QtGui_BINARY_DIR}/PySide/QtGui/
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSql/) ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSql/)
add_library(QtSql MODULE ${QtSql_SRC}) set(QtSql_libraries pyside
set_target_properties(QtSql PROPERTIES PREFIX "") ${SHIBOKEN_PYTHON_LIBRARIES}
target_link_libraries(QtSql
pyside
${PYTHON_LIBRARIES}
${QT_QTCORE_LIBRARY} ${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY} ${QT_QTGUI_LIBRARY}
${QT_QTSQL_LIBRARY}) ${QT_QTSQL_LIBRARY})
set(QtSql_deps QtGui)
add_dependencies(QtSql QtGui) create_pyside_module(QtSql
QtSql_include_dirs
# install QtSql_libraries
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/QtSql.so QtSql_deps
DESTINATION ${SITE_PACKAGE}/PySide) QtSql_typesystem_path
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSql/pyside_qtsql_python.h QtSql_SRC
DESTINATION include/PySide/QtSql/) "")

View file

@ -1,4 +1,23 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!--
This file is part of PySide project.
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
Contact: PySide team <contact@pyside.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-->
<typesystem package="PySide.QtSql"> <typesystem package="PySide.QtSql">
<load-typesystem name="typesystem_gui.xml" generate="no"/> <load-typesystem name="typesystem_gui.xml" generate="no"/>
@ -7,6 +26,10 @@
<rejection class="QSqlDriverFactoryInterface"/> <rejection class="QSqlDriverFactoryInterface"/>
<namespace-type name="QSql"> <namespace-type name="QSql">
<enum-type name="Location"/>
<enum-type name="ParamTypeFlag" flags="ParamType"/>
<enum-type name="TableType"/>
<enum-type name="NumericalPrecisionPolicy"/>
<extra-includes> <extra-includes>
<include file-name="QtSql/qsql.h" location="global"/> <include file-name="QtSql/qsql.h" location="global"/>
</extra-includes> </extra-includes>
@ -21,7 +44,6 @@
<include file-name="QStringList" location="global"/> <include file-name="QStringList" location="global"/>
<include file-name="QSize" location="global"/> <include file-name="QSize" location="global"/>
</extra-includes> </extra-includes>
<modify-function signature="operator=(QSqlDatabase)" remove="all"/>
<modify-function signature="exec(QString)const" rename="exec_" allow-thread="yes" /> <modify-function signature="exec(QString)const" rename="exec_" allow-thread="yes" />
<modify-function signature="open()" allow-thread="yes" /> <modify-function signature="open()" allow-thread="yes" />
<modify-function signature="open(const QString&amp;, const QString&amp;)" allow-thread="yes" /> <modify-function signature="open(const QString&amp;, const QString&amp;)" allow-thread="yes" />
@ -36,6 +58,7 @@
</value-type> </value-type>
<value-type name="QSqlQuery"> <value-type name="QSqlQuery">
<enum-type name="BatchExecutionMode"/>
<extra-includes> <extra-includes>
<include file-name="QSqlError" location="global"/> <include file-name="QSqlError" location="global"/>
<include file-name="QSqlRecord" location="global"/> <include file-name="QSqlRecord" location="global"/>
@ -44,7 +67,6 @@
</extra-includes> </extra-includes>
<modify-function signature="exec()" rename="exec_" allow-thread="yes" /> <modify-function signature="exec()" rename="exec_" allow-thread="yes" />
<modify-function signature="exec(const QString &amp;)" rename="exec_" allow-thread="yes" /> <modify-function signature="exec(const QString &amp;)" rename="exec_" allow-thread="yes" />
<modify-function signature="operator=(QSqlQuery)" remove="all"/>
<modify-function signature="prepare(const QString&amp;)" allow-thread="yes" /> <modify-function signature="prepare(const QString&amp;)" allow-thread="yes" />
<modify-function signature="clear()" allow-thread="yes" /> <modify-function signature="clear()" allow-thread="yes" />
<modify-function signature="last()" allow-thread="yes" /> <modify-function signature="last()" allow-thread="yes" />
@ -59,26 +81,26 @@
<include file-name="QSqlField" location="global"/> <include file-name="QSqlField" location="global"/>
</extra-includes> </extra-includes>
<modify-function signature="append(QSqlField)" access="non-final"/> <modify-function signature="append(QSqlField)" access="non-final"/>
<modify-function signature="operator=(QSqlRecord)" remove="all"/>
</value-type> </value-type>
<value-type name="QSqlError"> <value-type name="QSqlError">
<modify-function signature="operator=(QSqlError)" remove="all"/> <enum-type name="ErrorType"/>
</value-type> </value-type>
<value-type name="QSqlIndex"> <value-type name="QSqlIndex" />
<modify-function signature="operator=(QSqlIndex)" remove="all"/>
</value-type>
<value-type name="QSqlRelation"/> <value-type name="QSqlRelation"/>
<object-type name="QSqlRelationalDelegate"/> <object-type name="QSqlRelationalDelegate"/>
<value-type name="QSqlField"> <value-type name="QSqlField">
<modify-function signature="operator=(QSqlField)" remove="all"/> <enum-type name="RequiredStatus"/>
</value-type> </value-type>
<object-type name="QSqlDriver"> <object-type name="QSqlDriver">
<enum-type name="DriverFeature"/>
<enum-type name="IdentifierType"/>
<enum-type name="StatementType"/>
<extra-includes> <extra-includes>
<include file-name="QSqlQuery" location="global"/> <include file-name="QSqlQuery" location="global"/>
<include file-name="QSqlError" location="global"/> <include file-name="QSqlError" location="global"/>
@ -91,7 +113,9 @@
<modify-function signature="commitTransaction()" allow-thread="yes" /> <modify-function signature="commitTransaction()" allow-thread="yes" />
<modify-function signature="rollbackTransaction()" allow-thread="yes" /> <modify-function signature="rollbackTransaction()" allow-thread="yes" />
<modify-function signature="open(const QString &amp;, const QString&amp;, const QString&amp;, const QString&amp;, int, const QString&amp;)" allow-thread="yes" /> <modify-function signature="open(const QString &amp;, const QString&amp;, const QString&amp;, const QString&amp;, int, const QString&amp;)" allow-thread="yes" />
<!-- ### This is too low level for Python, and pointer would be useless for the Python programmer -->
<modify-function signature="handle() const" remove="all"/> <modify-function signature="handle() const" remove="all"/>
<!-- ### -->
</object-type> </object-type>
<object-type name="QSqlQueryModel"> <object-type name="QSqlQueryModel">
@ -112,6 +136,8 @@
</extra-includes> </extra-includes>
</object-type> </object-type>
<object-type name="QSqlResult"> <object-type name="QSqlResult">
<enum-type name="BindingSyntax"/>
<enum-type name="VirtualHookOperation"/>
<extra-includes> <extra-includes>
<include file-name="QSqlError" location="global"/> <include file-name="QSqlError" location="global"/>
<include file-name="QSqlQuery" location="global"/> <include file-name="QSqlQuery" location="global"/>
@ -119,7 +145,9 @@
<include file-name="QStringList" location="global"/> <include file-name="QStringList" location="global"/>
<include file-name="QSize" location="global"/> <include file-name="QSize" location="global"/>
</extra-includes> </extra-includes>
<!-- ### This isn't part of Qt public API -->
<modify-function signature="virtual_hook(int,void*)" remove="all" /> <modify-function signature="virtual_hook(int,void*)" remove="all" />
<!-- ### -->
<modify-function signature="exec()" rename="exec_" allow-thread="yes" /> <modify-function signature="exec()" rename="exec_" allow-thread="yes" />
<modify-function signature="fetchLast()" allow-thread="yes" /> <modify-function signature="fetchLast()" allow-thread="yes" />
<modify-function signature="fetchFirst()" allow-thread="yes" /> <modify-function signature="fetchFirst()" allow-thread="yes" />
@ -129,6 +157,7 @@
<modify-function signature="prepare(QString)" allow-thread="yes" /> <modify-function signature="prepare(QString)" allow-thread="yes" />
</object-type> </object-type>
<object-type name="QSqlTableModel"> <object-type name="QSqlTableModel">
<enum-type name="EditStrategy"/>
<extra-includes> <extra-includes>
<include file-name="QSqlIndex" location="global"/> <include file-name="QSqlIndex" location="global"/>
<include file-name="QStringList" location="global"/> <include file-name="QStringList" location="global"/>
@ -141,18 +170,4 @@
</extra-includes> </extra-includes>
</object-type> </object-type>
<enum-type name="QSql::Location"/>
<enum-type name="QSql::ParamTypeFlag" flags="QSql::ParamType"/>
<enum-type name="QSql::TableType"/>
<enum-type name="QSql::NumericalPrecisionPolicy"/>
<enum-type name="QSqlDriver::DriverFeature"/>
<enum-type name="QSqlDriver::IdentifierType"/>
<enum-type name="QSqlDriver::StatementType"/>
<enum-type name="QSqlError::ErrorType"/>
<enum-type name="QSqlField::RequiredStatus"/>
<enum-type name="QSqlQuery::BatchExecutionMode"/>
<enum-type name="QSqlResult::BindingSyntax"/>
<enum-type name="QSqlResult::VirtualHookOperation"/>
<enum-type name="QSqlTableModel::EditStrategy"/>
</typesystem> </typesystem>

View file

@ -1,38 +1,15 @@
project(QtSvg) project(QtSvg)
if(Q_WS_X11)
set(MODULE_NAME svg_x11)
set(SPECIFIC_OS_FILES
)
elseif(Q_WS_MAC)
set(MODULE_NAME svg_mac)
set(SPECIFIC_OS_FILES
)
else()
message(FATAL_ERROR "OS not supported")
endif(Q_WS_X11)
if (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6)
set (QtSvg_46_SRC )
else ()
set(QtSvg_46_SRC
)
endif (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6)
set(QtSvg_SRC set(QtSvg_SRC
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSvg/qgraphicssvgitem_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSvg/qgraphicssvgitem_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSvg/qsvggenerator_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSvg/qsvggenerator_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSvg/qsvgrenderer_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSvg/qsvgrenderer_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSvg/qsvgwidget_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSvg/qsvgwidget_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSvg/qtsvg_module_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSvg/qtsvg_module_wrapper.cpp
${SPECIFIC_OS_FILES}
${QtSvg_46_SRC}
) )
execute_generator(svg QtSvg_SRC "${CMAKE_CURRENT_BINARY_DIR}:${QtCore_SOURCE_DIR}:${QtGui_SOURCE_DIR}:${QtGui_BINARY_DIR}") set(QtSvg_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}")
set(QtSvg_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSvg/ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSvg/
${QT_INCLUDE_DIR} ${QT_INCLUDE_DIR}
${QT_QTCORE_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR}
@ -40,23 +17,19 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${QT_QTSVG_INCLUDE_DIR} ${QT_QTSVG_INCLUDE_DIR}
${SHIBOKEN_INCLUDE_DIR} ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR} ${libpyside_SOURCE_DIR}
${PYTHON_INCLUDE_PATH} ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_BINARY_DIR}/PySide/QtCore/ ${QtCore_BINARY_DIR}/PySide/QtCore/
${QtGui_BINARY_DIR}/PySide/QtGui/ ${QtGui_BINARY_DIR}/PySide/QtGui/)
) set(QtSvg_libraries pyside
${SHIBOKEN_PYTHON_LIBRARIES}
add_library(QtSvg MODULE ${QtSvg_SRC})
set_property(TARGET QtSvg PROPERTY PREFIX "")
target_link_libraries(QtSvg
pyside
${PYTHON_LIBRARIES}
${SHIBOKEN_LIBRARY} ${SHIBOKEN_LIBRARY}
${QT_QTSVG_LIBRARY} ${QT_QTSVG_LIBRARY}
) ${QT_QTGUI_LIBRARY})
add_dependencies(QtSvg QtGui) set(QtSvg_deps QtGui)
create_pyside_module(QtSvg
# install QtSvg_include_dirs
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/QtSvg.so QtSvg_libraries
DESTINATION ${SITE_PACKAGE}/PySide) QtSvg_deps
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSvg/pyside_qtsvg_python.h QtSvg_typesystem_path
DESTINATION include/PySide/QtSvg/) QtSvg_SRC
"")

View file

@ -1,4 +1,23 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!--
This file is part of PySide project.
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
Contact: PySide team <contact@pyside.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-->
<typesystem package="PySide.QtSvg"> <typesystem package="PySide.QtSvg">
<load-typesystem name="typesystem_gui.xml" generate="no"/> <load-typesystem name="typesystem_gui.xml" generate="no"/>
@ -8,7 +27,7 @@
<object-type name="QSvgGenerator"> <object-type name="QSvgGenerator">
<modify-function signature="setOutputDevice(QIODevice*)"> <modify-function signature="setOutputDevice(QIODevice*)">
<modify-argument index="1"> <modify-argument index="1">
<reference-count action="add"/> <reference-count action="set"/>
</modify-argument> </modify-argument>
</modify-function> </modify-function>

View file

@ -1,26 +1,21 @@
project(QtTest) project(QtTest)
if(Q_WS_X11) if (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6)
set(MODULE_NAME test_x11) set(QtTest_46_SRC "")
set(SPECIFIC_OS_FILES
)
elseif(Q_WS_MAC)
set(MODULE_NAME test_mac)
set(SPECIFIC_OS_FILES
)
else() else()
message(FATAL_ERROR "OS not supported") set(QtTest_46_SRC
endif(Q_WS_X11) ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtTest/qtest_pysideqtoucheventsequence_wrapper.cpp
)
endif()
set(QtTest_SRC set(QtTest_SRC
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtTest/qtest_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtTest/qtest_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtTest/qttest_module_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtTest/qttest_module_wrapper.cpp
${SPECIFIC_OS_FILES} ${QtTest_46_SRC}
) )
execute_generator(test QtTest_SRC "${CMAKE_CURRENT_BINARY_DIR}:${QtCore_SOURCE_DIR}:${QtGui_SOURCE_DIR}:${QtGui_BINARY_DIR}") set(QtTest_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}")
set(QtTest_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtTest/ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtTest/
${QT_INCLUDE_DIR} ${QT_INCLUDE_DIR}
${QT_QTCORE_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR}
@ -28,24 +23,20 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${QT_QTTEST_INCLUDE_DIR} ${QT_QTTEST_INCLUDE_DIR}
${SHIBOKEN_INCLUDE_DIR} ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR} ${libpyside_SOURCE_DIR}
${PYTHON_INCLUDE_PATH} ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_BINARY_DIR}/PySide/QtCore/ ${QtCore_BINARY_DIR}/PySide/QtCore/
${QtGui_BINARY_DIR}/PySide/QtGui/ ${QtGui_BINARY_DIR}/PySide/QtGui/)
) set(QtTest_libraries pyside
${SHIBOKEN_PYTHON_LIBRARIES}
add_library(QtTest MODULE ${QtTest_SRC})
set_property(TARGET QtTest PROPERTY PREFIX "")
target_link_libraries(QtTest
pyside
${PYTHON_LIBRARIES}
${SHIBOKEN_LIBRARY} ${SHIBOKEN_LIBRARY}
${QT_QTTEST_LIBRARY} ${QT_QTTEST_LIBRARY}
${QT_QTGUI_LIBRARY} ${QT_QTGUI_LIBRARY}
) ${QT_QTCORE_LIBRARY})
add_dependencies(QtTest QtGui) set(QtTest_deps QtGui)
create_pyside_module(QtTest
# install QtTest_include_dirs
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/QtTest.so QtTest_libraries
DESTINATION ${SITE_PACKAGE}/PySide) QtTest_deps
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtTest/pyside_qttest_python.h QtTest_typesystem_path
DESTINATION include/PySide/QtTest/) QtTest_SRC
"")

View file

@ -1,4 +1,23 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!--
This file is part of PySide project.
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
Contact: PySide team <contact@pyside.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-->
<typesystem package="PySide.QtTest"> <typesystem package="PySide.QtTest">
<load-typesystem name="typesystem_gui.xml" generate="no"/> <load-typesystem name="typesystem_gui.xml" generate="no"/>
@ -6,6 +25,8 @@
<rejection class="QTest" function-name="qCompare&lt;char*&gt;"/> <rejection class="QTest" function-name="qCompare&lt;char*&gt;"/>
<rejection class="QTest" function-name="qCompare&lt;double&gt;"/> <rejection class="QTest" function-name="qCompare&lt;double&gt;"/>
<rejection class="QTest" function-name="qCompare&lt;float&gt;"/> <rejection class="QTest" function-name="qCompare&lt;float&gt;"/>
<rejection class="QTest" function-name="qCompare&lt;double,qreal&gt;"/>
<rejection class="QTest" function-name="qCompare&lt;qreal,double&gt;"/>
<rejection class="QTest" function-name="qCompare"/> <rejection class="QTest" function-name="qCompare"/>
<rejection class="QTest" function-name="qVerify"/> <rejection class="QTest" function-name="qVerify"/>
<rejection class="QTest" function-name="qSleep"/> <rejection class="QTest" function-name="qSleep"/>
@ -16,23 +37,64 @@
<rejection class="QTest" function-name="qData"/> <rejection class="QTest" function-name="qData"/>
<rejection class="QTest" function-name="qWarn"/> <rejection class="QTest" function-name="qWarn"/>
<rejection class="QTest" function-name="toString"/> <rejection class="QTest" function-name="toString"/>
<rejection class="QTest" function-name="toString&lt;bool>"/>
<rejection class="QTest" function-name="toString&lt;char>"/>
<rejection class="QTest" function-name="toString&lt;double>"/>
<rejection class="QTest" function-name="toString&lt;float>"/>
<rejection class="QTest" function-name="toString&lt;int>"/>
<rejection class="QTest" function-name="toString&lt;long>"/>
<rejection class="QTest" function-name="toString&lt;qint64>"/>
<rejection class="QTest" function-name="toString&lt;quint64>"/>
<rejection class="QTest" function-name="toString&lt;short>"/>
<rejection class="QTest" function-name="toString&lt;uint>"/>
<rejection class="QTest" function-name="toString&lt;ulong>"/>
<rejection class="QTest" function-name="toString&lt;ushort>"/>
<rejection class="QTest" function-name="qt_snprintf"/>
<rejection class="QTest" function-name="compare_helper"/> <rejection class="QTest" function-name="compare_helper"/>
<rejection class="QTest" function-name="touchEvent"/>
<namespace-type name="QTest"> <namespace-type name="QTest">
<enum-type name="AttributeIndex" since="4.6"/>
<enum-type name="KeyAction"/>
<enum-type name="LogElementType" since="4.6"/>
<enum-type name="MouseAction"/>
<enum-type name="QBenchmarkMetric" since="4.7"/>
<enum-type name="SkipMode"/>
<enum-type name="TestFailMode"/>
<extra-includes> <extra-includes>
<include file-name="QtTest" location="global"/> <include file-name="QtTest" location="global"/>
</extra-includes> </extra-includes>
<!--<modify-function signature="qCompare<char>(char">--> <!--<modify-function signature="qCompare<char>(char">-->
</namespace-type>
<rejection class="QTouchEventSequence"/> <rejection class="QTouchEventSequence"/>
<object-type name="PySideQTouchEventSequence" target-lang-name="QTouchEventSequence" since="4.6" >
<!--<enum-type name="QTest::AttributeIndex"/> <modify-function signature="press(int, const QPoint&amp;, QWidget*)">
<enum-type name="QTest::KeyAction"/> <modify-argument index="return">
<enum-type name="QTest::LogElementType"/> <define-ownership class="target" owner="default"/>
<enum-type name="QTest::MouseAction"/> </modify-argument>
<enum-type name="QTest::SkipMode"/> </modify-function>
<enum-type name="QTest::TestFailMode"/>--> <modify-function signature="move(int, const QPoint&amp;, QWidget*)">
<modify-argument index="return">
<define-ownership class="target" owner="default"/>
</modify-argument>
</modify-function>
<modify-function signature="release(int, const QPoint&amp;, QWidget*)">
<modify-argument index="return">
<define-ownership class="target" owner="default"/>
</modify-argument>
</modify-function>
<modify-function signature="stationary(int)">
<modify-argument index="return">
<define-ownership class="target" owner="default"/>
</modify-argument>
</modify-function>
</object-type>
<modify-function signature="generateTouchEvent(QWidget*, QTouchEvent::DeviceType)" rename="touchEvent" since="4.6">
<modify-argument index="return">
<define-ownership class="target" owner="target"/>
</modify-argument>
</modify-function>
</namespace-type>
<rejection class="QSignalSpy"/> <rejection class="QSignalSpy"/>
<rejection class="QTestEventList"/> <rejection class="QTestEventList"/>

View file

@ -0,0 +1,38 @@
project(QtUiTools)
set(QtUiTools_SRC
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtUiTools/qtuitools_module_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtUiTools/quiloader_wrapper.cpp
)
set(QtUiTools_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtXml_SOURCE_DIR}${PATH_SEP}${QtUiTools_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}")
set(QtUiTools_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
${QT_QTCORE_INCLUDE_DIR}
${QT_QTGUI_INCLUDE_DIR}
${QT_QTXML_INCLUDE_DIR}
${QT_QTDESIGNER_INCLUDE_DIR}
${QT_QTUITOOLS_INCLUDE_DIR}
${SHIBOKEN_PYTHON_INCLUDE_DIR}
${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
${plugins_SOURCE_DIR}
${QtCore_BINARY_DIR}/PySide/QtCore/
${QtXml_BINARY_DIR}/PySide/QtXml/
${QtGui_BINARY_DIR}/PySide/QtGui/
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtUiTools)
set(QtUiTools_libraries pyside
uiplugin
${SHIBOKEN_PYTHON_LIBRARIES}
${QT_QTUITOOLS_LIBRARY}
${QT_QTDESIGNER_LIBRARY}
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY})
set(QtUiTools_deps QtGui QtXml)
create_pyside_module(QtUiTools
QtUiTools_include_dirs
QtUiTools_libraries
QtUiTools_deps
QtUiTools_typesystem_path
QtUiTools_SRC
"")

View file

@ -0,0 +1,47 @@
/*
* This file is part of the PySide project.
*
* Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
*
* Contact: PySide team <contact@pyside.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _PLUGIN_H_
#define _PLUGIN_H_
#include <QPluginLoader>
#include "customwidgets.h"
inline void registerCustomWidget(PyObject* obj)
{
static PyCustomWidgets* plugin = 0;
if (plugin == 0) {
foreach(QObject* o, QPluginLoader::staticInstances()) {
plugin = qobject_cast<PyCustomWidgets*>(o);
if (plugin)
break;
}
}
if (!plugin)
qDebug() << "Failed to load uiloader plugin.";
else
plugin->registerWidgetType(obj);
}
#endif

View file

@ -0,0 +1,52 @@
/*
* Based on code provided by:
* Antonio Valentino <antonio.valentino at tiscali.it>
* Frédéric <frederic.mantegazza at gbiloba.org>
*/
#include <shiboken.h>
#include <QUiLoader>
#include <QFile>
#include <QWidget>
static void createChildrenNameAttributes(PyObject* root, QObject* object)
{
foreach (QObject* child, object->children()) {
const QByteArray name = child->objectName().toLocal8Bit();
if (!name.isEmpty() && !name.startsWith("_") && !name.startsWith("qt_")) {
bool hasAttr = PyObject_HasAttrString(root, name.constData());
if (!hasAttr) {
Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[QObject*](child));
PyObject_SetAttrString(root, name.constData(), pyChild);
}
createChildrenNameAttributes(root, child);
}
createChildrenNameAttributes(root, child);
}
}
static PyObject* QUiLoadedLoadUiFromDevice(QUiLoader* self, QIODevice* dev, QWidget* parent)
{
QWidget* wdg = self->load(dev, parent);
if (wdg) {
PyObject* pyWdg = %CONVERTTOPYTHON[QWidget*](wdg);
createChildrenNameAttributes(pyWdg, wdg);
if (parent) {
Shiboken::AutoDecRef pyParent(%CONVERTTOPYTHON[QWidget*](parent));
Shiboken::Object::setParent(pyParent, pyWdg);
}
return pyWdg;
}
if (!PyErr_Occurred())
PyErr_SetString(PyExc_RuntimeError, "Unable to open/read ui device");
return 0;
}
static PyObject* QUiLoaderLoadUiFromFileName(QUiLoader* self, const QString& uiFile, QWidget* parent)
{
QFile fd(uiFile);
return QUiLoadedLoadUiFromDevice(self, &fd, parent);
}

View file

@ -0,0 +1,128 @@
<?xml version="1.0"?>
<!--
This file is part of PySide project.
Copyright (C) 2009-2011 Nokia Corporation and/or its subsidiary(-ies).
Contact: PySide team <contact@pyside.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-->
<typesystem package="PySide.QtUiTools">
<load-typesystem name="typesystem_gui.xml" generate="no" />
<load-typesystem name="typesystem_xml.xml" generate="no" />
<object-type name="QUiLoader">
<extra-includes>
<include file-name="glue/plugins.h" location="local"/>
</extra-includes>
<inject-code class="native" position="beginning" file="glue/uitools_loadui.cpp"/>
<inject-code>
Q_IMPORT_PLUGIN(uiplugin);
</inject-code>
<add-function signature="registerCustomWidget(PyObject*)" return-type="void">
<modify-argument index="1">
<rename to="customWidgetType" />
</modify-argument>
<inject-documentation format="target" mode="append">
Registers a Python created custom widget to QUiLoader, so it can be recognized when
loading a `.ui` file. The custom widget type is passed via the ``customWidgetType`` argument.
This is needed when you want to override a virtual method of some widget in the interface,
since duck punching will not work with widgets created by QUiLoader based on the contents
of the `.ui` file.
(Remember that `duck punching virtual methods is an invitation for your own demise!
&lt;http://www.pyside.org/docs/shiboken/wordsofadvice.html#duck-punching-and-virtual-methods>`_)
Let's see an obvious example. If you want to create a new widget it's probable you'll end up
overriding :class:`~PySide.QtGui.QWidget`'s :meth:`~PySide.QtGui.QWidget.paintEvent` method.
.. code-block:: python
class Circle(QWidget):
def paintEvent(self, event):
painter = QPainter(self)
painter.setPen(self.pen)
painter.setBrush(QBrush(self.color))
painter.drawEllipse(event.rect().center(), 20, 20)
# ...
loader = QUiLoader()
loader.registerCustomWidget(Circle)
circle = loader.load('circle.ui')
circle.show()
# ...
</inject-documentation>
<inject-code class="target" position="beginning">
registerCustomWidget(%PYARG_1);
%CPPSELF.addPluginPath(""); // force reload widgets
</inject-code>
</add-function>
<modify-function signature="createAction(QObject*, const QString&amp;)">
<modify-argument index="return">
<parent index="1" action="add"/>
</modify-argument>
</modify-function>
<modify-function signature="createActionGroup(QObject*, const QString&amp;)">
<modify-argument index="return">
<parent index="1" action="add"/>
</modify-argument>
</modify-function>
<modify-function signature="createLayout(const QString&amp;, QObject*, const QString&amp;)">
<modify-argument index="return">
<parent index="2" action="add"/>
</modify-argument>
</modify-function>
<modify-function signature="createWidget(const QString&amp;, QWidget*, const QString&amp;)">
<modify-argument index="return">
<parent index="2" action="add"/>
<define-ownership class="target" owner="default"/>
</modify-argument>
</modify-function>
<modify-function signature="load(QIODevice*, QWidget*)">
<modify-argument index="2">
<replace-default-expression with="0" />
<rename to="parentWidget" />
</modify-argument>
<modify-argument index="return">
<define-ownership class="target" owner="target"/>
</modify-argument>
<inject-code>
// Avoid calling the original function: %CPPSELF.%FUNCTION_NAME()
%PYARG_0 = QUiLoadedLoadUiFromDevice(%CPPSELF, %1, %2);
</inject-code>
</modify-function>
<!-- Syntax sugar -->
<add-function signature="load(QString, QWidget*)" return-type="QWidget*">
<modify-argument index="2">
<replace-default-expression with="0" />
<rename to="parentWidget" />
</modify-argument>
<modify-argument index="return">
<define-ownership class="target" owner="target"/>
</modify-argument>
<inject-code>
// Avoid calling the original function: %CPPSELF.%FUNCTION_NAME()
%PYARG_0 = QUiLoaderLoadUiFromFileName(%CPPSELF, %1, %2);
</inject-code>
</add-function>
</object-type>
</typesystem>

View file

@ -1,17 +1,5 @@
project(QtWebKit) project(QtWebKit)
if(Q_WS_X11)
set(MODULE_NAME webkit_x11)
set(SPECIFIC_OS_FILES
)
elseif(Q_WS_MAC)
set(MODULE_NAME webkit_mac)
set(SPECIFIC_OS_FILES
)
else()
message(FATAL_ERROR "OS not supported")
endif(Q_WS_X11)
if (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6) if (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6)
set (QtWebKit_46_SRC ) set (QtWebKit_46_SRC )
else () else ()
@ -19,9 +7,11 @@ else ()
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebelement_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebelement_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebelementcollection_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebelementcollection_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebinspector_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebinspector_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebpage_errorpageextensionoption_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebpage_errorpageextensionreturn_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qgraphicswebview_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qgraphicswebview_wrapper.cpp
) )
endif (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6) endif ()
set(QtWebKit_SRC set(QtWebKit_SRC
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qtwebkit_module_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qtwebkit_module_wrapper.cpp
@ -32,6 +22,10 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebhistoryitem_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebhistory_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebhistory_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebhittestresult_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebhittestresult_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebpage_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebpage_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebpage_choosemultiplefilesextensionoption_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebpage_choosemultiplefilesextensionreturn_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebpage_extensionoption_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebpage_extensionreturn_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebpluginfactory_mimetype_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebpluginfactory_mimetype_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebpluginfactory_plugin_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebpluginfactory_plugin_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebpluginfactory_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebpluginfactory_wrapper.cpp
@ -40,13 +34,11 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebsettings_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebview_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebview_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/webcore_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/webcore_wrapper.cpp
${SPECIFIC_OS_FILES}
${QtWebKit_46_SRC} ${QtWebKit_46_SRC}
) )
execute_generator(webkit QtWebKit_SRC "${CMAKE_CURRENT_BINARY_DIR}:${QtCore_SOURCE_DIR}:${QtGui_SOURCE_DIR}:${QtGui_BINARY_DIR}:${QtNetwork_SOURCE_DIR}") set(QtWebKit_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtNetwork_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}")
set(QtWebkit_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebkit/ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebkit/
${QT_INCLUDE_DIR} ${QT_INCLUDE_DIR}
${QT_QTCORE_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR}
@ -55,25 +47,22 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${QT_QTWEBKIT_INCLUDE_DIR} ${QT_QTWEBKIT_INCLUDE_DIR}
${SHIBOKEN_INCLUDE_DIR} ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR} ${libpyside_SOURCE_DIR}
${PYTHON_INCLUDE_PATH} ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_BINARY_DIR}/PySide/QtCore/ ${QtCore_BINARY_DIR}/PySide/QtCore/
${QtGui_BINARY_DIR}/PySide/QtGui/ ${QtGui_BINARY_DIR}/PySide/QtGui/
${QtNetwork_BINARY_DIR}/PySide/QtNetwork/ ${QtNetwork_BINARY_DIR}/PySide/QtNetwork/ )
) set(QtWebKit_libraries pyside
${SHIBOKEN_PYTHON_LIBRARIES}
add_library(QtWebKit MODULE ${QtWebKit_SRC})
set_property(TARGET QtWebKit PROPERTY PREFIX "")
target_link_libraries(QtWebKit
pyside
${PYTHON_LIBRARIES}
${SHIBOKEN_LIBRARY} ${SHIBOKEN_LIBRARY}
${QT_QTWEBKIT_LIBRARY} ${QT_QTWEBKIT_LIBRARY}
) ${QT_QTNETWORK_LIBRARY}
add_dependencies(QtWebKit QtGui) ${QT_QTGUI_LIBRARY})
add_dependencies(QtWebKit QtNetwork) set(QtWebKit_deps QtGui QtNetwork)
create_pyside_module(QtWebKit
QtWebkit_include_dirs
QtWebKit_libraries
QtWebKit_deps
QtWebKit_typesystem_path
QtWebKit_SRC
"")
# install
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/QtWebKit.so
DESTINATION ${SITE_PACKAGE}/PySide)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/pyside_qtwebkit_python.h
DESTINATION include/PySide/QtWebKit/)

View file

@ -1,4 +1,23 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!--
This file is part of PySide project.
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
Contact: PySide team <contact@pyside.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-->
<typesystem package="PySide.QtWebKit"> <typesystem package="PySide.QtWebKit">
<load-typesystem name="typesystem_core.xml" generate="no"/> <load-typesystem name="typesystem_core.xml" generate="no"/>
<load-typesystem name="typesystem_gui.xml" generate="no"/> <load-typesystem name="typesystem_gui.xml" generate="no"/>
@ -6,61 +25,208 @@
<namespace-type name="WebCore"/> <namespace-type name="WebCore"/>
<enum-type name="QWebSettings::FontFamily"/>
<enum-type name="QWebSettings::FontSize"/>
<enum-type name="QWebSettings::WebGraphic"/>
<enum-type name="QWebSettings::WebAttribute"/>
<enum-type name="QWebPage::NavigationType"/>
<enum-type name="QWebPage::WebAction"/>
<enum-type name="QWebPage::WebWindowType"/>
<enum-type name="QWebPage::FindFlag" flags="QWebPage::FindFlags"/>
<enum-type name="QWebPage::LinkDelegationPolicy"/>
<enum-type name="QWebPluginFactory::Extension"/>
<!-- Qt 4.6 -->
<enum-type name="QWebElement::StyleResolveStrategy"/>
<enum-type name="QWebFrame::RenderLayer"/>
<enum-type name="QWebPage:ErrorDomain"/>
<enum-type name="QWebPage::Extension"/>
<!-- unsuported property with type QList<MimeType> -->
<rejection class="QWebPluginFactory::Plugin" field-name="mimeTypes"/>
<object-type name="QWebView"> <object-type name="QWebView">
<modify-function signature="setPage(QWebPage*)"> <modify-function signature="setPage(QWebPage*)">
<modify-argument index="1"> <modify-argument index="1">
<define-ownership class="target" owner="c++"/> <reference-count action="set"/>
</modify-argument> </modify-argument>
</modify-function> </modify-function>
<modify-function signature="page() const">
<modify-argument index="return">
<define-ownership class="target" owner="default"/>
</modify-argument>
<inject-code position="end">
SbkObject* _pyReturn = reinterpret_cast&lt;SbkObject*&gt;(%PYARG_0);
if (!Shiboken::Object::hasParentInfo(_pyReturn))
Shiboken::Object::setParent(%PYSELF, %PYARG_0);
</inject-code>
</modify-function>
<modify-function signature="print(QPrinter*)const" rename="print_" /> <modify-function signature="print(QPrinter*)const" rename="print_" />
</object-type> </object-type>
<object-type name="QWebFrame"> <object-type name="QWebFrame">
<enum-type name="RenderLayer" since="4.6"/>
<modify-function signature="addToJavaScriptWindowObject(QString,QObject*)"> <modify-function signature="addToJavaScriptWindowObject(QString,QObject*)">
<modify-argument index="2"> <modify-argument index="2">
<parent index="this" action="add"/> <parent index="this" action="add"/>
</modify-argument> </modify-argument>
</modify-function> </modify-function>
<!-- TODO QtScript isn't implemented yet --> <modify-function signature="print(QPrinter*)const" rename="print_" />
<modify-function signature="addToJavaScriptWindowObject(QString,QObject*,QScriptEngine::ValueOwnership)" remove="all" /> <modify-function signature="metaData()const">
<!-- TODO QMultiMap isn't implemented yet --> <modify-argument index="return">
<modify-function signature="metaData()const" remove="all" /> <replace-type modified-type="PyObject" />
</modify-argument>
<inject-code position="end">
<insert-template name="convertFromMultiMap">
<replace from="%MAP_NAME" to="%0"/>
<replace from="%RETURN_NAME" to="%PYARG_0"/>
<replace from="%KEY_TYPE" to="QString"/>
<replace from="%VALUE_TYPE" to="QString"/>
</insert-template>
</inject-code>
</modify-function>
</object-type> </object-type>
<object-type name="QWebSettings"/> <object-type name="QWebSettings">
<object-type name="QWebPage"/> <enum-type name="FontFamily"/>
<enum-type name="FontSize"/>
<enum-type name="WebAttribute"/>
<enum-type name="WebGraphic"/>
</object-type>
<object-type name="QWebPage">
<enum-type name="FindFlag" flags="FindFlags"/>
<enum-type name="LinkDelegationPolicy"/>
<enum-type name="NavigationType"/>
<enum-type name="WebAction"/>
<enum-type name="WebWindowType"/>
<!-- Qt 4.6 -->
<enum-type name="ErrorDomain" since="4.6"/>
<enum-type name="Extension"/>
<!-- Qt 4.8 -->
<enum-type name="Feature" since="4.8" revision="4800" />
<enum-type name="PermissionPolicy" since="4.8" revision="4800" />
<value-type name="ChooseMultipleFilesExtensionOption" />
<value-type name="ChooseMultipleFilesExtensionReturn" />
<value-type name="ErrorPageExtensionOption" since="4.6" />
<value-type name="ErrorPageExtensionReturn" since="4.6" />
<value-type name="ExtensionOption" />
<value-type name="ExtensionReturn" />
<modify-function signature="extension(QWebPage::Extension, const QWebPage::ExtensionOption*, QWebPage::ExtensionReturn*)">
<template name="qwebpage_extension_argument_conversion">
PyObject* %out = 0;
// Cast the parameters according to the extension type
if (extension == QWebPage::ChooseMultipleFilesExtension) {
const ChooseMultipleFilesExtension$TYPE_SUFFIX* _in = reinterpret_cast&lt;const ChooseMultipleFilesExtension$TYPE_SUFFIX*>(%in);
%out = %CONVERTTOPYTHON[const QWebPage::ChooseMultipleFilesExtension$TYPE_SUFFIX*](_in);
#if QT_VERSION >= 0x040600
} else if (extension == QWebPage::ErrorPageExtension) {
const ErrorPageExtension$TYPE_SUFFIX* _in = reinterpret_cast&lt;const ErrorPageExtension$TYPE_SUFFIX*>(%in);
%out = %CONVERTTOPYTHON[const QWebPage::ErrorPageExtension$TYPE_SUFFIX*](_in);
#endif
}
</template>
<modify-argument index="2" invalidate-after-use="yes">
<conversion-rule class="target">
<insert-template name="qwebpage_extension_argument_conversion">
<replace from="$TYPE_SUFFIX" to="Option"/>
</insert-template>
</conversion-rule>
</modify-argument>
<modify-argument index="3" invalidate-after-use="yes">
<conversion-rule class="target">
<insert-template name="qwebpage_extension_argument_conversion">
<replace from="$TYPE_SUFFIX" to="Return"/>
</insert-template>
</conversion-rule>
</modify-argument>
</modify-function>
<modify-function signature="setNetworkAccessManager(QNetworkAccessManager*)">
<modify-argument index="1">
<reference-count action="set"/>
</modify-argument>
</modify-function>
<modify-function signature="networkAccessManager()const">
<modify-argument index="return">
<reference-count action="set" variable-name="setNetworkAccessManager(QNetworkAccessManager*)1" />
</modify-argument>
</modify-function>
<modify-function signature="view()const">
<modify-argument index="return">
<define-ownership owner="default"/>
</modify-argument>
</modify-function>
<modify-function signature="pluginFactory()const">
<modify-argument index="return">
<define-ownership owner="default"/>
</modify-argument>
</modify-function>
<modify-function signature="javaScriptPrompt(QWebFrame*,const QString &amp;,const QString &amp;,QString*)">
<modify-argument index="4">
<remove-argument />
<conversion-rule class="native">
QString _local;
QString* %4 = &amp;_local;
</conversion-rule>
</modify-argument>
<modify-argument index="return">
<replace-type modified-type="PySequence"/>
<conversion-rule class="native">
Shiboken::AutoDecRef pyRes(PySequence_GetItem(%PYARG_0, 0));
Shiboken::AutoDecRef pyStr(PySequence_GetItem(%PYARG_0, 1));
%RETURN_TYPE %out = %CONVERTTOCPP[%RETURN_TYPE](pyRes);
*%4 = %CONVERTTOCPP[QString](pyStr);
</conversion-rule>
<conversion-rule class="target">
%PYARG_0 = PyTuple_New(2);
PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[%RETURN_TYPE](%0));
PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[QString](*%4));
</conversion-rule>
</modify-argument>
</modify-function>
<add-function signature="qt_metacall()">
<inject-code class="native">
static int _signalIndex = -1;
static QMetaMethod _m;
if (_signalIndex == -1) {
_signalIndex = QWebPage::staticMetaObject.indexOfSlot("shouldInterruptJavaScript()");
_m = QWebPage::staticMetaObject.method(_signalIndex);
}
if (_signalIndex == id) {
Shiboken::GilState gil;
PyObject* self = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(this);
if (self) {
Shiboken::AutoDecRef _pyMethod(PyObject_GetAttrString(self, "shouldInterruptJavaScript"));
return PySide::SignalManager::callPythonMetaMethod(_m, args, _pyMethod, false);
}
}
</inject-code>
</add-function>
</object-type>
<object-type name="QWebHistory"/> <object-type name="QWebHistory"/>
<object-type name="QWebHistoryInterface"/> <object-type name="QWebHistoryInterface"/>
<object-type name="QWebPluginFactory"/> <object-type name="QWebPluginFactory">
<value-type name="QWebPluginFactory::Plugin"/> <enum-type name="Extension"/>
<value-type name="QWebPluginFactory::MimeType"/> <value-type name="Plugin"/>
<value-type name="MimeType"/>
<modify-function signature="create(const QString &amp;, const QUrl &amp;, const QStringList &amp;, const QStringList &amp;) const">
<modify-argument index="return">
<define-ownership class="native" owner="c++"/>
<define-ownership class="target" owner="target"/>
</modify-argument>
</modify-function>
</object-type>
<value-type name="QWebDatabase"/> <value-type name="QWebDatabase"/>
<value-type name="QWebHistoryItem"/> <value-type name="QWebHistoryItem"/>
<value-type name="QWebHitTestResult"/> <value-type name="QWebHitTestResult"/>
<value-type name="QWebSecurityOrigin"/> <value-type name="QWebSecurityOrigin"/>
<!-- Qt 4.6 --> <!-- Qt 4.6 -->
<object-type name="QGraphicsWebView"/> <object-type name="QGraphicsWebView" since="4.6"/>
<object-type name="QWebInspector"/> <object-type name="QWebInspector" since="4.6"/>
<value-type name="QWebElement"/> <value-type name="QWebElement" since="4.6">
<value-type name="QWebElementCollection"/> <enum-type name="StyleResolveStrategy"/>
</value-type>
<value-type name="QWebElementCollection" since="4.6">
<add-function signature="__len__">
<inject-code>
return %CPPSELF.count();
</inject-code>
</add-function>
<add-function signature="__getitem__">
<inject-code>
if (_i &lt; 0 || _i >= %CPPSELF.count()) {
PyErr_SetString(PyExc_IndexError, "index out of bounds");
return 0;
}
QWebElement element = %CPPSELF.at(_i);
return %CONVERTTOPYTHON[QWebElement](element);
</inject-code>
</add-function>
</value-type>
</typesystem> </typesystem>

View file

@ -0,0 +1,30 @@
<?xml version="1.0"?>
<!--
This file is part of PySide project.
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
Contact: PySide team <contact@pyside.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-->
<typesystem package="PySide.QtWebKit">
<object-type name="QWebFrame">
<modify-function signature="print(QPrinter*)const" remove="all"/>
</object-type>
<object-type name="QWebView">
<modify-function signature="print(QPrinter*)const" remove="all"/>
</object-type>
<load-typesystem name="typesystem_webkit.xml" generate="yes"/>
</typesystem>

View file

@ -35,9 +35,8 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtXml/qxmlreader_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtXml/qxmlsimplereader_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtXml/qxmlsimplereader_wrapper.cpp
) )
execute_generator(xml QtXml_SRC "${CMAKE_CURRENT_BINARY_DIR}:${QtCore_SOURCE_DIR}") set(QtXml_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}")
set(QtXml_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtXml ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtXml
${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}
${QT_INCLUDE_DIR} ${QT_INCLUDE_DIR}
@ -45,21 +44,17 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${QT_QTXML_INCLUDE_DIR} ${QT_QTXML_INCLUDE_DIR}
${SHIBOKEN_INCLUDE_DIR} ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR} ${libpyside_SOURCE_DIR}
${PYTHON_INCLUDE_PATH} ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_BINARY_DIR}/PySide/QtCore ${QtCore_BINARY_DIR}/PySide/QtCore)
) set(QtXml_libraries pyside
add_library(QtXml MODULE ${QtXml_SRC}) ${SHIBOKEN_PYTHON_LIBRARIES}
set_property(TARGET QtXml PROPERTY PREFIX "")
target_link_libraries(QtXml
pyside
${PYTHON_LIBRARIES}
${SHIBOKEN_LIBRARY} ${SHIBOKEN_LIBRARY}
${QT_QTXML_LIBRARY} ${QT_QTXML_LIBRARY})
) set(QtXml_deps QtCore)
add_dependencies(QtXml QtCore) create_pyside_module(QtXml
QtXml_include_dirs
# install QtXml_libraries
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/QtXml.so DESTINATION ${SITE_PACKAGE}/PySide) QtXml_deps
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtXml/pyside_qtxml_python.h QtXml_typesystem_path
DESTINATION include/PySide/QtXml/) QtXml_SRC
"")

View file

@ -1,4 +1,23 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!--
This file is part of PySide project.
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
Contact: PySide team <contact@pyside.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-->
<typesystem package="PySide.QtXml"> <typesystem package="PySide.QtXml">
<load-typesystem name="typesystem_templates.xml" generate="no" /> <load-typesystem name="typesystem_templates.xml" generate="no" />
<load-typesystem name="typesystem_core.xml" generate="no" /> <load-typesystem name="typesystem_core.xml" generate="no" />
@ -8,46 +27,26 @@
<rejection class="QXmlInputSource" field-name="EndOfData"/> <rejection class="QXmlInputSource" field-name="EndOfData"/>
<rejection class="QXmlInputSource" field-name="EndOfDocument"/> <rejection class="QXmlInputSource" field-name="EndOfDocument"/>
<enum-type name="QDomNode::NodeType"/> <value-type name="QDomAttr" />
<enum-type name="QDomNode::EncodingPolicy"/> <value-type name="QDomCDATASection" />
<enum-type name="QDomImplementation::InvalidDataPolicy"/> <value-type name="QDomCharacterData" />
<!-- <value-type name="QDomComment" />
<enum-type name="QXmlStreamReader::Error" />
<enum-type name="QXmlStreamReader::TokenType" />
-->
<value-type name="QDomAttr">
<modify-function signature="operator=(QDomAttr)" remove="all"/>
<modify-function signature="nodeType()const" remove="all"/>
</value-type>
<value-type name="QDomCDATASection">
<modify-function signature="operator=(QDomCDATASection)" remove="all"/>
<modify-function signature="nodeType()const" remove="all"/>
</value-type>
<value-type name="QDomCharacterData">
<modify-function signature="operator=(QDomCharacterData)" remove="all"/>
<modify-function signature="nodeType()const" remove="all"/>
</value-type>
<value-type name="QDomComment">
<modify-function signature="operator=(QDomComment)" remove="all"/>
<modify-function signature="nodeType()const" remove="all"/>
</value-type>
<template name="qdomdocument_setcontent"> <template name="qdomdocument_setcontent">
QString _errorMsg_; QString _errorMsg_;
int _errorLine_ = 0; int _errorLine_ = 0;
int _errorColumn_ = 0; int _errorColumn_ = 0;
%BEGIN_ALLOW_THREADS
bool _ret_ = %CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &amp;_errorMsg_, &amp;_errorLine_, &amp;_errorColumn_); bool _ret_ = %CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &amp;_errorMsg_, &amp;_errorLine_, &amp;_errorColumn_);
%PYARG_0 = Shiboken::makeTuple(_ret_, _errorMsg_, _errorLine_, _errorColumn_); %END_ALLOW_THREADS
%PYARG_0 = PyTuple_New(4);
PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[bool](_ret_));
PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[QString](_errorMsg_));
PyTuple_SET_ITEM(%PYARG_0, 2, %CONVERTTOPYTHON[int](_errorLine_));
PyTuple_SET_ITEM(%PYARG_0, 3, %CONVERTTOPYTHON[int](_errorColumn_));
</template> </template>
<value-type name="QDomDocument"> <value-type name="QDomDocument">
<modify-function signature="nodeType()const" remove="all"/>
<modify-function signature="operator=(QDomDocument)" remove="all"/>
<!-- will be replaced in inject code --> <!-- will be replaced in inject code -->
<modify-function signature="setContent(const QByteArray&amp;, bool, QString*, int*, int*)"> <modify-function signature="setContent(const QByteArray&amp;, bool, QString*, int*, int*)">
<modify-argument index="3"> <modify-argument index="3">
@ -62,6 +61,9 @@
<remove-argument/> <remove-argument/>
<remove-default-expression/> <remove-default-expression/>
</modify-argument> </modify-argument>
<modify-argument index="return">
<replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/>
</modify-argument>
<inject-code class="target" position="beginning"> <inject-code class="target" position="beginning">
<insert-template name="qdomdocument_setcontent" /> <insert-template name="qdomdocument_setcontent" />
</inject-code> </inject-code>
@ -79,6 +81,9 @@
<remove-argument/> <remove-argument/>
<remove-default-expression/> <remove-default-expression/>
</modify-argument> </modify-argument>
<modify-argument index="return">
<replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/>
</modify-argument>
<inject-code class="target" position="beginning"> <inject-code class="target" position="beginning">
<insert-template name="qdomdocument_setcontent" /> <insert-template name="qdomdocument_setcontent" />
</inject-code> </inject-code>
@ -96,6 +101,9 @@
<remove-argument/> <remove-argument/>
<remove-default-expression/> <remove-default-expression/>
</modify-argument> </modify-argument>
<modify-argument index="return">
<replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/>
</modify-argument>
<inject-code class="target" position="beginning"> <inject-code class="target" position="beginning">
<insert-template name="qdomdocument_setcontent" /> <insert-template name="qdomdocument_setcontent" />
</inject-code> </inject-code>
@ -113,6 +121,9 @@
<remove-argument/> <remove-argument/>
<remove-default-expression/> <remove-default-expression/>
</modify-argument> </modify-argument>
<modify-argument index="return">
<replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/>
</modify-argument>
<inject-code class="target" position="beginning"> <inject-code class="target" position="beginning">
<insert-template name="qdomdocument_setcontent" /> <insert-template name="qdomdocument_setcontent" />
</inject-code> </inject-code>
@ -130,6 +141,9 @@
<remove-argument/> <remove-argument/>
<remove-default-expression/> <remove-default-expression/>
</modify-argument> </modify-argument>
<modify-argument index="return">
<replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/>
</modify-argument>
<inject-code class="target" position="beginning"> <inject-code class="target" position="beginning">
<insert-template name="qdomdocument_setcontent" /> <insert-template name="qdomdocument_setcontent" />
</inject-code> </inject-code>
@ -147,6 +161,9 @@
<remove-argument/> <remove-argument/>
<remove-default-expression/> <remove-default-expression/>
</modify-argument> </modify-argument>
<modify-argument index="return">
<replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/>
</modify-argument>
<inject-code class="target" position="beginning"> <inject-code class="target" position="beginning">
<insert-template name="qdomdocument_setcontent" /> <insert-template name="qdomdocument_setcontent" />
</inject-code> </inject-code>
@ -164,6 +181,9 @@
<remove-argument/> <remove-argument/>
<remove-default-expression/> <remove-default-expression/>
</modify-argument> </modify-argument>
<modify-argument index="return">
<replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/>
</modify-argument>
<inject-code class="target" position="beginning"> <inject-code class="target" position="beginning">
<insert-template name="qdomdocument_setcontent" /> <insert-template name="qdomdocument_setcontent" />
</inject-code> </inject-code>
@ -181,80 +201,42 @@
<remove-argument/> <remove-argument/>
<remove-default-expression/> <remove-default-expression/>
</modify-argument> </modify-argument>
<modify-argument index="return">
<replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/>
</modify-argument>
<inject-code class="target" position="beginning"> <inject-code class="target" position="beginning">
<insert-template name="qdomdocument_setcontent" /> <insert-template name="qdomdocument_setcontent" />
</inject-code> </inject-code>
</modify-function> </modify-function>
</value-type> </value-type>
<value-type name="QDomDocumentFragment"> <value-type name="QDomDocumentFragment" />
<modify-function signature="nodeType()const" remove="all"/> <value-type name="QDomDocumentType" />
<modify-function signature="operator=(QDomDocumentFragment)" remove="all"/> <value-type name="QDomEntity" />
</value-type> <value-type name="QDomEntityReference" />
<value-type name="QDomDocumentType">
<modify-function signature="nodeType()const" remove="all"/>
<modify-function signature="operator=(QDomDocumentType)" remove="all"/>
</value-type>
<value-type name="QDomEntity">
<modify-function signature="nodeType()const" remove="all"/>
<modify-function signature="operator=(QDomEntity)" remove="all"/>
</value-type>
<value-type name="QDomEntityReference">
<modify-function signature="nodeType()const" remove="all"/>
<modify-function signature="operator=(QDomEntityReference)" remove="all"/>
</value-type>
<value-type name="QDomImplementation"> <value-type name="QDomImplementation">
<modify-function signature="operator=(QDomImplementation)" remove="all"/> <enum-type name="InvalidDataPolicy"/>
</value-type> </value-type>
<value-type name="QDomNamedNodeMap"> <value-type name="QDomNamedNodeMap" />
<modify-function signature="operator=(QDomNamedNodeMap)" remove="all"/>
</value-type>
<value-type name="QDomNode"> <value-type name="QDomNode">
<modify-function signature="operator=(QDomNode)" remove="all"/> <enum-type name="EncodingPolicy"/>
<enum-type name="NodeType"/>
<modify-function signature="save(QTextStream&amp;, int)const" allow-thread="yes"/> <modify-function signature="save(QTextStream&amp;, int)const" allow-thread="yes"/>
<modify-function signature="save(QTextStream&amp;, int, QDomNode::EncodingPolicy)const" allow-thread="yes"/> <modify-function signature="save(QTextStream&amp;, int, QDomNode::EncodingPolicy)const" allow-thread="yes"/>
</value-type> </value-type>
<value-type name="QDomNodeList"> <value-type name="QDomNodeList" />
<modify-function signature="operator=(const QDomNodeList &amp;)" remove="all"/> <value-type name="QDomNotation" />
</value-type> <value-type name="QDomProcessingInstruction" />
<value-type name="QDomNotation"> <value-type name="QDomText" />
<modify-function signature="nodeType()const" remove="all"/>
<modify-function signature="operator=(QDomNotation)" remove="all"/>
</value-type>
<value-type name="QDomProcessingInstruction"> <object-type name="QXmlParseException"/>
<modify-function signature="nodeType()const" remove="all"/>
<modify-function signature="operator=(QDomProcessingInstruction)" remove="all"/>
</value-type>
<value-type name="QDomText">
<modify-function signature="nodeType()const" remove="all"/>
<modify-function signature="operator=(const QDomText &amp;)" remove="all"/>
</value-type>
<value-type name="QXmlParseException"/>
<!-- These are defined in QtCore
<value-type name="QXmlStreamAttribute"/>
<value-type name="QXmlStreamAttributes"/>
<value-type name="QXmlStreamNamespaceDeclaration"/>
<value-type name="QXmlStreamNotationDeclaration"/>
<value-type name="QXmlStreamEntityDeclaration"/>
-->
<value-type name="QXmlAttributes"/> <value-type name="QXmlAttributes"/>
<!-- FIXME: This needs to be changed to value-type if
QXmlNamespaceSupport is ever passed by value -->
<object-type name="QXmlNamespaceSupport"/> <object-type name="QXmlNamespaceSupport"/>
<value-type name="QDomElement"/> <value-type name="QDomElement"/>
@ -272,8 +254,8 @@
<object-type name="QXmlLexicalHandler"/> <object-type name="QXmlLexicalHandler"/>
<template name="QXmlEntityResolver_resolveEntity_return_conversion_native"> <template name="QXmlEntityResolver_resolveEntity_return_conversion_native">
AutoDecRef _py_ok_(PySequence_GetItem(%PYARG_0, 0)); Shiboken::AutoDecRef _py_ok_(PySequence_GetItem(%PYARG_0, 0));
AutoDecRef _py_ret_(PySequence_GetItem(%PYARG_0, 1)); Shiboken::AutoDecRef _py_ret_(PySequence_GetItem(%PYARG_0, 1));
%RETURN_TYPE %out = %CONVERTTOCPP[%RETURN_TYPE](_py_ok_); %RETURN_TYPE %out = %CONVERTTOCPP[%RETURN_TYPE](_py_ok_);
%3 = %CONVERTTOCPP[QXmlInputSource*](_py_ret_); %3 = %CONVERTTOCPP[QXmlInputSource*](_py_ret_);
</template> </template>
@ -291,8 +273,12 @@
</modify-argument> </modify-argument>
<inject-code class="target" position="end"> <inject-code class="target" position="end">
QXmlInputSource* _qxmlinputsource_arg_ = 0; QXmlInputSource* _qxmlinputsource_arg_ = 0;
%BEGIN_ALLOW_THREADS
%RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME(%1, %2, _qxmlinputsource_arg_); %RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME(%1, %2, _qxmlinputsource_arg_);
%PYARG_0 = Shiboken::makeTuple(%0, _qxmlinputsource_arg_); %END_ALLOW_THREADS
%PYARG_0 = PyTuple_New(2);
PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[%RETURN_TYPE](%0));
PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[QXmlInputSource*](_qxmlinputsource_arg_));
</inject-code> </inject-code>
</modify-function> </modify-function>
</object-type> </object-type>
@ -314,22 +300,18 @@
</modify-argument> </modify-argument>
<inject-code class="target" position="end"> <inject-code class="target" position="end">
QXmlInputSource* _qxmlinputsource_arg_ = 0; QXmlInputSource* _qxmlinputsource_arg_ = 0;
%BEGIN_ALLOW_THREADS
%RETURN_TYPE %0 = %CPPSELF.%TYPE::%FUNCTION_NAME(%1, %2, _qxmlinputsource_arg_); %RETURN_TYPE %0 = %CPPSELF.%TYPE::%FUNCTION_NAME(%1, %2, _qxmlinputsource_arg_);
%PYARG_0 = Shiboken::makeTuple(%0, _qxmlinputsource_arg_); %END_ALLOW_THREADS
%PYARG_0 = PyTuple_New(2);
PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[%RETURN_TYPE](%0));
PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[QXmlInputSource*](_qxmlinputsource_arg_));
</inject-code> </inject-code>
</modify-function> </modify-function>
</object-type> </object-type>
<object-type name="QXmlInputSource"/> <object-type name="QXmlInputSource"/>
<object-type name="QXmlLocator"/> <object-type name="QXmlLocator"/>
<!-- These are defined already in QtCore
<object-type name="QXmlStreamReader">
</object-type>
<object-type name="QXmlStreamWriter">
</object-type>
-->
<object-type name="QXmlReader"> <object-type name="QXmlReader">
<modify-function signature="parse(const QXmlInputSource*)"> <modify-function signature="parse(const QXmlInputSource*)">
<modify-argument index="1" invalidate-after-use="yes"/> <modify-argument index="1" invalidate-after-use="yes"/>
@ -432,7 +414,5 @@
</inject-code> </inject-code>
</modify-function> </modify-function>
</object-type> </object-type>
</typesystem> </typesystem>

View file

@ -0,0 +1,50 @@
project(QtXmlPatterns)
if (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6)
set(QtXmlPatterns_46_SRC )
else()
set(QtXmlPatterns_46_SRC
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtXmlPatterns/qxmlschemavalidator_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtXmlPatterns/qxmlschema_wrapper.cpp
)
endif()
set(QtXmlPatterns_SRC
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtXmlPatterns/qabstractmessagehandler_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtXmlPatterns/qabstracturiresolver_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtXmlPatterns/qabstractxmlnodemodel_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtXmlPatterns/qabstractxmlreceiver_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtXmlPatterns/qsourcelocation_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtXmlPatterns/qtxmlpatterns_module_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtXmlPatterns/qxmlformatter_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtXmlPatterns/qxmlitem_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtXmlPatterns/qxmlnamepool_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtXmlPatterns/qxmlname_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtXmlPatterns/qxmlnodemodelindex_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtXmlPatterns/qxmlquery_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtXmlPatterns/qxmlresultitems_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtXmlPatterns/qxmlserializer_wrapper.cpp
${QtXmlPatterns_46_SRC}
)
set(QtXmlPatterns_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}")
set(QtXmlPatterns_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
${QT_QTCORE_INCLUDE_DIR}
${QT_QTXMLPATTERNS_INCLUDE_DIR}
${SHIBOKEN_PYTHON_INCLUDE_DIR}
${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
${QtCore_BINARY_DIR}/PySide/QtCore/
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtXmlPatterns)
set(QtXmlPatterns_libraries pyside
${SHIBOKEN_PYTHON_LIBRARIES}
${QT_QTCORE_LIBRARY}
${QT_QTXMLPATTERNS_LIBRARY})
set(QtXmlPatterns_deps QtCore)
create_pyside_module(QtXmlPatterns
QtXmlPatterns_include_dirs
QtXmlPatterns_libraries
QtXmlPatterns_deps
QtXmlPatterns_typesystem_path
QtXmlPatterns_SRC
"")

View file

@ -0,0 +1,101 @@
<?xml version="1.0"?>
<!--
This file is part of PySide project.
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
Contact: PySide team <contact@pyside.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-->
<typesystem package="PySide.QtXmlPatterns">
<load-typesystem name="typesystem_core.xml" generate="no"/>
<object-type name="QXmlSchema" since="4.6" /> <!-- Qt scoped pointer does not allow declare this as value type -->
<object-type name="QXmlSchemaValidator" since="4.6">
<modify-function signature="schema() const">
<modify-argument index="return">
<replace-type modified-type="QXmlSchema*"/>
<define-ownership owner="target"/>
</modify-argument>
<inject-code>
QXmlSchema* %0 = new QXmlSchema(%CPPSELF.schema());
%PYARG_0 = %CONVERTTOPYTHON[QXmlSchema*](%0);
</inject-code>
</modify-function>
</object-type>
<object-type name="QAbstractMessageHandler" />
<object-type name="QAbstractUriResolver" />
<object-type name="QAbstractXmlNodeModel">
<enum-type name="NodeCopySetting" />
<enum-type name="SimpleAxis" />
</object-type>
<object-type name="QAbstractXmlReceiver" />
<value-type name="QSourceLocation" />
<object-type name="QXmlFormatter" />
<value-type name="QXmlItem" />
<value-type name="QXmlName">
<!-- ### These methods aren't part of Qt public API -->
<modify-function signature="QXmlName(short, short, short)" remove="all" />
<modify-function signature="setNamespaceURI(short)" remove="all" />
<modify-function signature="localName()const" remove="all" />
<modify-function signature="prefix()const" remove="all" />
<modify-function signature="hasPrefix()const" remove="all" />
<modify-function signature="hasNamespace()const" remove="all" />
<modify-function signature="namespaceURI()const" remove="all" />
<modify-function signature="isLexicallyEqual(const QXmlName&amp;)const" remove="all" />
<modify-function signature="setPrefix(short)" remove="all" />
<modify-function signature="setLocalName(short)" remove="all" />
<modify-function signature="code()const" remove="all" />
<!-- ### -->
</value-type>
<value-type name="QXmlNamePool" />
<rejection class="QXmlNodeModelIndex" function-name="type" />
<rejection class="QXmlNodeModelIndex" function-name="sequencedTypedValue" />
<rejection class="QXmlNodeModelIndex" function-name="iterate" />
<!-- ### This enum isn't part of Qt public API -->
<suppress-warning text="enum 'QXmlNodeModelIndex::Axis' does not have a type entry or is not an enum"/>
<value-type name="QXmlNodeModelIndex">
<enum-type name="DocumentOrder" />
<enum-type name="NodeKind" />
<!-- ### Qt internal methods -->
<modify-function signature="name()const" remove="all" />
<modify-function signature="root()const" remove="all" />
<modify-function signature="documentUri()const" remove="all" />
<modify-function signature="baseUri()const" remove="all" />
<modify-function signature="kind()const" remove="all" />
<modify-function signature="isDeepEqual(const QXmlNodeModelIndex&amp;)const" remove="all" />
<modify-function signature="compareOrder(const QXmlNodeModelIndex &amp;)const" remove="all" />
<modify-function signature="sendNamespaces(QAbstractXmlReceiver *)const" remove="all" />
<modify-function signature="namespaceBindings()const" remove="all" />
<modify-function signature="namespaceForPrefix(short)const" remove="all" />
<modify-function signature="stringValue()const" remove="all" />
<modify-function signature="is(const QXmlNodeModelIndex &amp;)const" remove="all" />
<modify-function signature="reset()" remove="all" />
<!-- ### -->
</value-type>
<value-type name="QXmlQuery">
<!-- ### TODO: must evaluate if anything other than removal is needed. -->
<enum-type name="QueryLanguage" />
<modify-function signature="evaluateTo(QStringList*)const" remove="all" />
<modify-function signature="evaluateTo(QString*)const" remove="all" />
<!-- ### -->
</value-type>
<object-type name="QXmlResultItems" />
<object-type name="QXmlSerializer" />
<suppress-warning text="class 'QAbstractXmlNodeModel' inherits from unknown base class 'QSharedData'"/>
<suppress-warning text="class not found for setup inheritance 'QSharedData'"/>
</typesystem>

View file

@ -1 +0,0 @@
__all__ = ['QtCore', 'QtGui', 'QtNetwork', 'QtOpenGL', 'QtSql', 'QtSvg', 'QtTest', 'QtWebKit']

3
PySide/__init__.py.in Normal file
View file

@ -0,0 +1,3 @@
__all__ = ['QtCore', 'QtGui', 'QtNetwork', 'QtOpenGL', 'QtSql', 'QtSvg', 'QtTest', 'QtWebKit', 'QtScript']
__version__ = "@BINDING_API_VERSION_FULL@"
__version_info__ = (@BINDING_API_MAJOR_VERSION@, @BINDING_API_MINOR_VERSION@, @BINDING_API_MICRO_VERSION@, "@BINDING_API_RELEASE_LEVEL@", @BINDING_API_SERIAL@)

File diff suppressed because it is too large Load diff

View file

@ -1,16 +1,9 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
** **
** This file is part of the QtCore module of the Qt Toolkit. ** This file is part of the QtCore module of the Qt Toolkit, plus some
** ** modifications by PySide team.
** $QT_BEGIN_LICENSE:LGPL$
** Commercial Usage
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
** **
** GNU Lesser General Public License Usage ** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser ** Alternatively, this file may be used under the terms of the GNU Lesser
@ -20,29 +13,16 @@
** ensure the GNU Lesser General Public License version 2.1 requirements ** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
** **
** In addition, as a special exception, Nokia gives you certain
** additional rights. These rights are described in the Nokia Qt LGPL
** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
** package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please ** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com. ** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
** **
****************************************************************************/ ****************************************************************************/
#ifndef QOBJECTDEFS_PYSIDE_H #undef QT_NO_STL
#define QOBJECTDEFS_PYSIDE_H #undef QT_NO_STL_WCHAR
#define Q_BYTE_ORDER // used to enable QSysInfo.Endian detection on MacOSX
#include <QtCore/qnamespace.h> #include "@QT_QTCORE_INCLUDE_DIR@/qnamespace.h"
QT_BEGIN_HEADER QT_BEGIN_HEADER
@ -332,4 +312,108 @@ QT_END_NAMESPACE
QT_END_HEADER QT_END_HEADER
#endif // QOBJECTDEFS_H #define qdoc
#if @ENABLE_X11@
#define Q_WS_X11
#elif @ENABLE_MAC@
#define Q_WS_MAC
#elif @ENABLE_WIN@
#include "pysidewtypes.h"
#define Q_WS_WIN
#elif @ENABLE_SIMULATOR@
#define Q_WS_SIMULATOR
#endif
// There are symbols in Qt that exist in Debug but
// not in release
#define QT_NO_DEBUG
#include "@QT_QTCORE_INCLUDE_DIR@/QtCore"
#if @ENABLE_MAC@ || @ENABLE_WIN@
// Workaround to parse the QApplication header
#define Q_INTERNAL_QAPP_SRC
#undef qdoc
#endif
#include "@QT_QTGUI_INCLUDE_DIR@/QtGui"
#include "qpytextobject.h" // PySide class
#if @ENABLE_X11@
#include "@QT_QTGUI_INCLUDE_DIR@/QX11Info"
#include "@QT_QTGUI_INCLUDE_DIR@/QX11EmbedContainer"
#include "@QT_QTGUI_INCLUDE_DIR@/QX11EmbedWidget"
#elif @ENABLE_MAC@
#include "@QT_QTGUI_INCLUDE_DIR@/qmacstyle_mac.h"
#endif
#include "@QT_QTXML_INCLUDE_DIR@/QtXml"
#include "@QT_QTUITOOLS_INCLUDE_DIR@/QtUiTools"
#include "@QT_QTNETWORK_INCLUDE_DIR@/QtNetwork"
#include "@QT_QTSCRIPT_INCLUDE_DIR@/QtScript"
#include "@QT_QTSCRIPTTOOLS_INCLUDE_DIR@/QtScriptTools"
#include "@QT_QTMULTIMEDIA_INCLUDE_DIR@/QtMultimedia"
#include <QtMaemo5/QtMaemo5>
#include "@QT_QTDECLARATIVE_INCLUDE_DIR@/QtDeclarative"
// QT_GUI_LIB must be defined to QSqlRelationalDelegate become visible
#define QT_GUI_LIB
#undef Q_DECLARE_INTERFACE
#include "@QT_QTSQL_INCLUDE_DIR@/QtSql"
#include "@QT_QTSVG_INCLUDE_DIR@/QtSvg"
#if @QT_QTXMLPATTERNS_FOUND@
# include "@QT_QTXMLPATTERNS_INCLUDE_DIR@/QtXmlPatterns"
#endif
#if @QT_QTWEBKIT_FOUND@
# include "@QT_QTWEBKIT_INCLUDE_DIR@/QtWebKit"
#endif
#if @QT_QTTEST_FOUND@
# include "@QT_QTTEST_INCLUDE_DIR@/QtTest"
#if @QT_VERSION_MINOR@ > 5
# include "pysideqtesttouch.h"
#endif
#endif
// Phonon
#include "phonon/pyside_phonon.h"
#include "@QT_PHONON_INCLUDE_DIR@/abstractaudiooutput.h"
#include "@QT_PHONON_INCLUDE_DIR@/abstractmediastream.h"
#include "@QT_PHONON_INCLUDE_DIR@/abstractvideooutput.h"
#include "@QT_PHONON_INCLUDE_DIR@/addoninterface.h"
#include "@QT_PHONON_INCLUDE_DIR@/audiooutput.h"
#include "@QT_PHONON_INCLUDE_DIR@/audiooutputinterface.h"
#include "@QT_PHONON_INCLUDE_DIR@/backendcapabilities.h"
#include "@QT_PHONON_INCLUDE_DIR@/backendinterface.h"
#include "@QT_PHONON_INCLUDE_DIR@/effect.h"
#include "@QT_PHONON_INCLUDE_DIR@/effectinterface.h"
#include "@QT_PHONON_INCLUDE_DIR@/effectparameter.h"
#include "@QT_PHONON_INCLUDE_DIR@/effectwidget.h"
#include "@QT_PHONON_INCLUDE_DIR@/mediacontroller.h"
#include "@QT_PHONON_INCLUDE_DIR@/medianode.h"
#include "@QT_PHONON_INCLUDE_DIR@/mediaobject.h"
#include "@QT_PHONON_INCLUDE_DIR@/mediaobjectinterface.h"
#include "@QT_PHONON_INCLUDE_DIR@/mediasource.h"
#include "@QT_PHONON_INCLUDE_DIR@/objectdescription.h"
#include "@QT_PHONON_INCLUDE_DIR@/objectdescriptionmodel.h"
#include "@QT_PHONON_INCLUDE_DIR@/path.h"
#include "@QT_PHONON_INCLUDE_DIR@/phonon_export.h"
#include "@QT_PHONON_INCLUDE_DIR@/phonondefs.h"
#include "@QT_PHONON_INCLUDE_DIR@/phononnamespace.h"
#include "@QT_PHONON_INCLUDE_DIR@/platformplugin.h"
#include "@QT_PHONON_INCLUDE_DIR@/seekslider.h"
#include "@QT_PHONON_INCLUDE_DIR@/streaminterface.h"
#include "@QT_PHONON_INCLUDE_DIR@/videoplayer.h"
#include "@QT_PHONON_INCLUDE_DIR@/videowidget.h"
#include "@QT_PHONON_INCLUDE_DIR@/videowidgetinterface.h"
#include "@QT_PHONON_INCLUDE_DIR@/volumefadereffect.h"
#include "@QT_PHONON_INCLUDE_DIR@/volumefaderinterface.h"
#include "@QT_PHONON_INCLUDE_DIR@/volumeslider.h"
//QtHelp need be included after QtSql
#include "@QT_QTHELP_INCLUDE_DIR@/QtHelp"
#ifndef QT_NO_OPENGL
#include <@GL_H@>
#include <@QT_QTOPENGL_INCLUDE_DIR@/QtOpenGL>
#endif // QT_NO_OPENGL

View file

@ -1,7 +1,7 @@
/* /*
* This file is part of PySide: Python for Qt * This file is part of PySide: Python for Qt
* *
* Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). * Copyright (C) 2009-2011 Nokia Corporation and/or its subsidiary(-ies).
* *
* Contact: PySide team <contact@pyside.org> * Contact: PySide team <contact@pyside.org>
* *

View file

@ -0,0 +1,78 @@
project(phonon)
# workaround for a cmake bug under MacOSX, it finds phonon but not the include path
if (NOT QT_PHONON_INCLUDE_DIR AND CMAKE_HOST_APPLE)
set(QT_PHONON_INCLUDE_DIR "${QT_LIBRARY_DIR}/phonon.framework/Headers")
endif ()
set(phonon_OPTIONAL_SRC )
set(phonon_DROPPED_ENTRIES )
check_qt_class(phonon VideoCaptureDevice phonon_OPTIONAL_SRC phonon_DROPPED_ENTRIES Phonon ObjectDescription)
set(phonon_SRC
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_abstractaudiooutput_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_abstractmediastream_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_abstractvideooutput_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_addoninterface_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_audiocapturedevice_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_audiochanneldescription_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_audiooutputdevicemodel_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_audiooutputdevice_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_audiooutput_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_backendcapabilities_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_backendinterface_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_effectdescriptionmodel_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_effectdescription_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_effectinterface_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_effectparameter_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_effectwidget_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_effect_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_mediacontroller_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_medianode_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_mediaobjectinterface_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_mediaobject_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_mediasource_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_module_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_path_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_platformplugin_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_seekslider_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_streaminterface_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_subtitledescription_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_videoplayer_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_videowidgetinterface_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_videowidget_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_volumefadereffect_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_volumefaderinterface_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_volumeslider_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_backendcapabilities_notifierwrapper_wrapper.cpp
${phonon_OPTIONAL_SRC}
)
set(phonon_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${phonon_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}")
set(phonon_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
${QT_QTCORE_INCLUDE_DIR}
${QT_QTGUI_INCLUDE_DIR}
${QT_PHONON_INCLUDE_DIR}
${SHIBOKEN_PYTHON_INCLUDE_DIR}
${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
${QtGui_BINARY_DIR}/PySide/QtGui/
${QtCore_BINARY_DIR}/PySide/QtCore/
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon)
set(phonon_libraries pyside
${SHIBOKEN_PYTHON_LIBRARIES}
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${QT_PHONON_LIBRARY})
set(phonon_deps QtGui)
create_pyside_module(phonon
phonon_include_dirs
phonon_libraries
phonon_deps
phonon_typesystem_path
phonon_SRC
""
""
phonon_DROPPED_ENTRIES)

View file

@ -0,0 +1,39 @@
#ifndef PYSIDE_PHONON
#define PYSIDE_PHONON
#include <QObject>
#include <phonon/backendcapabilities.h>
namespace Phonon
{
namespace BackendCapabilities
{
class NotifierWrapper : public QObject
{
public:
inline static NotifierWrapper* notifier() {
Notifier* notifier = BackendCapabilities::notifier();
if (notifier != m_notifier) {
delete m_instance;
m_instance = new NotifierWrapper(notifier);
}
return m_instance;
}
inline const QMetaObject* metaObject() const { return m_notifier->metaObject(); }
private:
static NotifierWrapper* m_instance;
static Notifier* m_notifier;
NotifierWrapper(Notifier* notifier) { m_notifier = notifier; }
NotifierWrapper() {}
};
}
}
#endif

View file

@ -0,0 +1,315 @@
<?xml version="1.0"?>
<!--
This file is part of PySide project.
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
Contact: PySide team <contact@pyside.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-->
<typesystem package="PySide.phonon">
<load-typesystem name="typesystem_gui.xml" generate="no" />
<rejection class="Phonon::ObjectDescriptionData"/>
<rejection class="Phonon::ObjectDescriptionModelData"/>
<rejection class="Phonon::MediaNodeDestructionHandler"/>
<rejection class="Phonon::GlobalConfig"/>
<rejection class="Phonon::IODeviceStream"/>
<rejection class="Phonon::Factory"/>
<rejection class="Phonon::Experimental"/>
<rejection class="AudioOutputAdaptor"/>
<rejection class="Phonon::BackendCapabilities::Notifier"/>
<rejection class="*" field-name="k_ptr"/>
<rejection class="*" field-name="k_func"/>
<namespace-type name="Phonon">
<extra-includes>
<include file-name="phononnamespace.h" location="global"/>
</extra-includes>
<namespace-type name="BackendCapabilities" >
<inject-code class="native">
Phonon::BackendCapabilities::NotifierWrapper* Phonon::BackendCapabilities::NotifierWrapper::m_instance = 0;
Phonon::BackendCapabilities::Notifier* Phonon::BackendCapabilities::NotifierWrapper::m_notifier = 0;
</inject-code>
<add-function signature="notifier()" return-type="Phonon::BackendCapabilities::NotifierWrapper">
<inject-code class="target">
Phonon::BackendCapabilities::NotifierWrapper *_notifierWrapper = Phonon::BackendCapabilities::NotifierWrapper::notifier();
%PYARG_0 = %CONVERTTOPYTHON[Phonon::BackendCapabilities::NotifierWrapper*](_notifierWrapper);
</inject-code>
</add-function>
<!-- ### causes moc-related linker error -->
<!-- <object-type name="Notifier"/> -->
<object-type name="NotifierWrapper" target-lang-name="Notifier">
<inject-documentation format="target" mode="append">
.. class: Notifier
Notifications about backend capabilities
.. method:: capabilitiesChanged()
This signal is emitted if the capabilities have changed. This can happen if the user has requested a backend change.
.. method:: availableAudioOutputDevicesChanged()
This signal is emitted when audio capture devices were plugged or unplugged.
Check :meth:`PySide.phonon.BackendCapabilities.availableAudioOutputDevices` to get the current list of available devices.
.. method:: availableAudioCaptureDevicesChanged()
This signal is emitted when audio capture devices were plugged or unplugged.
Check :meth:`PySide.phonon.BackendCapabilities.availableAudioCaptureDevices` to get the current list of available devices.
</inject-documentation>
<include file-name="backendcapabilities.h" location="global"/>
<include file-name="pyside_phonon.h" location="local"/>
<!-- ### This isn't part of Qt public API -->
<modify-function signature="notifier()" remove="all"/>
<modify-function signature="Phonon::BackendCapabilities::NotifierWrapper(Phonon::BackendCapabilities::Notifier*)">
<access modifier="private"/>
</modify-function>
<!-- ### -->
<inject-code class="target" position="end">
PySideSignal* signal_item;
signal_item = PySide::Signal::newObject("capabilitiesChanged", "void", NULL);
PyDict_SetItemString(Sbk_Phonon_BackendCapabilities_NotifierWrapper_Type.super.ht_type.tp_dict, "capabilitiesChanged", (PyObject*)signal_item);
Py_DECREF((PyObject*)signal_item);
signal_item = PySide::Signal::newObject("availableAudioOutputDevicesChanged", "void", NULL);
PyDict_SetItemString( Sbk_Phonon_BackendCapabilities_NotifierWrapper_Type.super.ht_type.tp_dict, "availableAudioOutputDevicesChanged", (PyObject*)signal_item);
Py_DECREF((PyObject*)signal_item);
</inject-code>
</object-type>
</namespace-type>
<enum-type name="Category" />
<enum-type name="DiscType"/>
<enum-type name="ErrorType"/>
<enum-type name="MetaData"/>
<enum-type name="ObjectDescriptionType"/>
<enum-type name="State"/>
<enum-type name="CaptureCategory"/>
<object-type name="AbstractVideoOutput"/>
<object-type name="AddonInterface">
<enum-type name="AngleCommand"/>
<enum-type name="AudioChannelCommand"/>
<enum-type name="ChapterCommand"/>
<enum-type name="Interface"/>
<enum-type name="NavigationCommand"/>
<enum-type name="SubtitleCommand"/>
<enum-type name="TitleCommand"/>
</object-type>
<object-type name="BackendInterface">
<enum-type name="Class"/>
</object-type>
<object-type name="EffectInterface"/>
<object-type name="MediaNode"/>
<object-type name="MediaObjectInterface"/>
<object-type name="PlatformPlugin"/>
<object-type name="StreamInterface"/>
<object-type name="VideoWidgetInterface"/>
<object-type name="VolumeFaderInterface"/>
<value-type name="EffectParameter">
<enum-type name="Hint" flags="Hints"/>
<!-- ### Internal methods and ctors -->
<modify-function signature="EffectParameter()" remove="all"/>
<modify-function signature="operator&lt;(const Phonon::EffectParameter &amp;)const" remove="all"/>
<modify-function signature="operator&gt;(const Phonon::EffectParameter &amp;)const" remove="all"/>
<modify-function signature="id()const" remove="all"/>
<modify-function signature="operator==(Phonon::EffectParameter)const" remove="all"/>
<!-- ### -->
</value-type>
<value-type name="MediaSource">
<enum-type name="Type"/>
</value-type>
<value-type name="Path">
<modify-function signature="disconnect()" rename="disconnectPath"/>
<modify-function signature="insertEffect(Phonon::EffectDescription,Phonon::Effect*)">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
<modify-function signature="insertEffect(Phonon::Effect*,Phonon::Effect*)">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
<modify-function signature="removeEffect(Phonon::Effect*)">
<modify-argument index="1">
<parent index="this" action="remove"/>
</modify-argument>
</modify-function>
<modify-function signature="sink() const">
<modify-argument index="return">
<define-ownership class="target" owner="default"/>
</modify-argument>
</modify-function>
<modify-function signature="source() const">
<modify-argument index="return">
<define-ownership class="target" owner="default"/>
</modify-argument>
</modify-function>
</value-type>
<value-type name="ObjectDescription" generate="no"/>
<value-type name="EffectDescription">
<modify-function signature="operator==(Phonon::ObjectDescription)const">
<modify-argument index="1">
<replace-type modified-type="Phonon::EffectDescription"/>
</modify-argument>
</modify-function>
<modify-function signature="operator!=(Phonon::ObjectDescription)const">
<modify-argument index="1">
<replace-type modified-type="Phonon::EffectDescription"/>
</modify-argument>
</modify-function>
<modify-function signature="fromIndex(int)">
<modify-argument index="return">
<replace-type modified-type="EffectDescription"/>
</modify-argument>
</modify-function>
</value-type>
<value-type name="AudioOutputDevice">
<modify-function signature="operator==(Phonon::ObjectDescription)const">
<modify-argument index="1">
<replace-type modified-type="Phonon::AudioOutputDevice"/>
</modify-argument>
</modify-function>
<modify-function signature="operator!=(Phonon::ObjectDescription)const">
<modify-argument index="1">
<replace-type modified-type="Phonon::AudioOutputDevice"/>
</modify-argument>
</modify-function>
<modify-function signature="fromIndex(int)">
<modify-argument index="return">
<replace-type modified-type="AudioOutputDevice"/>
</modify-argument>
</modify-function>
</value-type>
<value-type name="AudioCaptureDevice">
<modify-function signature="operator==(Phonon::ObjectDescription)const">
<modify-argument index="1">
<replace-type modified-type="Phonon::AudioCaptureDevice"/>
</modify-argument>
</modify-function>
<modify-function signature="operator!=(Phonon::ObjectDescription)const">
<modify-argument index="1">
<replace-type modified-type="Phonon::AudioCaptureDevice"/>
</modify-argument>
</modify-function>
<modify-function signature="fromIndex(int)">
<modify-argument index="return">
<replace-type modified-type="AudioCaptureDevice"/>
</modify-argument>
</modify-function>
</value-type>
<value-type name="AudioChannelDescription">
<modify-function signature="operator==(Phonon::ObjectDescription)const">
<modify-argument index="1">
<replace-type modified-type="Phonon::AudioChannelDescription"/>
</modify-argument>
</modify-function>
<modify-function signature="operator!=(Phonon::ObjectDescription)const">
<modify-argument index="1">
<replace-type modified-type="Phonon::AudioChannelDescription"/>
</modify-argument>
</modify-function>
<modify-function signature="fromIndex(int)">
<modify-argument index="return">
<replace-type modified-type="AudioChannelDescription"/>
</modify-argument>
</modify-function>
</value-type>
<value-type name="SubtitleDescription">
<modify-function signature="operator==(Phonon::ObjectDescription)const">
<modify-argument index="1">
<replace-type modified-type="Phonon::SubtitleDescription"/>
</modify-argument>
</modify-function>
<modify-function signature="operator!=(Phonon::ObjectDescription)const">
<modify-argument index="1">
<replace-type modified-type="Phonon::SubtitleDescription"/>
</modify-argument>
</modify-function>
<modify-function signature="fromIndex(int)">
<modify-argument index="return">
<replace-type modified-type="SubtitleDescription"/>
</modify-argument>
</modify-function>
</value-type>
<object-type name="ObjectDescriptionModel" generate="no"/>
<object-type name="EffectDescriptionModel" />
<object-type name="AudioOutputDeviceModel" />
<object-type name="AbstractAudioOutput"/>
<object-type name="AbstractMediaStream"/>
<object-type name="AudioOutput"/>
<object-type name="Effect"/>
<object-type name="EffectWidget"/>
<object-type name="MediaController">
<enum-type name="Feature" flags="Features"/>
<enum-type name="NavigationMenu"/>
</object-type>
<object-type name="MediaObject" />
<object-type name="SeekSlider">
<modify-function signature="setMediaObject(Phonon::MediaObject*)">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
</object-type>
<object-type name="VideoPlayer"/>
<object-type name="VideoWidget">
<enum-type name="AspectRatio"/>
<enum-type name="ScaleMode"/>
</object-type>
<object-type name="VolumeFaderEffect">
<enum-type name="FadeCurve"/>
</object-type>
<object-type name="VolumeSlider">
<modify-function signature="setAudioOutput(Phonon::AudioOutput*)">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
</object-type>
<!-- ### The following entries may be present in the system or not. Keep this section organized. -->
<value-type name="VideoCaptureDevice">
<modify-function signature="operator==(Phonon::ObjectDescription)const">
<modify-argument index="1">
<replace-type modified-type="Phonon::VideoCaptureDevice" />
</modify-argument>
</modify-function>
<modify-function signature="operator!=(Phonon::ObjectDescription)const">
<modify-argument index="1">
<replace-type modified-type="Phonon::VideoCaptureDevice"/>
</modify-argument>
</modify-function>
<modify-function signature="fromIndex(int)">
<modify-argument index="return">
<replace-type modified-type="VideoCaptureDevice"/>
</modify-argument>
</modify-function>
</value-type>
<!-- ### -->
</namespace-type>
</typesystem>

147
PySide/pysideqtesttouch.h Normal file
View file

@ -0,0 +1,147 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtTest module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial Usage
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef PYSIDEQTESTTOUCH_H
#define PYSIDEQTESTTOUCH_H
#include <QtTest/qtest_global.h>
#include <QtTest/qtestassert.h>
#include <QtTest/qtestsystem.h>
#include <QtTest/qtestspontaneevent.h>
#include <QtTest/qtesttouch.h>
#include <QtCore/qmap.h>
#include <QtGui/qevent.h>
#include <QtGui/qwidget.h>
QT_BEGIN_NAMESPACE
namespace QTest
{
class PySideQTouchEventSequence
{
public:
~PySideQTouchEventSequence()
{
commit();
}
PySideQTouchEventSequence* press(int touchId, const QPoint &pt, QWidget *widget = 0)
{
QTouchEvent::TouchPoint &p = point(touchId);
p.setScreenPos(mapToScreen(widget, pt));
p.setState(Qt::TouchPointPressed);
return this;
}
PySideQTouchEventSequence* move(int touchId, const QPoint &pt, QWidget *widget = 0)
{
QTouchEvent::TouchPoint &p = point(touchId);
p.setScreenPos(mapToScreen(widget, pt));
p.setState(Qt::TouchPointMoved);
return this;
}
PySideQTouchEventSequence* release(int touchId, const QPoint &pt, QWidget *widget = 0)
{
QTouchEvent::TouchPoint &p = point(touchId);
p.setScreenPos(mapToScreen(widget, pt));
p.setState(Qt::TouchPointReleased);
return this;
}
PySideQTouchEventSequence* stationary(int touchId)
{
QTouchEvent::TouchPoint &p = point(touchId);
p.setState(Qt::TouchPointStationary);
return this;
}
void commit()
{
qt_translateRawTouchEvent(targetWidget, deviceType, points.values());
targetWidget = 0;
points.clear();
}
private:
PySideQTouchEventSequence(QWidget *widget, QTouchEvent::DeviceType aDeviceType)
: targetWidget(widget), deviceType(aDeviceType)
{
}
PySideQTouchEventSequence(const PySideQTouchEventSequence &v);
void operator=(const PySideQTouchEventSequence&);
QTouchEvent::TouchPoint &point(int touchId)
{
if (!points.contains(touchId))
points[touchId] = QTouchEvent::TouchPoint(touchId);
return points[touchId];
}
QPoint mapToScreen(QWidget *widget, const QPoint &pt)
{
if (widget)
return widget->mapToGlobal(pt);
return targetWidget ? targetWidget->mapToGlobal(pt) : pt;
}
QMap<int, QTouchEvent::TouchPoint> points;
QWidget *targetWidget;
QTouchEvent::DeviceType deviceType;
friend PySideQTouchEventSequence* generateTouchEvent(QWidget *, QTouchEvent::DeviceType);
};
inline
PySideQTouchEventSequence* generateTouchEvent(QWidget *widget = 0,
QTouchEvent::DeviceType deviceType = QTouchEvent::TouchScreen)
{
return new PySideQTouchEventSequence(widget, deviceType);
}
}
QT_END_NAMESPACE
#endif // PYSIDEQTESTTOUCH_H

27
PySide/pysidewtypes.h Normal file
View file

@ -0,0 +1,27 @@
#ifndef __PYSIDEWTYPES__
#define __PYSIDEWTYPES__
typedef struct HWND__ *HWND;
typedef unsigned UINT;
typedef long LONG;
typedef unsigned long DWORD;
typedef UINT WPARAM;
typedef LONG LPARAM;
struct POINT
{
LONG x;
LONG y;
};
struct MSG
{
HWND hwnd;
UINT message;
WPARAM wParam;
LPARAM lParam;
DWORD time;
POINT pt;
};
#endif

33
PySide/qpytextobject.cpp Normal file
View file

@ -0,0 +1,33 @@
/*
* This file is part of the PySide project.
*
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
*
* Contact: PySide team <contact@pyside.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "qpytextobject.h"
/*!
\class QPyTextObject
\brief Workaround to make possible use QTextObjectInterface on PySide.
\ingroup richtext-processing
Due to the technical details of how to bind C++ classes to Python, you need to use this class when you need to implement
your own QTextObjectInterface rather than create a class inheriting from QObject and QTextObjectInterface.
\sa QTextObjectInterface
*/

40
PySide/qpytextobject.h Normal file
View file

@ -0,0 +1,40 @@
/*
* This file is part of the PySide project.
*
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
*
* Contact: PySide team <contact@pyside.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef QPYTEXTOBJECT
#define QPYTEXTOBJECT
#include <QObject>
#include <QTextObjectInterface>
class QPyTextObject : public QObject, public QTextObjectInterface
{
Q_OBJECT
Q_INTERFACES(QTextObjectInterface)
public:
QPyTextObject(QObject* parent = 0) : QObject(parent) {}
void drawObject(QPainter* painter, const QRectF& rect, QTextDocument* doc, int posInDocument, const QTextFormat& format ) = 0;
QSizeF intrinsicSize(QTextDocument* doc, int posInDocument, const QTextFormat& format ) = 0;
};
#endif

View file

@ -1,50 +1,109 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!--
This file is part of PySide project.
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
Contact: PySide team <contact@pyside.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-->
<typesystem> <typesystem>
<template name="replace_child">
$CHILD_TYPE* oldChild = %CPPSELF.$FUNCTION_GET_OLD();
if (oldChild &amp;&amp; (oldChild != $CPPARG)) {
Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[$CHILD_TYPE*](oldChild));
Shiboken::Object::setParent(0, pyChild);
Shiboken::Object::releaseOwnership(pyChild);
}
Shiboken::Object::setParent(%PYSELF, $PYARG);
</template>
<!-- Templates to fix bool* parameters --> <!-- Templates to fix bool* parameters -->
<template name="tuple_retval_ok">
%PYARG_0 = PyTuple_New(2);
PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[%RETURN_TYPE](retval_));
PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[bool](ok_));
</template>
<template name="fix_bool*"> <template name="fix_bool*">
bool ok_; bool ok_;
%BEGIN_ALLOW_THREADS
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(&amp;ok_); %RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(&amp;ok_);
%PYARG_0 = Shiboken::makeTuple(retval_, ok_); %END_ALLOW_THREADS
<insert-template name="tuple_retval_ok"/>
</template> </template>
<template name="fix_args,bool*"> <template name="fix_args,bool*">
bool ok_; bool ok_;
%BEGIN_ALLOW_THREADS
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &amp;ok_); %RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &amp;ok_);
%PYARG_0 = Shiboken::makeTuple(retval_, ok_); %END_ALLOW_THREADS
<insert-template name="tuple_retval_ok"/>
</template> </template>
<template name="fix_arg,bool*,arg"> <template name="fix_arg,bool*,arg">
bool ok_; bool ok_;
%BEGIN_ALLOW_THREADS
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%1, &amp;ok_, %3); %RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%1, &amp;ok_, %3);
%PYARG_0 = Shiboken::makeTuple(retval_, ok_); %END_ALLOW_THREADS
<insert-template name="tuple_retval_ok"/>
</template> </template>
<template name="fix_bool*,arg"> <template name="fix_bool*,arg">
bool ok_; bool ok_;
%BEGIN_ALLOW_THREADS
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(&amp;ok_, %2); %RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(&amp;ok_, %2);
%PYARG_0 = Shiboken::makeTuple(retval_, ok_); %END_ALLOW_THREADS
<insert-template name="tuple_retval_ok"/>
</template> </template>
<template name="fix_bool*,arg,arg"> <template name="fix_bool*,arg,arg">
bool ok_; bool ok_;
%BEGIN_ALLOW_THREADS
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(&amp;ok_, %2, %3); %RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(&amp;ok_, %2, %3);
%PYARG_0 = Shiboken::makeTuple(retval_, ok_); %END_ALLOW_THREADS
<insert-template name="tuple_retval_ok"/>
</template> </template>
<template name="fix_bool*,arg,arg,arg"> <template name="fix_bool*,arg,arg,arg">
bool ok_; bool ok_;
%BEGIN_ALLOW_THREADS
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(&amp;ok_, %2, %3, %4); %RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(&amp;ok_, %2, %3, %4);
%PYARG_0 = Shiboken::makeTuple(retval_, ok_); %END_ALLOW_THREADS
<insert-template name="tuple_retval_ok"/>
</template>
<template name="fix_bool*,arg,arg,arg,arg">
bool ok_;
%BEGIN_ALLOW_THREADS
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(&amp;ok_, %2, %3, %4, %5);
%END_ALLOW_THREADS
<insert-template name="tuple_retval_ok"/>
</template> </template>
<template name="fix_arg,arg,arg,arg,arg,arg,arg,bool*,arg"> <template name="fix_arg,arg,arg,arg,arg,arg,arg,bool*,arg">
bool ok_; bool ok_;
%BEGIN_ALLOW_THREADS
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%1, %2, %3, %4, %5, %6, %7, &amp;ok_, %9); %RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%1, %2, %3, %4, %5, %6, %7, &amp;ok_, %9);
%PYARG_0 = Shiboken::makeTuple(retval_, ok_); %END_ALLOW_THREADS
<insert-template name="tuple_retval_ok"/>
</template> </template>
<template name="fix_arg,arg,arg,arg,arg,arg,bool*,arg"> <template name="fix_arg,arg,arg,arg,arg,arg,bool*,arg">
bool ok_; bool ok_;
%BEGIN_ALLOW_THREADS
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%1, %2, %3, %4, %5, %6, &amp;ok_, %8); %RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%1, %2, %3, %4, %5, %6, &amp;ok_, %8);
%PYARG_0 = Shiboken::makeTuple(retval_, ok_); %END_ALLOW_THREADS
<insert-template name="tuple_retval_ok"/>
</template> </template>
<template name="fix_arg,arg,arg,arg,arg,bool*,arg"> <template name="fix_arg,arg,arg,arg,arg,bool*,arg">
bool ok_; bool ok_;
%BEGIN_ALLOW_THREADS
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%1, %2, %3, %4, %5, &amp;ok_, %7); %RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%1, %2, %3, %4, %5, &amp;ok_, %7);
%PYARG_0 = Shiboken::makeTuple(retval_, ok_); %END_ALLOW_THREADS
<insert-template name="tuple_retval_ok"/>
</template> </template>
<template name="get_slice"> <template name="get_slice">
%TYPE* sequence; %TYPE* sequence;
@ -74,64 +133,296 @@
<template name="fix_args,QRectF*"> <template name="fix_args,QRectF*">
QRectF rect_; QRectF rect_;
%BEGIN_ALLOW_THREADS
%CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &amp;rect_); %CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &amp;rect_);
%END_ALLOW_THREADS
%PYARG_0 = %CONVERTTOPYTHON[QRectF](rect_); %PYARG_0 = %CONVERTTOPYTHON[QRectF](rect_);
</template> </template>
<template name="fix_args,QRect*"> <template name="fix_args,QRect*">
QRect rect_; QRect rect_;
%BEGIN_ALLOW_THREADS
%CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &amp;rect_); %CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &amp;rect_);
%END_ALLOW_THREADS
%PYARG_0 = %CONVERTTOPYTHON[QRect](rect_); %PYARG_0 = %CONVERTTOPYTHON[QRect](rect_);
</template> </template>
<template name="fix_char*"> <template name="fix_char*">
char val_; char val_;
%BEGIN_ALLOW_THREADS
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(&amp;val_); %RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(&amp;val_);
%PYARG_0 = Shiboken::makeTuple(retval_, val_); %END_ALLOW_THREADS
%PYARG_0 = PyTuple_New(2);
PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[%RETURN_TYPE](retval_));
PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[char](val_));
</template> </template>
<template name="fix_int*,int*,int*,int*"> <template name="tuple_abcd_same_type">
int a, b, c, d; %PYARG_0 = PyTuple_New(4);
%CPPSELF.%FUNCTION_NAME(&amp;a, &amp;b, &amp;c, &amp;d); PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[$TYPE](a));
%PYARG_0 = Shiboken::makeTuple(a, b, c, d); PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[$TYPE](b));
PyTuple_SET_ITEM(%PYARG_0, 2, %CONVERTTOPYTHON[$TYPE](c));
PyTuple_SET_ITEM(%PYARG_0, 3, %CONVERTTOPYTHON[$TYPE](d));
</template> </template>
<template name="fix_qreal*,qreal*,qreal*,qreal*"> <template name="fix_number*,number*,number*,number*">
qreal a, b, c, d; $TYPE a, b, c, d;
%CPPSELF.%FUNCTION_NAME(&amp;a, &amp;b, &amp;c, &amp;d); %BEGIN_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(a, b, c, d); %CPPSELF->::%TYPE::%FUNCTION_NAME(&amp;a, &amp;b, &amp;c, &amp;d);
%END_ALLOW_THREADS
<insert-template name="tuple_abcd_same_type"/>
</template>
<template name="fix_number*,number*,number*,number*,args">
$TYPE a, b, c, d;
%BEGIN_ALLOW_THREADS
%CPPSELF->::%TYPE::%FUNCTION_NAME(&amp;a, &amp;b, &amp;c, &amp;d, %ARGUMENT_NAMES);
%END_ALLOW_THREADS
<insert-template name="tuple_abcd_same_type"/>
</template> </template>
<template name="fix_int*,int*,int*,int*,int*"> <template name="fix_native_return_number*,number*,number*,number*">
int a, b, c, d, e; PyObject* _obj = %PYARG_0.object();
%CPPSELF.%FUNCTION_NAME(&amp;a, &amp;b, &amp;c, &amp;d, &amp;e); if (!PySequence_Check(_obj)
%PYARG_0 = Shiboken::makeTuple(a, b, c, d, e); || PySequence_Fast_GET_SIZE(_obj) != 4
|| !SbkNumber_Check(PySequence_Fast_GET_ITEM(_obj, 0))
|| !SbkNumber_Check(PySequence_Fast_GET_ITEM(_obj, 1))
|| !SbkNumber_Check(PySequence_Fast_GET_ITEM(_obj, 2))
|| !SbkNumber_Check(PySequence_Fast_GET_ITEM(_obj, 3))) {
PyErr_SetString(PyExc_TypeError, "Sequence of 4 numbers expected");
} else {
*%1 = %CONVERTTOCPP[$TYPE](PySequence_Fast_GET_ITEM(_obj, 0));
*%2 = %CONVERTTOCPP[$TYPE](PySequence_Fast_GET_ITEM(_obj, 1));
*%3 = %CONVERTTOCPP[$TYPE](PySequence_Fast_GET_ITEM(_obj, 2));
*%4 = %CONVERTTOCPP[$TYPE](PySequence_Fast_GET_ITEM(_obj, 3));
}
</template> </template>
<template name="fix_qreal*,qreal*,qreal*,qreal*,qreal*">
qreal a, b, c, d, e; <template name="fix_number*,number*,number*,number*,number*">
$TYPE a, b, c, d, e;
%BEGIN_ALLOW_THREADS
%CPPSELF.%FUNCTION_NAME(&amp;a, &amp;b, &amp;c, &amp;d, &amp;e); %CPPSELF.%FUNCTION_NAME(&amp;a, &amp;b, &amp;c, &amp;d, &amp;e);
%PYARG_0 = Shiboken::makeTuple(a, b, c, d, e); %END_ALLOW_THREADS
%PYARG_0 = PyTuple_New(5);
PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[$TYPE](a));
PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[$TYPE](b));
PyTuple_SET_ITEM(%PYARG_0, 2, %CONVERTTOPYTHON[$TYPE](c));
PyTuple_SET_ITEM(%PYARG_0, 3, %CONVERTTOPYTHON[$TYPE](d));
PyTuple_SET_ITEM(%PYARG_0, 4, %CONVERTTOPYTHON[$TYPE](e));
</template> </template>
<template name="read_wrapper"> <template name="read_wrapper">
char _data[%2]; Shiboken::AutoArrayPointer&lt;char&gt; _data(%2);
qint64 _size = %CPPSELF.%FUNCTION_NAME(_data, %2); qint64 _size = %CPPSELF.%FUNCTION_NAME(_data, %2);
QByteArray ba;
if (_size > 0) if (_size > 0)
%PYARG_0 = %CONVERTTOPYTHON[QByteArray](QByteArray(_data, _size)); ba = QByteArray(_data, _size);
else %PYARG_0 = %CONVERTTOPYTHON[QByteArray](ba);
%PYARG_0 = %CONVERTTOPYTHON[QByteArray](QByteArray());
</template> </template>
<template name="fix_return_args,int*">
RETURNTYPE _ret; <template name="fix_args,number*,number*">
int _arg; $TYPE a, b;
_ret = %CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &amp;_arg); %BEGIN_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(_ret, _arg); %CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &amp;a, &amp;b);
%END_ALLOW_THREADS
%PYARG_0 = PyTuple_New(2);
PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[$TYPE](a));
PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[$TYPE](b));
</template> </template>
<template name="fix_virtual_method_return_value_and_bool*"> <template name="fix_virtual_method_return_value_and_bool*">
AutoDecRef _py_ret_(PySequence_GetItem(%PYARG_0, 0)); Shiboken::AutoDecRef _py_ret_(PySequence_GetItem(%PYARG_0, 0));
AutoDecRef _py_ok_(PySequence_GetItem(%PYARG_0, 1)); Shiboken::AutoDecRef _py_ok_(PySequence_GetItem(%PYARG_0, 1));
%RETURN_TYPE %out = %CONVERTTOCPP[%RETURN_TYPE](_py_ret_); %RETURN_TYPE %out = %CONVERTTOCPP[%RETURN_TYPE](_py_ret_);
*%2 = %CONVERTTOCPP[bool](_py_ok_); *%2 = %CONVERTTOCPP[bool](_py_ok_);
</template> </template>
</typesystem> <template name="fix_arg,int*,int*">
%RETURN_TYPE _ret;
int a, b;
%BEGIN_ALLOW_THREADS
_ret = %CPPSELF.%FUNCTION_NAME(%1, &amp;a, &amp;b);
%END_ALLOW_THREADS
%PYARG_0 = PyTuple_New(3);
PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[%RETURN_TYPE](_ret));
PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[int](a));
PyTuple_SET_ITEM(%PYARG_0, 2, %CONVERTTOPYTHON[int](b));
</template>
<template name="return_QString">
%PYARG_0 = %CONVERTTOPYTHON[QString](%1);
</template>
<template name="return_tuple_QValidator_QString_int">
%BEGIN_ALLOW_THREADS
%RETURN_TYPE retval_ = %RETURN_TYPE(%CPPSELF.%FUNCTION_NAME(%1, %2));
%END_ALLOW_THREADS
%PYARG_0 = PyTuple_New(3);
PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[%RETURN_TYPE](retval_));
PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[%ARG1_TYPE](%1));
PyTuple_SET_ITEM(%PYARG_0, 2, %CONVERTTOPYTHON[%ARG2_TYPE](%2));
</template>
<template name="return_for_QFileDialog">
%BEGIN_ALLOW_THREADS
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%1, %2, %3, %4, &amp;%5, %6);
%END_ALLOW_THREADS
%PYARG_0 = PyTuple_New(2);
PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[%RETURN_TYPE](retval_));
PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[%ARG5_TYPE](%5));
</template>
<template name="set_qapp_parent_for_orphan">
if (%PYARG_0 &amp;&amp; (%PYARG_0 != Py_None)) {
SbkObject* _pySelf = reinterpret_cast&lt;SbkObject*&gt;(%PYARG_0);
if (!Shiboken::Object::hasParentInfo(_pySelf))
Shiboken::Object::setParent(%CONVERTTOPYTHON[QApplication*](qApp), %PYARG_0);
}
</template>
<!-- templates for __repr__ -->
<template name="repr_code">
QString format = QString().sprintf("%s(%REPR_FORMAT)", ((PyObject*)%PYSELF)->ob_type->tp_name, %REPR_ARGS);
%PYARG_0 = Shiboken::String::fromCString(qPrintable(format));
</template>
<template name="repr_code_matrix">
QString format= QString("%1((").arg(((PyObject*)%PYSELF)->ob_type->tp_name);
QList&lt; %MATRIX_TYPE &gt; cppArgs;
%MATRIX_TYPE data[%MATRIX_SIZE];
%CPPSELF.copyDataTo(data);
int matrixSize = %MATRIX_SIZE;
for(int size=0; size &lt; matrixSize; size++) {
if (size > 0)
format += ", ";
format += QString::number(data[size]);
}
format += "))";
%PYARG_0 = Shiboken::String::fromCString(qPrintable(format));
</template>
<template name="return_internal_pointer">
%PYARG_0 = reinterpret_cast&lt;PyObject*>(%CPPSELF.%FUNCTION_NAME());
if (!%PYARG_0)
%PYARG_0 = Py_None;
Py_INCREF(%PYARG_0);
</template>
<!-- templates for __reduce__ -->
<template name="reduce_code">
%PYARG_0 = Py_BuildValue("(N(%REDUCE_FORMAT))", PyObject_Type(%PYSELF), %REDUCE_ARGS);
</template>
<template name="reduce_code_matrix">
QList&lt; %MATRIX_TYPE &gt; cppArgs;
%MATRIX_TYPE data[%MATRIX_SIZE];
%CPPSELF.copyDataTo(data);
int matrixSize = %MATRIX_SIZE;
for(int size=0; size &lt; matrixSize; size++)
cppArgs.append(data[size]);
PyObject *type = PyObject_Type(%PYSELF);
PyObject *args = Py_BuildValue("(N)", %CONVERTTOPYTHON[QList&lt;%MATRIX_TYPE&gt; ](cppArgs));
%PYARG_0 = Py_BuildValue("(NN)", type, args);
</template>
<!-- Matrix Aux functions -->
<template name="matrix_constructor">
if (PySequence_Size(%PYARG_1) == %SIZE) {
Shiboken::AutoDecRef fast(PySequence_Fast(%PYARG_1, "Failed to parse sequence on %TYPE constructor."));
qreal values[%SIZE];
for(int i=0; i &lt; %SIZE; i++) {
PyObject *pv = PySequence_Fast_GET_ITEM(fast.object(), i);
values[i] = %CONVERTTOCPP[qreal](pv);
}
%0 = new %TYPE(values);
}
</template>
<template name="matrix_data_function">
const qreal* data = %CPPSELF.constData();
PyObject *pyData = PyTuple_New(%MATRIX_SIZE);
if (data) {
for(int i=0; i &lt; %MATRIX_SIZE; i++)
PyTuple_SET_ITEM(pyData, i, %CONVERTTOPYTHON[qreal](data[i]));
}
return pyData;
</template>
<template name="matrix_fill_function">
qreal value = %CONVERTTOCPP[qreal](%PYARG_1);
%CPPSELF.fill(value);
</template>
<template name="matrix_transposed_function">
%TRANSPOSED_TYPE transp = %CPPSELF.transposed();
return %CONVERTTOPYTHON[%TRANSPOSED_TYPE](transp);
</template>
<!-- Replace '#' for the argument number you want. -->
<template name="return_argument">
Py_INCREF(%PYARG_#);
%PYARG_0 = %PYARG_#;
</template>
<!-- Iterator -->
<template name="__iter__">
Py_INCREF(%PYSELF);
%PYARG_0 = %PYSELF;
</template>
<template name="__iter_parent__">
%CPPSELF_TYPE _tmp = %CPPSELF.begin();
%PYARG_0 = %CONVERTTOPYTHON[%CPPSELF_TYPE](_tmp);
</template>
<template name="__next__">
if (!%CPPSELF.atEnd()) {
%PYARG_0 = %CONVERTTOPYTHON[%CPPSELF_TYPE](*%CPPSELF);
++(*%CPPSELF);
}
</template>
<template name="convertFromMultiMap">
%RETURN_NAME = PyDict_New();
foreach(%KEY_TYPE _key, %MAP_NAME.keys()) {
Shiboken::AutoDecRef _pyValueList(PyList_New(0));
foreach(%VALUE_TYPE _value, %MAP_NAME.values(_key)) {
Shiboken::AutoDecRef _pyValue(%CONVERTTOPYTHON[%VALUE_TYPE](_value));
PyList_Append(_pyValueList, _pyValue);
}
Shiboken::AutoDecRef _pyKey(%CONVERTTOPYTHON[%KEY_TYPE](_key));
PyDict_SetItem(%RETURN_NAME, _pyKey, _pyValueList);
}
</template>
<template name="to_tuple">
%PYARG_0 = Py_BuildValue("%TT_FORMAT", %TT_ARGS);
</template>
<template name="cpplist_to_pylist_convertion">
PyObject* %out = PyList_New((int) %in.size());
%INTYPE::const_iterator it = %in.begin();
for (int idx = 0; it != %in.end(); ++it, ++idx) {
%INTYPE_0 cppItem(*it);
PyList_SET_ITEM(%out, idx, %CONVERTTOPYTHON[%INTYPE_0](cppItem));
}
return %out;
</template>
<template name="pyseq_to_cpplist_convertion">
for (int i = 0; i &lt; PySequence_Size(%in); i++) {
Shiboken::AutoDecRef pyItem(PySequence_GetItem(%in, i));
%OUTTYPE_0 cppItem = %CONVERTTOCPP[%OUTTYPE_0](pyItem);
%out &lt;&lt; cppItem;
}
</template>
<template name="checkPyCapsuleOrPyCObject_func">
static bool checkPyCapsuleOrPyCObject(PyObject* pyObj)
{
#ifdef IS_PY3K
return PyCapsule_CheckExact(pyObj);
#else
return PyCObject_Check(pyObj);
#endif
}
</template>
</typesystem>

View file

@ -0,0 +1,54 @@
#
# Try to find QtMultimedia
# TODO: Remove this hack when cmake support QtMultimedia module
if (NOT QT_QTMULTIMEDIA_FOUND AND ${QTVERSION} VERSION_GREATER 4.5.9)
find_path(QT_QTMULTIMEDIA_INCLUDE_DIR QtMultimedia
PATHS ${QT_HEADERS_DIR}/QtMultimedia
${QT_LIBRARY_DIR}/QtMultimedia.framework/Headers
NO_DEFAULT_PATH)
find_library(QT_QTMULTIMEDIA_LIBRARY QtMultimedia PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
if (QT_QTMULTIMEDIA_INCLUDE_DIR AND QT_QTMULTIMEDIA_LIBRARY)
set(QT_QTMULTIMEDIA_FOUND ON)
else()
#Replace this on documentation
set(if_QtMultimedia "<!--")
set(end_QtMultimedia "-->")
endif()
endif ()
# Try to find QtMaemo5 - it has to be done before QtGui to enable some QtMaemo5 flags
# TODO: Remove this hack when cmake support QtMaemo5 module
if (NOT QT_QTMAEMO5_FOUND AND ${QTVERSION} VERSION_GREATER 4.5.9)
find_path(QT_QTMAEMO5_INCLUDE_DIR QtMaemo5
PATHS ${QT_HEADERS_DIR}/QtMaemo5
${QT_LIBRARY_DIR}/QtMaemo5.framework/Headers
NO_DEFAULT_PATH)
find_library(QT_QTMAEMO5_LIBRARY QtMaemo5 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
if (QT_QTMAEMO5_INCLUDE_DIR AND QT_QTMAEMO5_LIBRARY)
set(QT_QTMAEMO5_FOUND ON)
set(Q_WS_MAEMO_5 ON)
else()
#Replace this on documentation
set(if_Maemo5 "<!--")
set(end_Maemo5 "-->")
endif()
endif ()
# Try to find QtDeclarative
# TODO: Remove this hack when cmake support QtDeclarative module
if (NOT QT_QTDECLARATIVE_FOUND AND ${QTVERSION} VERSION_GREATER 4.6.0)
find_path(QT_QTDECLARATIVE_INCLUDE_DIR QtDeclarative
PATHS ${QT_HEADERS_DIR}/QtDeclarative
${QT_LIBRARY_DIR}/QtDeclarative.framework/Headers
NO_DEFAULT_PATH)
find_library(QT_QTDECLARATIVE_LIBRARY QtDeclarative PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
if (QT_QTDECLARATIVE_INCLUDE_DIR AND QT_QTDECLARATIVE_LIBRARY)
set(QT_QTDECLARATIVE_FOUND ON)
else()
#Replace this on documentation
set(if_QtDeclarative "<!--")
set(end_QtDeclarative "-->")
endif()
endif ()

View file

@ -0,0 +1,127 @@
macro(create_pyside_module module_name module_include_dir module_libraries module_deps module_typesystem_path module_sources module_static_sources)
string(TOLOWER ${module_name} _module)
string(REGEX REPLACE ^qt "" _module ${_module})
if(${ARGC} GREATER 7)
set (typesystem_name ${ARGV7})
else()
set (typesystem_name "")
endif()
if(${ARGC} GREATER 8)
string(REPLACE ";" "\\;" dropped_entries "${${ARGV8}}")
else()
set (dropped_entries "")
endif()
if (NOT EXISTS ${typesystem_name})
set(typesystem_path ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_${_module}.xml)
else()
set(typesystem_path ${typesystem_name})
endif()
add_custom_command(OUTPUT ${${module_sources}}
COMMAND ${SHIBOKEN_BINARY} ${GENERATOR_EXTRA_FLAGS}
${pyside_BINARY_DIR}/pyside_global.h
--include-paths=${pyside_SOURCE_DIR}${PATH_SEP}${QT_INCLUDE_DIR}
--typesystem-paths=${pyside_SOURCE_DIR}${PATH_SEP}${${module_typesystem_path}}
--output-directory=${CMAKE_CURRENT_BINARY_DIR}
--license-file=${CMAKE_CURRENT_SOURCE_DIR}/../licensecomment.txt
${typesystem_path}
--api-version=${SUPPORTED_QT_VERSION}
--drop-type-entries="${dropped_entries}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Running generator for ${module_name}...")
include_directories(${module_name} ${${module_include_dir}} ${pyside_SOURCE_DIR})
add_library(${module_name} MODULE ${${module_sources}} ${${module_static_sources}})
set_target_properties(${module_name} PROPERTIES PREFIX "" LIBRARY_OUTPUT_DIRECTORY ${pyside_BINARY_DIR})
if(WIN32)
set_target_properties(${module_name} PROPERTIES SUFFIX ".pyd")
set(${module_name}_suffix ".pyd")
else()
set(${module_name}_suffix ${CMAKE_SHARED_MODULE_SUFFIX})
endif()
target_link_libraries(${module_name} ${${module_libraries}})
if(${module_deps})
add_dependencies(${module_name} ${${module_deps}})
endif()
# install
install(TARGETS ${module_name} LIBRARY DESTINATION ${SITE_PACKAGE}/PySide)
string(TOLOWER ${module_name} lower_module_name)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide/${module_name}/pyside_${lower_module_name}_python.h
DESTINATION include/PySide${pyside_SUFFIX}/${module_name}/)
file(GLOB typesystem_files ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_*.xml ${typesystem_path})
install(FILES ${typesystem_files} DESTINATION share/PySide${pyside_SUFFIX}/typesystems)
endmacro()
#macro(check_qt_class_with_namespace module namespace class optional_source_files dropped_entries [namespace] [module])
macro(check_qt_class module class optional_source_files dropped_entries)
if (${ARGC} GREATER 4)
set (namespace ${ARGV4})
string(TOLOWER ${namespace} _namespace)
else ()
set (namespace "")
endif ()
if (${ARGC} GREATER 5)
set (include_file ${ARGV5})
else ()
set (include_file ${class})
endif ()
string(TOLOWER ${class} _class)
string(TOUPPER ${module} _module)
if (_namespace)
set(_cppfile ${CMAKE_CURRENT_BINARY_DIR}/PySide/${module}/${_namespace}_${_class}_wrapper.cpp)
else ()
set(_cppfile ${CMAKE_CURRENT_BINARY_DIR}/PySide/${module}/${_class}_wrapper.cpp)
endif ()
if (DEFINED PYSIDE_${class})
if (PYSIDE_${class})
list(APPEND ${optional_source_files} ${_cppfile})
else()
list(APPEND ${dropped_entries} PySide.${module}.${class})
endif()
else()
if (NOT ${namespace} STREQUAL "" )
set (NAMESPACE_USE "using namespace ${namespace};")
else ()
set (NAMESPACE_USE "")
endif ()
set(SRC_FILE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/test${class}.cxx)
file(WRITE ${SRC_FILE}
"#include <${include_file}>\n"
"${NAMESPACE_USE}\n"
"int main() { sizeof(${class}); }\n"
)
try_compile(Q_WORKS ${CMAKE_BINARY_DIR}
${SRC_FILE}
CMAKE_FLAGS
"-DLINK_LIBRARIES=${QT_${_module}_LIBRARY}"
"-DLINK_DIRECTORIES=${QT_LIBRARY_DIR}"
"-DINCLUDE_DIRECTORIES=${QT_INCLUDE_DIR};${QT_${_module}_INCLUDE_DIR}"
OUTPUT_VARIABLE OUTPUT)
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCheckQtClassTest.log ${OUTPUT})
set("PYSIDE_${class}" ${Q_WORKS} CACHE STRING "Has ${class} class been found?")
if(Q_WORKS)
message(STATUS "Checking for ${class} in ${module} -- found")
list(APPEND ${optional_source_files} ${_cppfile})
else()
message(STATUS "Checking for ${class} in ${module} -- not found")
list(APPEND ${dropped_entries} PySide.${module}.${class})
endif()
endif()
endmacro()
# Only add subdirectory if the associated Qt module is found.
macro(HAS_QT_MODULE var name)
if (NOT DISABLE_${name} AND ${var})
add_subdirectory(${name})
else()
# Used on documentation to skip modules
set("if_${name}" "<!--" PARENT_SCOPE)
set("end_${name}" "-->" PARENT_SCOPE)
endif()
endmacro()

60
doc/CMakeLists.txt Normal file
View file

@ -0,0 +1,60 @@
project(doc)
set(DOC_DATA_DIR "${CMAKE_CURRENT_BINARY_DIR}/qdoc3-output")
configure_file("pyside.qdocconf.in" "pyside.qdocconf" @ONLY)
add_custom_target(qdoc3
COMMAND qdoc3 pyside.qdocconf
COMMENT "Running qdoc3 against Qt source code..."
SOURCE "pyside.qdocconf")
find_program(SPHINX_BUILD NAMES sphinx-build)
if (${SPHINX_BUILD} MATCHES "SPHINX_BUILD-NOTFOUND")
message(FATAL_ERROR "sphinx-build command not found.")
endif()
add_custom_target(apidoc
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/rst
COMMAND ${SHIBOKEN_PYTHON_INTERPRETER} ${SPHINX_BUILD} -b html ${CMAKE_CURRENT_BINARY_DIR}/rst html
)
# create conf.py based on conf.py.in
configure_file("conf.py.in" "rst/conf.py" @ONLY)
configure_file(typesystem_doc.xml.in typesystem_doc.xml @ONLY)
add_custom_target("docrsts"
COMMAND ${SHIBOKEN_BINARY} --generator-set=qtdoc
${pyside_BINARY_DIR}/pyside_global.h
--include-paths="${QT_INCLUDE_DIR}${PATH_SEP}${pyside_SOURCE_DIR}"
--api-version=${SUPPORTED_QT_VERSION}
--typesystem-paths="${pyside_SOURCE_DIR}${PATH_SEP}${QtCore_SOURCE_DIR}${PATH_SEP}${QtDeclarative_SOURCE_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}${PATH_SEP}${QtHelp_SOURCE_DIR}${PATH_SEP}${QtMaemo5_SOURCE_DIR}${PATH_SEP}${QtMultimedia_SOURCE_DIR}${PATH_SEP}${QtNetwork_SOURCE_DIR}${PATH_SEP}${QtOpenGL_SOURCE_DIR}${PATH_SEP}${QtScript_SOURCE_DIR}${PATH_SEP}${QtScriptTools_SOURCE_DIR}${PATH_SEP}${QtSql_SOURCE_DIR}${PATH_SEP}${QtSvg_SOURCE_DIR}${PATH_SEP}${QtTest_SOURCE_DIR}${PATH_SEP}${QtUiTools_SOURCE_DIR}${PATH_SEP}${QtWebKit_SOURCE_DIR}${PATH_SEP}${QtXml_SOURCE_DIR}${PATH_SEP}${QtXmlPatterns_SOURCE_DIR}${PATH_SEP}${phonon_SOURCE_DIR}"
--library-source-dir=${QT_SRC_DIR}
--documentation-only
--documentation-data-dir=${DOC_DATA_DIR}
--output-directory=${CMAKE_CURRENT_BINARY_DIR}/rst
--documentation-code-snippets-dir=${CMAKE_CURRENT_SOURCE_DIR}/codesnippets${PATH_SEP}${CMAKE_CURRENT_SOURCE_DIR}/codesnippets/examples
--documentation-extra-sections-dir=${CMAKE_CURRENT_SOURCE_DIR}/extras
${CMAKE_CURRENT_BINARY_DIR}/typesystem_doc.xml
WORKING_DIRECTORY ${${module}_SOURCE_DIR}
COMMENT "Running generator to generate documentation..."
)
add_dependencies(apidoc docrsts)
add_dependencies(docrsts qdoc3)
# #create devhelp file
# add_custom_target(apidevhelp
# COMMAND python;${CMAKE_CURRENT_SOURCE_DIR}/pyhtml2devhelp.py;${CMAKE_BINARY_DIR}/apidoc/html;index.html >
# ${CMAKE_BINARY_DIR}/apidoc/html/PySide.devhelp;${BINDING_API_VERSION}&&;
# gzip;-9v;-f;${CMAKE_BINARY_DIR}/apidoc/html/PySide.devhelp
# COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_INSTALL_PREFIX}/share/devhelp/books"
# COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_INSTALL_PREFIX}/share/doc/${BINDING_NAME}/html" "${CMAKE_INSTALL_PREFIX}/share/devhelp/books/${BINDING_NAME}"
# )
#install files
add_custom_target(apidocinstall
COMMAND mkdir -p ${CMAKE_INSTALL_PREFIX}/share/doc/PySide-${BINDING_API_VERSION} && cp -rv ${CMAKE_CURRENT_BINARY_DIR}/html/* ${CMAKE_INSTALL_PREFIX}/share/doc/PySide-${BINDING_API_VERSION}
)
add_dependencies(apidocinstall apidoc)
# add_dependencies(apidocinstall apidevhelp)

75
doc/_templates/index.html vendored Normal file
View file

@ -0,0 +1,75 @@
{% extends "layout.html" %}
{% set title = 'Overview' %}
{% block body %}
<div class="section">
<h1>PySide {{ version }} Reference</h1>
<p><a href="http://www.qtsoftware.com/">Qt</a> is a cross-platform application framework from Qt Software (owned by Nokia).
It features a large number of libraries providing services like network abstraction and XML handling, along with a very rich
GUI package, allowing C++ developers to write their applications once and run them unmodified in different systems.
PySide aims to provide Python developers access to the Qt libraries in the most natural way.</p>
<p>PySide is built using the <a href="http://www.pyside.org/docs/shiboken">Shiboken</a> binding generator.</p>
<h2>Notes</h2>
<h3>About 0 vs None</h3>
<p>The PySide class reference documentation is automatically generated from the original Qt documentation for C++, some parts were tuned to fit the Python world. However, it's not possible to rewrite all Qt docs as it would require a really huge effort, so if the documentation says you can use 0 on an QObject argument, interpret it as None.</p>
<h3>About keyword arguments</h3>
<p>Only optional arguments can be used as keyword arguments.</p>
<h2>Modules</h2>
<table class="contentstable" align="center" ><tr>
<td width="50%">
<p class="biglink"><a class="biglink" href="{{ pathto("PySide/QtCore/index") }}">QtCore</a><br/>
<span class="linkdescr">core non-GUI functionality</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("PySide/QtGui/index") }}">QtGui</a><br/>
<span class="linkdescr">extends QtCore with GUI functionality.</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("PySide/QtDeclarative/index") }}">QtDeclarative</a><br/>
<span class="linkdescr">a declarative framework for building highly dynamic, custom user interfaces.</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("PySide/QtHelp/index") }}">QtHelp</a><br/>
<span class="linkdescr">provides classes for integrating online documentation in applications</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("PySide/QtMultimedia/index") }}">QtMultimedia</a><br/>
<span class="linkdescr">provides low-level multimedia functionality</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("PySide/QtNetwork/index") }}">QtNetwork</a><br/>
<span class="linkdescr">offers classes that allow you to write TCP/IP clients and servers</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("PySide/QtOpenGL/index") }}">QtOpenGL</a><br/>
<span class="linkdescr">offers classes that make it easy to use OpenGL in Qt applications</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("PySide/QtScript/index") }}">QtScript</a><br/>
<span class="linkdescr">provides classes for making Qt applications scriptable</span></p>
</td>
<td width="50%">
<p class="biglink"><a class="biglink" href="{{ pathto("PySide/QtScriptTools/index") }}">QtScriptTools</a><br/>
<span class="linkdescr">provides additional components for applications that use Qt Script</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("PySide/QtSql/index") }}">QtSql</a><br/>
<span class="linkdescr">helps you provide seamless database integration to your Qt applications</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("PySide/QtSvg/index") }}">QtSvg</a><br/>
<span class="linkdescr">provides classes for displaying the contents of SVG files</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("PySide/QtUiTools/index") }}">QtUiTools</a><br/>
<span class="linkdescr">provides classes to handle forms created with Qt Designer</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("PySide/QtXml/index") }}">QtXml</a><br/>
<span class="linkdescr">provides a stream reader and writer for XML documents</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("PySide/QtWebKit/index") }}">QtWebkit</a><br/>
<span class="linkdescr">provides a Web browser engine</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("PySide/phonon/index") }}">Phonon</a><br/>
<span class="linkdescr">cross-platform multimedia framework that enables the use of audio and video
content in Qt applications</span></p>
</td></tr>
</table>
<h2>Tutorials and examples</h2>
<p>A collection of <a href="{{ pathto("tutorials/index") }}">tutorials</a> and "walkthrough" guides are provided with PySide to help new users get started with PySide development. These documents were ported from C++ to Python and cover a range of topics, from basic use of widgets to step-by-step <a href="{{ pathto("tutorials/index") }}">tutorials</a> that show how an application is put together.</p>
<h2>Other stuff</h2>
<ul>
<li class="toctree-l1"><a class="reference internal" href="pysideapi2.html">PySide API 2</a></li>
<li class="toctree-l1"><a class="reference internal" href="pysideversion.html">Getting PySide and Qt version</a></li>
</ul>
</div>
{% endblock %}

Some files were not shown because too many files have changed in this diff Show more