Compare commits

...

438 commits

Author SHA1 Message Date
Renato Filho
3f3f52a960 Bumped version to 1.0.4. 2011-06-22 11:24:31 -03:00
Renato Filho
7220804be6 Created test for QObject.inherits.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-06-20 17:21:12 -03:00
Renato Filho
7f611d1c53 Removed glue code for QObject.inherits function.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-06-20 17:20:50 -03:00
Renato Filho
aa9e8ca7ef Fixed QWidget.parentWidget return policy.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-06-17 11:24:28 -03:00
Renato Filho
db40ec67b1 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>
2011-06-17 11:16:43 -03:00
Marcelo Lira
2b1df1698c 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>
2011-06-15 17:35:17 -03:00
Hugo Parente Lima
07229012b7 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>
2011-06-15 14:45:25 -03:00
Hugo Parente Lima
933669eeb7 Fix bug 822 - "Can't use QApplication without X"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2011-06-13 17:25:08 -03:00
Marcelo Lira
1be25c54bb 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>
2011-06-10 18:32:05 -03:00
Marcelo Lira
ee602e80f1 Fixed default return value for "QStyleOptionViewItem QAbstractItemView::viewOptions() const".
Wrong code would be generated if compiling avoiding the "protected hack".
2011-06-09 15:22:34 -03:00
Hugo Parente Lima
82f4f13d27 Fix bug 877 - "Fatal Python error on application quit."
Reviewer: Renato Araújo <renato.filho@openbossa.org>
2011-06-08 20:04:16 -03:00
Hugo Parente Lima
35b252ab2b Fix bug 870 - "QStylePainter.drawControl doesn't draw anything"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2011-06-08 18:17:59 -03:00
Renato Filho
ba2510c52a Implemented support to MSG type on windows. 2011-06-08 16:20:53 -03:00
Renato Filho
45bf56e831 Removed unnecessary functions from QByteArray.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-06-08 15:20:36 -03:00
Hugo Parente Lima
a698807fd0 Fix bug 869 - "QDateTimeEdit initial time problem"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2011-06-08 15:05:15 -03:00
Hugo Parente Lima
e48aa92103 Fix bug 424 - "QDockWidget.setTitleBarWidget does not accept 0" 2011-06-07 15:25:07 -03:00
Hugo Parente Lima
82612584c6 Show perm links only when the mouse hover on title. 2011-06-06 18:54:48 -03:00
Hugo Parente Lima
99b07e3221 Update javascript files used in sphinx generated documentation. 2011-06-06 18:54:48 -03:00
Renato Filho
00b1216fb9 Created unit test for bug #860.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente <hugo.lima@openbossa.org>
2011-06-03 17:35:18 -03:00
Renato Filho
21dc823972 Fixed signal connection with native c++ slot.
Fixes bug #860.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente <hugo.lima@openbossa.org>
2011-06-03 17:33:53 -03:00
Hugo Parente Lima
2b78766cdc 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>
2011-06-02 17:53:47 -03:00
Hugo Parente Lima
80c1011721 Fix bug 631 - "QSocketNotifier: Accept file-like object (with .fileno() method) in constructor" 2011-06-02 17:53:47 -03:00
Hugo Parente Lima
0d2705eb11 Avoid warnings about redefined constants. 2011-06-02 17:53:47 -03:00
Hugo Parente Lima
0b1eea7116 Unit test for bug862 - "Problems when printing objects" 2011-06-02 17:53:46 -03:00
Marcelo Lira
8127218741 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>
2011-06-02 17:11:28 -03:00
Marcelo Lira
046bccece9 Moved internalPointer methods code injection into a code template. 2011-06-02 17:11:28 -03:00
Renato Filho
bec5ca48fd Updated example to handle with Python warnings.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2011-06-02 16:18:05 -03:00
Hugo Parente Lima
75154e2f2f 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>
2011-06-02 11:04:24 -03:00
Renato Filho
606a90d406 Created unit test for QObject.eventFilter function.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2011-06-01 14:05:29 -03:00
Renato Filho
9408505a24 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>
2011-06-01 14:04:31 -03:00
renato araujo
2e985afb3a Created ClassInfo documentation.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
              Hugo Parente <hugo.lima@openbossa.org>
2011-05-30 16:26:48 -03:00
Renato Filho
35630f32ff Updated generatorrunner dependency version. 2011-05-30 16:26:40 -03:00
Hugo Parente Lima
30444ccab7 Minor change in a doc code snippet. 2011-05-30 14:44:09 -03:00
Renato Filho
2aeac5e05b Fix memory leak on QEasingCuverFunctor. 2011-05-24 14:49:54 -03:00
Renato Filho
774223adbd Check if the same python object arrive on destroyed signal.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-05-23 17:43:42 -03:00
Renato Filho
959aa385f5 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>
2011-05-23 17:43:38 -03:00
Renato Filho
05431cbfc0 Fixed reference leek on global receiver callback call.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-05-23 17:43:35 -03:00
Renato Filho
1abf8c6149 Created unit test for ClassInfo class.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-05-23 17:43:31 -03:00
Renato Filho
04be2b1ca2 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>
2011-05-23 17:43:27 -03:00
Renato Filho
fe06dba43c Create checkType for libpyside objects.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-05-23 17:43:23 -03:00
Renato Filho
cef6db9548 Fix indentation.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-05-23 17:43:03 -03:00
Marcelo Lira
b112512793 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>
2011-05-19 14:45:00 -03:00
Renato Filho
6e16fd86f4 Create unit test for function QEasingCuver.setCustomType.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-05-19 10:29:59 -03:00
Renato Filho
40277720ae Implemented support to QEasingCurve.setCustomType.
fixes bug #725.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-05-19 10:29:59 -03:00
Renato Filho
b9fd78a65f 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>
2011-05-19 10:29:59 -03:00
Hugo Parente Lima
d5fd41d8ee Remove ugly gray background on documentation see-also links. 2011-05-18 17:26:09 -03:00
Lauro Neto
a3628e8752 Update test for python 2.5
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Reviewer: Hugo Lima <hugo.lima@openbossa.org>
2011-05-18 15:44:33 -03:00
Hugo Parente Lima
eb133c76b8 Fix bug 803 - "QWebElementCollection.operator[] is not implemented"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2011-05-18 14:29:29 -03:00
Paulo Alcantara
a859097f56 Fix typo
Signed-off-by: Paulo Alcantara <paulo.alcantara@openbossa.org>
2011-05-18 11:05:51 -03:00
Renato Filho
3546a3674f Implemented convertion from Python types for QDate, QTime, QDateTime.
Fixes bug #680

Reviewer: pcacjr <pcacjr@gmail.com>
          Hugo Parente <hugo.lima@openbossa.org>
2011-05-18 11:00:03 -03:00
Hugo Parente Lima
75d27311e5 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>
2011-05-17 18:41:54 -03:00
Hugo Parente Lima
ba448baf4d White spaces removal... 2011-05-17 18:41:39 -03:00
Marcelo Lira
e1a137d33e 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>
2011-05-17 17:50:08 -03:00
Renato Filho
82fc89093c Created unit test for bug #854.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente <hugo.lima@openbossa.org>
2011-05-17 10:48:30 -03:00
Renato Filho
29cd3b1351 Fixed kee-reference rule.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente <hugo.lima@openbossa.org>
2011-05-17 10:48:30 -03:00
Hugo Parente Lima
5860f786a0 Fix bug 857 - "64bit Windows build broken"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Lauro Moura <lauro.filho@openbossa.org>
2011-05-16 15:19:56 -03:00
Marcelo Lira
5ae1e6460b 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>
2011-05-13 17:25:08 -03:00
Marcelo Lira
bf4e4cdb89 QPersistentModelIndex has its "operator const QModelIndex&() const" method back. 2011-05-13 17:25:08 -03:00
Paulo Alcantara
5a408b2b9d 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>
2011-05-13 14:02:41 -03:00
Paulo Alcantara
a8b02e046b 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>
2011-05-13 14:02:41 -03:00
Paulo Alcantara
7780ccddc1 Add template to toTuple() functions
Signed-off-by: Paulo Alcantara <paulo.alcantara@openbossa.org>
2011-05-13 14:02:41 -03:00
Hugo Parente Lima
ac377b7fbd Always use the local Qt headers + global.h.in cleanup.
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2011-05-12 21:15:35 -03:00
Hugo Parente Lima
63c4cb9f9e Only add Qt4.6 classes when using Qt4.6 on QtTest and QtGui. 2011-05-12 19:04:22 -03:00
Hugo Parente Lima
70a776c6ff Correctly set SUPPORTED_QT_VERSION variable to the current Qt version. 2011-05-12 19:01:47 -03:00
Hugo Parente Lima
f4128e89ed Add since attribute for classes and enums added on Qt4.6 and Qt4.7. 2011-05-12 19:00:44 -03:00
Hugo Parente Lima
b552641feb Fix QGraphicsItem compilation on Qt4.5. 2011-05-12 18:59:48 -03:00
Hugo Parente Lima
c08b1ba563 Fix QColor wrapper compilation on Qt4.5. 2011-05-12 18:58:59 -03:00
Hugo Parente Lima
0c4fbcf5ad Be compatible with Qt4.5, i.e. no QScopedPointer. 2011-05-12 18:56:53 -03:00
Hugo Parente Lima
4d90463624 Remove typesystem verbosity after fix of bug 417.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2011-05-11 11:13:13 -03:00
Hugo Parente Lima
a5249a70e1 Use add-function on QCoreApplication and QApplication constructors.
This was needed after a fix in the shiboken generator regarding the
tp_init initialization.
2011-05-11 11:13:13 -03:00
Renato Filho
3669f32af8 Created unit test for bug #312.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-05-11 10:18:36 -03:00
Renato Filho
78e120ec02 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>
2011-05-11 10:18:16 -03:00
Renato Filho
fc331f37e3 Created test for mew pythonic functions on QTransform class.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-05-10 16:50:43 -03:00
Renato Filho
99c62a3a09 Create pythonic functions for QTransform class.
fixes bug #615.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-05-10 16:50:21 -03:00
Hugo Parente Lima
18e0ece1c9 Fix assert in bug 722 unit test.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2011-05-10 10:25:51 -03:00
Hugo Parente Lima
54e97b8e14 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.
2011-05-10 10:25:51 -03:00
Renato Filho
450d1a98a5 Avoid run PyObjectWrapper operators without python interpreter.
Fixes bug #829.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-05-09 16:32:48 -03:00
Renato Filho
7fb34b3685 Created unit test for bug #847.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-05-09 15:47:05 -03:00
Paulo Alcantara
8ca58af304 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>
2011-05-06 15:12:15 -03:00
Paulo Alcantara
6e95894d10 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>
2011-05-06 15:11:06 -03:00
Hugo Parente Lima
2d5207b32c Fix path of pysideqmlregistertype.cpp. 2011-05-05 16:46:58 -03:00
Hugo Parente Lima
206474a5a3 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>
2011-05-05 16:13:59 -03:00
Renato Filho
964eb13adf 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>
2011-05-05 15:45:26 -03:00
Hugo Parente Lima
29c263eeb8 Moved unit test of bug 834 from QtCore to QtGui, as it tests QtGui classes. 2011-05-05 14:18:39 -03:00
Renato Filho
f70ff13351 Created unit test for bug #820.
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-05-05 11:42:02 -03:00
Renato Filho
a31fb14a1f Fixed signal name parser.
Fixes bug #820.

Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-05-05 11:41:25 -03:00
Renato Filho
84b4f2da0a Created unit test for QSysInfo class.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-05-04 15:51:14 -03:00
Renato Filho
99ca556810 Fixed QSysInfo.Endian enum detection on MacOs.
Fixes bug #809.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-05-04 15:51:06 -03:00
Renato Filho
0dd57ef4a5 Created unit test fo QMacStyle class.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-05-04 15:50:55 -03:00
Renato Filho
645c80134f 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>
2011-05-04 15:50:36 -03:00
Hugo Parente Lima
06051ca647 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>
2011-05-04 14:08:15 -03:00
Renato Filho
3590ad14d5 Fixed some typos on unit test for bug #841 2011-05-04 13:51:59 -03:00
Renato Filho
95dd5c0861 Created unit test for bug #785.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-05-04 13:51:59 -03:00
Renato Filho
34f0fe99da Put back missing functions for class QItemSelection.
fixes bug #785.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-05-04 13:51:59 -03:00
Hugo Parente Lima
4175398b07 Fix bug 797 - "error on ui file load"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2011-05-04 10:59:42 -03:00
Hugo Parente Lima
9b793705fe 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>
2011-05-03 15:46:24 -03:00
Paulo Alcantara
f5669ba342 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>
2011-05-03 14:49:23 -03:00
Paulo Alcantara
a0d7bab4be 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>
2011-05-03 14:49:04 -03:00
Renato Filho
393ddb46fa Create manually dir for tests.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-05-03 14:48:55 -03:00
Renato Filho
13d505c9c0 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>
2011-05-03 14:47:24 -03:00
Renato Filho
9ebe4ba6af 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>
2011-05-02 19:12:01 -03:00
Renato Filho
e9c7505375 Created unit test for bug #826.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-05-02 19:11:56 -03:00
Renato Filho
ee7b26545b Created unit test for bug #839.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-05-02 19:11:50 -03:00
Renato Filho
49ba9c9cd5 Implemented QTestTouch functions.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-05-02 19:11:20 -03:00
Renato Filho
af37aaf259 Bump version and updated dependency version required. 2011-04-28 17:59:49 -03:00
Renato Filho
011db01f65 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>
2011-04-28 17:43:01 -03:00
Paulo Alcantara
1cc2ccbcd8 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>
2011-04-28 17:43:01 -03:00
Paulo Alcantara
2130c2dce5 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>
2011-04-28 17:43:01 -03:00
Renato Filho
d34e154190 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>
2011-04-28 17:43:01 -03:00
Renato Filho
3b4499891c 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>
2011-04-28 17:43:01 -03:00
Hugo Parente Lima
fa34fa2720 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>
2011-04-28 16:52:20 -03:00
Lauro Neto
b32b614d1b Update inheritance diagram sphinx extension.
Better handling missing classes.

Reviewer: Renato Araujo <renato.filho@openbossa.org>
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
2011-04-28 14:56:55 -03:00
Renato Filho
a68d4b04f3 Created unit test for bug 829.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-04-28 10:34:58 -03:00
Renato Filho
955316b5ca Implemented stream operator for PyObjectWrapper.
Fixes bug #829.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-04-28 10:34:49 -03:00
Renato Filho
75bcc4dbdd Fixed QVariant conversion for dictionary.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-04-28 10:25:25 -03:00
Hugo Parente Lima
aa8c4f6b2e 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>
2011-04-27 19:08:40 -03:00
Hugo Parente Lima
1ccb6de499 Fix bug 766 - "Constructor "QImage(const char* const xpm[])" missing"
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2011-04-27 15:01:52 -03:00
Hugo Parente Lima
8d9bf59fb1 Fix bugs 776 and 777
Bug 776 - "Operator "QPolygon::operator<<(QPoint)" missing"
Bug 777 - "Operator "QPolygon::operator<<(QVector<QPoint>)" missing"
2011-04-26 18:02:29 -03:00
Renato Filho
2179e02862 Fix test on windows.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2011-04-26 16:36:32 -03:00
Renato Filho
afc0bb1fee Created unit test for bug #778.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2011-04-26 16:36:32 -03:00
Renato Filho
de6a90bdcb Implemented support to iterator on QTreeWidgetItemIterator.
Fixes bug #778.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2011-04-26 16:35:52 -03:00
Renato Filho
1f013e75e3 Created unit test to QKeySequence convertion to QVariant.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-04-26 10:07:31 -03:00
Renato Filho
5349174a3c Fixed QKeySequence convertion to QVariant.
Fixes bug #775.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-04-26 10:07:31 -03:00
Renato Filho
cbdafab9e7 Created unit test for QKeySequence.operator[].
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-04-26 10:07:31 -03:00
Renato Filho
3d3dc46531 Implemented support to QKeySequence.operator[].
Fixes bug #774.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-04-26 10:07:31 -03:00
Hugo Parente Lima
eb6145b96b 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>
2011-04-25 18:11:36 -03:00
Hugo Parente Lima
101671f474 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>
2011-04-25 15:14:33 -03:00
Hugo Parente Lima
d7185772bc Fix bug 765 - "Method "QRect QStyle::itemTextRect(const QFontMetrics&,constQRect&,int,bool,const QString&) const" missing" 2011-04-25 15:14:33 -03:00
Hugo Parente Lima
0c63e37820 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"
2011-04-25 15:14:33 -03:00
Renato Filho
6b3a7f904f 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>
2011-04-25 14:18:28 -03:00
Renato Filho
7d35681fce Implemented test for QWebFrame.metadata function.
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2011-04-25 14:18:22 -03:00
Renato Filho
a07d192625 Implemented conversion from QMultiMap to Python dictonary.
Fixes bug #773.

Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2011-04-25 14:17:48 -03:00
Renato Filho
cd1dbb0b9d Created unit test for function QPicture.setData
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-04-25 11:28:04 -03:00
Renato Filho
1efb6aeacc 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>
2011-04-25 11:27:14 -03:00
Renato Filho
db9547be72 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>
2011-04-20 18:44:53 -03:00
Lauro Neto
c36b1ff7e7 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>
2011-04-20 16:57:34 -03:00
Renato Filho
df742a5905 Created unit test for bug #811.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2011-04-20 09:33:46 -03:00
Renato Filho
709420df8e fix QTextBlock.setUserData reference leak.
Fixes bug #811.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2011-04-20 09:33:46 -03:00
Lauro Neto
6700ddb9cb 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>
2011-04-19 16:37:22 -03:00
Renato Filho
3fb374e271 Fixed test to avoid problems with float numbers in different archs.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2011-04-18 17:45:04 -03:00
Renato Filho
e6b3d26d74 Exported missing enums on phonon.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2011-04-18 17:45:01 -03:00
Renato Filho
6cd49a79f6 Created unit test for ObjectDescription.fromIndex.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2011-04-18 17:44:59 -03:00
Renato Filho
8807a885e6 Implemented function ObjectDescription.fromIndex.
Fixes bug #787.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2011-04-18 17:44:19 -03:00
Renato Filho
406293f5aa Fix round problems on unit test. 2011-04-15 19:26:15 -03:00
Renato Filho
04a2f23988 Create unit test for bug #757.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-04-15 19:23:02 -03:00
Marcelo Lira
13f6d71f20 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>
2011-04-15 19:22:32 -03:00
Renato Filho
a5b785fff4 Avoid delete file from source dir. 2011-04-15 17:14:08 -03:00
Hugo Parente Lima
1374006206 Fix bug 717 - "QByteArray doesn't honor \0 inside strings."
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2011-04-14 20:42:49 -03:00
Hugo Parente Lima
a230b243d0 Fix inject code of QByteArray::fromRawData.
The QByteArray returned must share, nto copy, the string contents.
2011-04-14 20:09:30 -03:00
Marcelo Lira
2400157808 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>
2011-04-14 19:15:56 -03:00
Marcelo Lira
e24401e586 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.
2011-04-14 19:15:56 -03:00
Marcelo Lira
1d842f57a2 Fixes bug #741 - Method "qreal QTextLine::cursorToX(int*,Edge) const" missing.
Also added unit tests.

http://bugs.pyside.org/show_bug.cgi?id=741
2011-04-14 19:15:56 -03:00
Marcelo Lira
39c32e3712 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
2011-04-14 19:15:56 -03:00
Marcelo Lira
30c19e9c41 Fixed CMakeLists.txt files to prevent static source files of being deleted by "make clean". 2011-04-14 19:15:56 -03:00
Renato Filho
8408da40ca 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>
2011-04-14 18:52:20 -03:00
Renato Filho
96750087d9 Created unittest for bug #750.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-04-14 18:52:05 -03:00
Renato Filho
59ab3c3049 Put back QPainter.fontInfo.
Fixes bug #750.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-04-14 18:52:00 -03:00
Renato Filho
46fc033929 Created unit test for bug #743.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-04-14 18:51:51 -03:00
Renato Filho
a0b43fbc23 Implemented support to mapping on QMatrix4x4.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-04-14 18:51:51 -03:00
Renato Filho
94310a7b19 Created unit test for bug #740.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-04-14 17:52:42 -03:00
Renato Filho
d71a6a8c3a Implemented function QBitmap.fromData.
Fixes bug #740

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-04-14 17:52:24 -03:00
Renato Filho
a5e20dfd75 Created unit test for bug #722.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2011-04-13 18:30:54 -03:00
Renato Filho
3e69981b4b Use PyFloat as double in signal signatures.
Fix bug #722.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2011-04-13 18:29:19 -03:00
Hugo Parente Lima
c269e0db00 Removes the removal of QMatrix4x4 call operators.
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2011-04-13 11:01:10 -03:00
Hugo Parente Lima
1c0279fa25 Fix code injection of QIODevice to support returning an error. 2011-04-13 11:01:10 -03:00
Hugo Parente Lima
1e149f3de4 Fix bug 723 - "Missing QAbstractFileEngine.read and QAbstractFileEngine.readLine" 2011-04-13 11:01:10 -03:00
Renato Filho
741bc56e4b Created QtDeclarative.ListProperty documentation.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-04-12 17:48:46 -03:00
Renato Filho
c8a11c179a Create unit test for bug #816.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-04-12 16:47:08 -03:00
Renato Filho
d0ad9d27aa 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>
2011-04-12 16:46:32 -03:00
Renato Filho
6da3e78014 Created unit test for bug #814.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente <hugo.lima@openbossa.org>
2011-04-11 12:07:34 -03:00
Renato Filho
7abf74adb9 Updated dependency version. 2011-04-07 18:01:33 -03:00
Renato Filho
9f73d5ecf1 Fixed bug #400 link description. 2011-04-07 18:01:33 -03:00
Renato Filho
e7413828a1 Create unitest for bug #688.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2011-04-07 18:01:26 -03:00
Renato Filho
a0c72f28c6 Implemented support to pyton iterator in QTextFrame::iterator.
Fixes bug #688.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2011-04-07 18:01:08 -03:00
Hugo Parente Lima
f3961387a9 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>
2011-04-07 16:33:42 -03:00
Hugo Parente Lima
85f65194ef Fix bug 724 - "Missing QAbstractFileEngine.map method" 2011-04-07 16:33:42 -03:00
Hugo Parente Lima
3b9481c24c Fix bug 721 - "QFile doesn't support map and unmap functions." 2011-04-07 16:33:42 -03:00
Hugo Parente Lima
40718156a6 Remove unused variables and warnings when using gcc 4.6. 2011-04-07 16:33:42 -03:00
Marcelo Lira
51e9dfc428 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>
2011-04-07 15:17:30 -03:00
Marcelo Lira
8e7845be18 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.
2011-04-07 15:17:30 -03:00
Marcelo Lira
2c6a44feee 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.
2011-04-07 15:17:30 -03:00
Marcelo Lira
a513d831cd Do *not* mix tabs and spaces. 2011-04-07 15:17:29 -03:00
Marcelo Lira
8e0e7ef0b6 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.
2011-04-07 15:17:23 -03:00
Marcelo Lira
62448f99e7 Merged fix_int*... and fix_qreal*... type system templates.
Also modified the method call to be friendlier with virtual methods.
2011-04-06 21:30:19 -03:00
Hugo Parente Lima
ee17f8c970 Version bump to 1.0.2 2011-04-06 16:02:23 -03:00
Renato Filho
d984cf24cc Create unit test for bug #793.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente <hugo.lima@openbossa.org>
2011-04-05 10:17:56 -03:00
Renato Filho
e39188d636 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>
2011-04-05 10:14:31 -03:00
Marcelo Lira
bbba1cc470 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>
2011-04-01 16:40:17 -03:00
Hugo Parente Lima
9ffb2ef542 Fix bug 712 - "QtGui.QFormLayout doesn't have setItem() function"
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2011-03-30 18:49:07 -03:00
Hugo Parente Lima
4239b56710 Fix bug 540 - "Duplicate entries in QRegExp docs"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2011-03-29 17:39:09 -03:00
Hugo Parente Lima
f8bc57c61c Fix doc bug 794 - "QPixmapCache.find example is wrong" 2011-03-28 14:51:57 -03:00
Hugo Parente Lima
9024884495 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>
2011-03-25 16:49:38 -03:00
Hugo Parente Lima
c50d08e4c8 Fix bug 694 - "QWebPage::extensions need injected overloads due to required casts on C++ version" 2011-03-25 09:57:02 -03:00
Hugo Parente Lima
3cd2cad128 Fix bug 699 - "PySide.QtCore.Property doesn't throw a TypeError if the first arg isn't a PyType." 2011-03-25 09:48:11 -03:00
Hugo Parente Lima
6f8f728241 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>
2011-03-23 13:36:17 -03:00
Hugo Parente Lima
f645a79f03 Fix a type in QtGui type system. 2011-03-23 13:36:17 -03:00
Hugo Parente Lima
2f4a1f634c Use set instead of add on reference-count action attribute. 2011-03-23 13:36:17 -03:00
Hugo Parente Lima
e07b306bb4 Type systems of all modules but QtCore and QtGui reviewed. 2011-03-23 13:36:14 -03:00
Hugo Parente Lima
7849b4262f Fix bug 736 - "Signal/Slot is not working at all"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2011-03-22 15:04:40 -03:00
Hugo Parente Lima
4749d14642 Changed local variable naming style. 2011-03-22 15:04:27 -03:00
Renato Filho
26ae1259a9 Revert "Fixed test for bug #674 to works with new getattr check."
This reverts commit a6f0d0cb52.
2011-03-22 11:49:43 -03:00
Renato Filho
78ca4c0749 Only raise 'RuntimeError' for function call to avoid problems with contructor order calls. 2011-03-22 11:13:32 -03:00
Marcelo Lira
02f9ca5417 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>
2011-03-22 10:25:51 -03:00
Hugo Parente Lima
189717cdb1 Fix bug 728 - "QFileDialog.getOpenFileNames never returns (hangs)"
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2011-03-21 15:51:12 -03:00
Renato Filho
2bd54857ed Created unit test for bug #726.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2011-03-21 11:57:38 -03:00
Renato Filho
8ce3644a13 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>
2011-03-21 11:57:38 -03:00
Hugo Parente Lima
13d9f714c5 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>
2011-03-18 18:32:37 -03:00
Renato Filho
a6f0d0cb52 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>
2011-03-16 17:01:08 -03:00
Renato Filho
fb3bae60f4 Created unit test for bug #696.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Marcelo Lira <marcelo.lira@openbossa.org>
2011-03-16 17:01:08 -03:00
Renato Filho
880e6a28b6 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>
2011-03-16 17:00:14 -03:00
Renato Filho
b1a1f61c64 Created unit test for bug #711.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2011-03-16 16:34:26 -03:00
Renato Filho
9a7733ef8c Fix QToolbar.clear parent policy.
Fixes bug #711.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2011-03-16 16:34:26 -03:00
Hugo Parente Lima
a571d9bd98 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>
2011-03-16 11:22:34 -03:00
Hugo Parente Lima
008798b0e3 Fix bug 718 - "PySide/PyQt4 QByteArray incompatibilities: setNum method"
Fix bug 719 - "PySide/PyQt4 QByteArray incompatibilities: appendByte method"
2011-03-16 11:22:19 -03:00
Hugo Parente Lima
25026120a1 Add comments to some function removals. 2011-03-15 14:22:10 -03:00
Renato Filho
4c149aef4e Created unit test for bug #714.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2011-03-09 18:06:19 -03:00
Renato Filho
957fa171a9 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>
2011-03-09 18:05:37 -03:00
Lauro Neto
f0e364ff28 Remove duplicated const functions from QRegExp
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
2011-03-04 16:49:12 -03:00
Hugo Parente Lima
73f21eb1bb Last code snippets.... 2011-03-04 13:10:38 -03:00
Hugo Parente Lima
bd43c1e0b2 Removed Signal/Slot documentation content. 2011-03-04 11:37:20 -03:00
Hugo Parente Lima
04a26bd3bb Version bump to 1.0.1 2011-03-04 11:37:20 -03:00
Hugo Parente Lima
ca81d9a32c More code snippets ported to Python. 2011-03-03 18:56:26 -03:00
Hugo Parente Lima
094de67591 Version bump, 1.0.0 final yay! 2011-03-02 21:17:57 -03:00
Hugo Parente Lima
b94f5359b0 Added some missing code snippets to PySide documentation. 2011-03-02 21:17:57 -03:00
Hugo Parente Lima
97a16f10ab Removed useless files from docs. 2011-03-02 21:17:57 -03:00
Hugo Parente Lima
eedc03ebb5 Remove some warning messages when generating the docs.
Those classes haven't especific documentation, they are only typedefs for template instanciations.
2011-03-02 21:17:57 -03:00
Luciano Wolf
17f2d83e0e Fix bug 676 - "wrong QLocale.toFloat() description".
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2011-03-02 15:03:11 -03:00
Hugo Parente Lima
2ed86dc435 Fix bug#708 - "Remaining pyqtSignal in ref docs" 2011-03-02 14:35:55 -03:00
Hugo Parente Lima
8ac29700ce Added module documentation for all modules. 2011-03-01 20:32:10 -03:00
Hugo Parente Lima
ee92e460f1 Removed a lot of files not used by the doc generation. 2011-03-01 20:31:56 -03:00
Hugo Parente Lima
35168cb86a Missing doc code snippet for webkit. 2011-03-01 20:31:39 -03:00
Hugo Parente Lima
daffd9831a Fixed/translated some doc. code snippets. 2011-03-01 15:52:11 -03:00
Hugo Parente Lima
9c21263251 Use multiple code snippets directories to fix the crazyness of Qt docs. 2011-03-01 15:52:11 -03:00
Hugo Parente Lima
f804d84297 Removed unused doc snippet files. 2011-03-01 15:52:11 -03:00
Hugo Parente Lima
361c887da0 Added modify-documentation do QDeclarativePropertyMap to remove references to QVariant and QString. 2011-02-28 20:23:32 -03:00
Hugo Parente Lima
75f799872b Added missing format attribute. 2011-02-28 20:23:32 -03:00
Hugo Parente Lima
1ab21c4b28 Added some QML tutorials to the documentation. 2011-02-25 19:11:25 -03:00
Hugo Parente Lima
98ede2df71 Minor fixes on pysideapi2.rst. 2011-02-25 19:07:27 -03:00
Hugo Parente Lima
d9482626e6 Use monospace font for sphinx literal strings. 2011-02-25 19:05:54 -03:00
Hugo Parente Lima
dd8de65f73 Change version from beta6 to rc1 2011-02-17 17:48:30 -02:00
Marcelo Lira
2efb33d2fc 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>
2011-02-17 14:43:51 -03:00
Marcelo Lira
5ef2f26ec2 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>
2011-02-17 10:52:19 -03:00
Hugo Parente Lima
4305a54b42 Fix bug 681 - "Unicode support for trUtf8 method"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2011-02-16 19:40:46 -02:00
Hugo Parente Lima
e0cf4b000d Fix bug 674 - "QGraphicsScene::clear() is missing" 2011-02-16 16:07:01 -02:00
Jerome Leclanche
adfaf21063 Fix bug 687 - "[PATCH] QUiLoader code example crashes"
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2011-02-16 11:40:16 -02:00
Hugo Parente Lima
691841f829 Fix bug 675 - "QGraphicsLinearLayout segfault"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2011-02-15 19:35:05 -02:00
Hugo Parente Lima
47957530f9 Refactor to simplify code just avoding some Cism. 2011-02-15 16:38:53 -02:00
Hugo Parente Lima
a7cebb5917 Make PySide signals work with meta types. 2011-02-15 16:38:21 -02:00
Hugo Parente Lima
0ad9c484df Add unit test for bug 684. 2011-02-15 16:37:16 -02:00
Lauro Neto
0298a34289 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>
2011-02-11 19:32:41 -03:00
Hugo Parente Lima
7b4d24f094 Fix bug 679 - "QWebPage miss extension function"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2011-02-11 17:23:23 -02:00
Hugo Parente Lima
7d80ac8e29 Fix phonon compilation and detection of VideoCaptureDevice class.
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2011-02-11 15:09:53 -02:00
Hugo Parente Lima
26d6f4a39e Fix bug 638 - "Documentation for phonon doesn't show class inheritance diagrams." 2011-02-11 15:09:53 -02:00
Hugo Parente Lima
42e149598e Removed duplicated entry of QWebPage::ErrorDomain on typesystem. 2011-02-11 15:09:53 -02:00
Marcelo Lira
8eb529bda3 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>
2011-02-11 14:40:42 -03:00
Renato Araujo Oliveira Filho
c3d180fdc2 Created unit test for bug #671.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-02-10 17:30:34 -03:00
Renato Araujo Oliveira Filho
b9dd824866 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>
2011-02-10 17:30:34 -03:00
Marcelo Lira
42c9f80b06 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>
2011-02-10 14:07:56 -03:00
Renato Araujo Oliveira Filho
bda10df1da 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>
2011-02-10 10:36:07 -03:00
Hugo Parente Lima
7909d294f5 Fix bug 668 - "QFileSystemModel setRootPath stops application from quitting."
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2011-02-09 18:26:55 -02:00
Hugo Parente Lima
f25d227d6e Replaced all entries of reference-count with action=add to action=set. 2011-02-09 18:26:55 -02:00
Hugo Parente Lima
7fd8eba136 Fix bug 663 - "Crash on exit when passing QNetworkAccessManager around" 2011-02-09 18:26:55 -02:00
Hugo Parente Lima
95d546696e Remove invalid function removals. 2011-02-09 18:26:55 -02:00
Hugo Parente Lima
2248c1b944 Fix bug 667 - "Crash on exit" 2011-02-09 18:26:55 -02:00
Hugo Parente Lima
8fa461559c Fix QGLBuffer::map code injection and test. 2011-02-09 18:26:12 -02:00
Renato Araujo Oliveira Filho
06755f06ba Updated phonon typesystem to use the new pyside cmake macro syntax. 2011-02-09 18:05:20 -03:00
Renato Araujo Oliveira Filho
5a87a51c11 Updated http server used on tests to keep trying until get a free address. 2011-02-09 15:49:45 -03:00
Renato Araujo Oliveira Filho
323b37beda Created unit test for bug #662.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-02-09 15:46:29 -03:00
Renato Araujo Oliveira Filho
0fe1c15cbf Implemented support for iterator on QTextBlock.
Fixes bug #662.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2011-02-09 15:46:25 -03:00
Renato Araujo Oliveira Filho
88c38236d4 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>
2011-02-09 15:46:10 -03:00
Renato Araujo Oliveira Filho
8e4b414844 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>
2011-02-08 14:49:37 -03:00
Renato Araujo Oliveira Filho
9b3d0b2ef2 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>
2011-02-07 20:06:27 -03:00
Renato Araujo Oliveira Filho
8a50e91e6f 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>
2011-02-07 18:09:28 -03:00
Renato Araujo Oliveira Filho
90178e21dd 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>
2011-02-07 17:33:20 -03:00
Renato Araujo Oliveira Filho
6b1f0b8ca7 Fixed problems to emit signals with objects types.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2011-02-07 17:32:47 -03:00
Hugo Parente Lima
4e79ce7b25 Fix 666 - "QByteArray does not support slices"
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2011-02-04 19:28:43 -02:00
Hugo Parente Lima
ac325f24e4 Fix bug 660 - "QMimeData type deleted prematurely when overriding mime-type in QStandardItemModel drag and drop" 2011-02-04 19:28:42 -02:00
Hugo Parente Lima
d44aa5c310 Fix bug 643 - "QTabWidget.insertTab not taking ownership" 2011-02-04 19:28:42 -02:00
Marcelo Lira
2f6af8142d 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>
2011-02-04 18:07:51 -03:00
Marcelo Lira
233c0333e6 Removed unnecessary line from test binding CMake file. 2011-02-04 16:09:27 -03:00
Hugo Parente Lima
ac767473a2 Fix qresource_test openning the file in binary mode, so it doesn't fail on windows. 2011-02-04 15:12:29 -02:00
Hugo Parente Lima
8ab8950ccc Export QTranslator::translate and QTranslator::load.
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2011-02-03 19:10:12 -02:00
Hugo Parente Lima
8d1e058fa1 Export method QCryptographicHash::addData. 2011-02-03 18:36:04 -02:00
Hugo Parente Lima
a4ab1c7e99 Remove some ancient method removals from QtCore typesystem.
- QDir(QString,QString,QFlags<QDir::SortFlag>,QFlags<QDir::Filter>)
- QBitArray::fill(bool, int)
2011-02-03 18:36:04 -02:00
Hugo Parente Lima
2d65e48fa8 Use PyString_GET_SIZE instead of PyString_Size on some inject codes. 2011-02-03 18:36:04 -02:00
Hugo Parente Lima
f5d4b6e678 Export QSettings::iniCodec and QXmlStreamWriter::codec methods. 2011-02-03 18:36:04 -02:00
Hugo Parente Lima
ee80967d24 QPersistentModelIndex now have the same implementation of internalPointer of QModelIndex. 2011-02-03 18:36:04 -02:00
Hugo Parente Lima
7b4968abab 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.
2011-02-03 18:36:04 -02:00
Hugo Parente Lima
b52148fd85 Fix comparisson of QByteArray with Python strings that have zeroes inside. 2011-02-03 18:36:04 -02:00
Hugo Parente Lima
fa118ae670 Added comments to some function removals. 2011-02-03 18:35:40 -02:00
Hugo Parente Lima
709895f2fb Fix bug 653 - "Crash after calling QWizardPage.wizard()"
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2011-02-02 20:09:10 -02:00
Hugo Parente Lima
295b965d3c Fix bug 652 - "Segfault when using QTextBlock::setUserData due to missing ownership transfer" 2011-02-02 19:23:24 -02:00
Hugo Parente Lima
d7269670ee 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*)
2011-02-02 19:23:24 -02:00
Renato Araujo Oliveira Filho
c19ab39cbf Bump version to beta6. 2011-02-02 15:16:38 -03:00
Renato Araujo Oliveira Filho
1b1a83dc30 Fixed Cmake files used to find the library after the installation.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2011-02-02 11:42:52 -03:00
Hugo Parente Lima
87977cc320 Fix bug 650 - "Missing bindings for QNetworkProxyFactory"
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2011-02-02 11:36:12 -02:00
Hugo Parente Lima
3270dde028 Fix bug 651 - "Calling disconnect() with no arguments causes segfault" 2011-02-02 11:36:12 -02:00
Renato Araujo Oliveira Filho
a44fcc6dba Updated QAbstractItemModel.createIndex documentation to warning about
ptr argument life time.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2011-02-01 15:49:53 -03:00
Hugo Parente Lima
43a8f4089e Fix bug 656 - "cannot inherit from QCoreApplication"
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2011-01-31 16:22:28 -02:00
Marcelo Lira
f2c537eeaa 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>
2011-01-31 14:54:10 -03:00
Hugo Parente Lima
9ca80b5d3a 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>
2011-01-31 14:36:03 -02:00
Hugo Parente Lima
e17795d35b Added test for bug 613. 2011-01-28 20:44:16 -02:00
Hugo Parente Lima
2a43919024 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.
2011-01-28 19:33:42 -02:00
Renato Araujo Oliveira Filho
4af09f10ad Implement __repr__ function for class with Float attributes. 2011-01-28 18:02:20 -03:00
Renato Araujo Oliveira Filho
3c3caf154e Created unit test for bug #617.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2011-01-28 16:17:18 -03:00
Renato Araujo Oliveira Filho
5112a89ca9 Created __repr__ function unit test.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2011-01-27 17:35:05 -03:00
Renato Araujo Oliveira Filho
1a65a287fb Implemented fuction __repr__ for base types.
Fixes bug #593

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2011-01-27 17:34:44 -03:00
Renato Araujo Oliveira Filho
1f6e877f8d 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>
2011-01-25 17:29:21 -03:00
Hugo Parente Lima
629c0c383b Add test for bug#640.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2011-01-25 15:55:01 -02:00
Renato Araujo Oliveira Filho
c5fffa6f24 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>
2011-01-25 15:38:22 -03:00
Hugo Parente Lima
286f9c6d09 Fix bug#633 - "bool of null QDate (possibly other empty QString/null QObj types?) returns True for empty instance; probably should be False" 2011-01-24 16:42:45 -02:00
Renato Araujo Oliveira Filho
9a4c439d7f Fixed QLineEdit.getTextMargins return value.
Fixes bug #632

Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Marcelo Lira <marcelo.lira@openbossa.org>
2011-01-24 13:44:28 -03:00
Hugo Parente Lima
a4d7d8f80d Fix bug#636 - "Unable to navigate back to the main site from the generated documentation" 2011-01-24 10:30:04 -02:00
Renato Araujo Oliveira Filho
1cce4bafd3 Bump version to beta5. 2011-01-21 16:14:58 -03:00
Renato Araujo Oliveira Filho
08a0298fe0 Updated generatorrunner version dependency. 2011-01-21 16:14:16 -03:00
Renato Araujo Oliveira Filho
9284703855 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>
2011-01-21 13:44:47 -03:00
Marcelo Lira
bcba2a3b32 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>
2011-01-21 13:41:26 -03:00
Hugo Parente Lima
b9679215b8 Fix bug#552 - "Segmentation fault when using QUiLoader and QTabWidget"
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2011-01-21 10:30:21 -02:00
Hugo Parente Lima
7f533799d4 Use the same Python used by Shiboken instead of find a new one. 2011-01-20 15:17:34 -02:00
Hugo Parente Lima
f7a2ab3d66 Don't reject QGLWidget::setMouseTracking function. 2011-01-20 15:12:41 -02:00
Hugo Parente Lima
6a83c87283 Fix bug#623 - "QGLWidget.bindTexture(QPixmap, GLenum, GLenum) is missing" 2011-01-20 15:12:41 -02:00
Marcelo Lira
1a3418c8d1 Added test for module reloading.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
2011-01-19 17:49:12 -03:00
Renato Araujo Oliveira Filho
3b026ad4c9 Fixed Widget and Layout inject code to avoid problems in armel arch. 2011-01-18 14:42:02 -03:00
Renato Araujo Oliveira Filho
50e6f7671d Created unit test for bug #575.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
2011-01-17 10:46:43 -03:00
Marcelo Lira
499051fd2a 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>
2011-01-14 17:14:13 -03:00
Marcelo Lira
fb6186d270 Named the single argument of all "QWidget.*Event(arg)" methods as "event".
Just to make the generated documentation more readable.
2011-01-14 17:01:55 -03:00
Marcelo Lira
0d9a584a1c Fixed style on QUiLoader code snippet. 2011-01-14 17:01:55 -03:00
Hugo Parente Lima
530a3d23c5 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>
2011-01-14 13:58:10 -02:00
Renato Araujo Oliveira Filho
8243565f81 Fix typo on Cmake files.
Reviewer: Bruno Araujo <bruno.araujo@openbossa.org>
2011-01-13 14:14:26 -03:00
Hugo Parente Lima
867c2bd259 Removed useless rejections
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2011-01-13 13:59:02 -02:00
Hugo Parente Lima
ae02222d57 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.
2011-01-13 13:59:02 -02:00
Hugo Parente Lima
a78108efe3 Fix documentation for QWidget.winId() 2011-01-13 13:59:02 -02:00
Hugo Parente Lima
7e1b76e054 Don't crash when a unknown type is given as a meta call argument. 2011-01-13 13:59:01 -02:00
Hugo Parente Lima
b5331e5c56 Add polymorphic-id-expression to QGraphicsObject and QDeclarativeItem. 2011-01-13 13:59:01 -02:00
Renato Araujo Oliveira Filho
c8111dc99a Fixed path to include file used on cmake files.
Reviewer: Bruno Araujo <bruno.araujo@openbossa.org>
2011-01-13 10:45:17 -03:00
Renato Araujo Oliveira Filho
85947c03d9 Create a new parent test.
Check if the parent does not increase the reference if you set the
parent twice.
2011-01-12 19:31:22 -03:00
Renato Araujo Oliveira Filho
b8fcead629 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>
2011-01-12 17:27:42 -03:00
Marcelo Lira
ed0d9cf820 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>
2011-01-12 10:44:21 -03:00
Marcelo Lira
814bc522ce 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>
2011-01-10 15:26:54 -03:00
Renato Araujo Oliveira Filho
fb9fdba329 Created unit test for bug 589.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2011-01-07 19:15:49 -03:00
Renato Araujo Oliveira Filho
0f6a504dfb Fix Qvariant to Cpp conversion.
Fixes bug #589

Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2011-01-07 19:15:41 -03:00
Marcelo Lira
efdedcdd01 Fixes the fix in the commit a1cf8f03.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
2011-01-06 20:58:11 -03:00
Hugo Parente Lima
4d014eaa80 Fix bug#560 - "Lack of QtCore.Signal documentation"
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2011-01-06 20:14:56 -02:00
Marcelo Lira
a1cf8f03b2 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>
2011-01-06 19:08:40 -03:00
Marcelo Lira
5151af6de1 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>
2011-01-06 16:45:03 -03:00
Marcelo Lira
d3894ed861 Fixed PATH variable for tests on win32 platform. 2011-01-06 16:26:15 -03:00
Renato Araujo Oliveira Filho
932d9bced9 Created unit test for bug #585.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2011-01-06 14:17:21 -03:00
Renato Araujo Oliveira Filho
fb9c1a97fe Fixed QTreeWidgetItem.parent function policy.
Fixes bug #585

Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2011-01-06 14:16:44 -03:00
Hugo Parente Lima
753d2bd1f6 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>
2011-01-05 19:26:45 -02:00
Renato Araujo Oliveira Filho
53e649629b 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>
2011-01-05 14:54:23 -03:00
Hugo Parente Lima
6383832408 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>
2011-01-05 14:35:11 -02:00
Renato Araujo Oliveira Filho
ed1c0014f9 Fixed QWidget.setParent signature on typesystem. 2011-01-05 08:49:39 -03:00
linjunhalida
32681f7b70 add new QDatetime init function with 6 arguments
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2011-01-04 19:55:14 -02:00
Hugo Parente Lima
15dd2e07ed 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>
2011-01-04 19:25:31 -02:00
Renato Araujo Oliveira Filho
3774752f0c 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>
2011-01-04 19:23:57 -03:00
Hugo Parente Lima
269e8450dc 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>
2011-01-04 16:47:57 -02:00
Renato Araujo Oliveira Filho
374e2fcf88 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>
2011-01-03 19:58:53 -03:00
Marcelo Lira
da1759fe98 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>
2011-01-03 19:46:41 -03:00
Renato Araujo Oliveira Filho
39a5a09145 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>
2011-01-03 14:56:33 -03:00
Hugo Parente Lima
ea83c5e554 Fix bug#577 - "Reference to QString in docs" 2011-01-03 14:24:52 -02:00
Renato Araujo Oliveira Filho
f9587fcad2 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>
2011-01-03 13:50:25 -03:00
Lauro Neto
27b53151bf Avoid conflict in test case names
Reviewer: Hugo Lima <hugo.lima@openbossa.org>
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
2011-01-03 11:28:02 -03:00
Renato Araujo Oliveira Filho
eb0d211417 Fixed test to work in all platform. 2011-01-03 10:01:04 -03:00
Hugo Parente Lima
a38db0fe03 Fix bug#514 - "Static method QByteArray.fromRawData is missing from QtCore"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2010-12-30 17:03:36 -02:00
Hugo Parente Lima
d0d4ba1564 Fix bug 546 - "Python crash on exit"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2010-12-30 15:39:44 -02:00
Hugo Parente Lima
249a87808a Fix bug#493 - "__eq__ and friends not implemented for QKeyEvent == QKeySequence"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2010-12-29 19:12:28 -02:00
Lauro Neto
bc9ddff514 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>
2010-12-29 14:29:10 -03:00
Renato Araujo Oliveira Filho
9d6d30cb6a Changed api2 test to work on MacOS during a ssh session. 2010-12-29 11:55:55 -03:00
Hugo Parente Lima
7810dcd829 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>
2010-12-29 10:14:28 -02:00
Hugo Parente Lima
e8c0ba238a Fix bug#563 - "Unhandled signal emitting with invalid signature (which leads to application crash)" 2010-12-29 10:14:28 -02:00
Hugo Parente Lima
4b6cc4d478 Changes the arg name from p to parent to make parent heuristic work. 2010-12-29 10:14:28 -02:00
Renato Araujo Oliveira Filho
db4d324497 Fixed MetaObject creation based on typename.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
2010-12-29 09:55:13 -03:00
Renato Araujo Oliveira Filho
7144634e35 Fix test to avoid problems on slow computers.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
2010-12-29 09:54:58 -03:00
Renato Araujo Oliveira Filho
25264046e8 Appended ${QtGui_BINARY_DIR} on typesystem_path for QtMaemo5 module. 2010-12-28 14:12:24 -03:00
Renato Araujo Oliveira Filho
ecbc9ebcfa Appended QtGui library dependency on pysidetest library. 2010-12-28 14:09:16 -03:00
Renato Araujo Oliveira Filho
fa89170f62 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>
2010-12-28 12:00:02 -03:00
Renato Araujo Oliveira Filho
a74d92adce 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>
2010-12-27 19:20:05 -03:00
Renato Araujo Oliveira Filho
656be4ec98 Removed some float comparisons from QColor test to avoid armel problems.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
2010-12-27 13:32:16 -03:00
Hugo Parente Lima
6cf55675dc Fix bug#549 - "QGraphicsWidget::getContentsMargins() and QGraphicsWidget::getWindowFrameMargins() not available"
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-12-23 17:22:29 -02:00
Renato Araujo Oliveira Filho
fc471bed0f Used more common signature on function test to QList objects.
Replaced "const QList<QObject*>" signature to "const QList<QObject*>&",
more used on Qt code.
2010-12-23 15:47:59 -03:00
Renato Araujo Oliveira Filho
401f394179 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>
2010-12-22 19:49:50 -03:00
Lauro Neto
af0860ba4a Fix testbinding dependency
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Reviewer: Renato Araujo <renato.araujo@openbossa.org>
2010-12-22 18:11:26 -03:00
Renato Araujo Oliveira Filho
c4185280ba 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>
2010-12-22 16:34:29 -03:00
Renato Araujo Oliveira Filho
4b0eaa7796 Fix the QtMultimedia/audio_test.py to accept computers with only null
device.
2010-12-22 10:25:32 -03:00
Renato Araujo Oliveira Filho
67b868ccb9 Avoid QMatrix test while gcc is broken. 2010-12-22 10:17:21 -03:00
Renato Araujo Oliveira Filho
48b25047c9 Used argument '-a' during the call of xvfb command.
This argument allow the xvfb to find a free server number during the
execution.
2010-12-21 17:28:20 -03:00
Renato Araujo Oliveira Filho
04ac69ce52 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>
2010-12-21 17:28:20 -03:00
Renato Araujo Oliveira Filho
ab19244c22 Added QSslCertificate to QtNetwork module.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-12-21 17:28:20 -03:00
Renato Araujo Oliveira Filho
37fb36e1ff Fixed indentation mistakes.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-12-21 17:28:19 -03:00
Marcelo Lira
bb39c847d3 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>
2010-12-21 12:23:39 -03:00
Marcelo Lira
14a5405837 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>
2010-12-20 17:54:09 -03:00
Marcelo Lira
fbc06244e0 Fixed type system for TestView from pysidetest directory. 2010-12-20 17:47:01 -03:00
Marcelo Lira
116a0b159f QObject.sender should not steal the returned object ownership to Python. 2010-12-20 17:47:01 -03:00
Hugo Parente Lima
00bfc9ba7b Fix bug#544 - "QtCore.QRect missing binding for method getCoords"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2010-12-20 15:26:00 -02:00
Hugo Parente Lima
d2d9f6bac9 Fix bug#481 - "mimeData() missing from QListWidget, QTreeWidget, QTableWidget"
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-12-20 14:10:09 -02:00
Hugo Parente Lima
499ef3bbb4 Fix bug#558 - "print attribute of a QWebFrame cannot be accessed normally" 2010-12-20 11:18:42 -02:00
Hugo Parente Lima
8545117cff 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>
2010-12-17 19:16:56 -02:00
Hugo Parente Lima
c634b05def Add GLuint as primitive type.
If we don't do that any function with GLuint will be rejected by
the generator on Windows.
2010-12-17 19:16:56 -02:00
Hugo Parente Lima
dd1184ac4d Use .pyd extension for pysidetest module on Windows. 2010-12-17 19:16:56 -02:00
Hugo Parente Lima
3b61f88a1f Fix QML tests on Windows. 2010-12-17 19:16:56 -02:00
Hugo Parente Lima
53e472c5ef Fix compilation under MS Windows. 2010-12-17 19:16:56 -02:00
Marcelo Lira
ca914c9f63 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>
2010-12-17 13:59:51 -03:00
Marcelo Lira
9a4738457d Fixed QML type registering test.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Lauro Moura <lauro.neto@openbossa.org>
2010-12-17 11:39:03 -03:00
Marcelo Lira
d3e5c54d8a 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>
2010-12-17 11:31:37 -03:00
Hugo Parente Lima
97740beab9 Fix bug#491 - "pyside doesn't respect BUILD_TESTS"
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-12-16 15:35:58 -02:00
Marcelo Lira
634cde193e 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>
2010-12-16 14:38:57 -03:00
Marcelo Lira
c53ec3c17e Updated the PySide test related to Python model returning data to C++. 2010-12-15 19:20:56 -03:00
Renato Araujo Oliveira Filho
539b906eb2 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>
2010-12-15 19:06:45 -03:00
Renato Araujo Oliveira Filho
fd9c8c8d76 Created unittest for bug #505.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-12-14 17:44:02 -03:00
Hugo Parente Lima
ffc853c88b 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>
2010-12-14 17:15:06 -02:00
Hugo Parente Lima
44d4d96ec3 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>
2010-12-14 17:00:12 -02:00
Hugo Parente Lima
46bbefb1cc 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>
2010-12-14 16:22:35 -02:00
Hugo Parente Lima
e3796fa3e7 Fix bug#512 - "QGridLayout::getItemPosition() is not available"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2010-12-14 15:28:55 -02:00
Marcelo Lira
6b720050ef 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>
2010-12-13 17:55:54 -03:00
Marcelo Lira
4630f41f6a 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>
2010-12-13 16:00:22 -03:00
Hugo Parente Lima
154560c9c5 Added unit test for bug#500
Reviewer: Lauro Mora <lauro.neto@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-12-13 11:39:24 -02:00
Hugo Parente Lima
e62b0364f1 Add tests for qmlregisterType function and qml list properties.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-12-09 16:19:41 -02:00
Hugo Parente Lima
9b2bf0a267 Changed file permissions to 0644. 2010-12-09 15:28:01 -02:00
Hugo Parente Lima
643742cbcf Add support for QML list properties.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-12-09 14:40:57 -02:00
Hugo Parente Lima
dc732da7a8 Remove unused field "type" from PySideProperty private struct. 2010-12-09 14:40:57 -02:00
Hugo Parente Lima
1422aed616 Replace useless check by a assert.
QMetaObject must already be ready at this point.
2010-12-09 14:40:57 -02:00
Hugo Parente Lima
1464dc1022 Add support for extension into PySide properties.
This is used by PySide implementation of QDeclarativeListProperty.
2010-12-09 14:40:56 -02:00
Hugo Parente Lima
b548a6f173 Fix copyright year. 2010-12-09 14:40:56 -02:00
Marcelo Lira
0a5e353ad0 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>
2010-12-06 17:49:56 -03:00
Marcelo Lira
ed1c4c72b9 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>
2010-12-06 15:33:51 -03:00
Hugo Parente Lima
2d595e22b0 Avoid removal of qmlregistertype.cpp by the build system.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
2010-12-06 15:17:07 -02:00
Hugo Parente Lima
ec0aeb6fce 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>
2010-12-03 19:35:59 -02:00
Hugo Parente Lima
12bc3f5c12 Set the object meta object at the declaration time, not instanciation time. 2010-12-03 19:35:59 -02:00
Hugo Parente Lima
35ab7bf679 Moved pyside slot attr name do pysideslot_p.h. 2010-12-03 19:35:58 -02:00
Hugo Parente Lima
a612c9ee58 PySidePropertyPrivate struct moved to the private header. 2010-12-03 19:35:58 -02:00
Hugo Parente Lima
afe4fcf695 Remove unused ancient proxyslot.cpp file. 2010-12-03 19:35:58 -02:00
Marcelo Lira
d51aacabd1 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>
2010-12-03 10:54:27 -03:00
Marcelo Lira
7ee87cc8f2 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>
2010-12-03 07:54:44 -03:00
Hugo Parente Lima
59b4f2b59d Fixed qt_metacall, now everything works as it should.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
2010-12-02 18:12:24 -02:00
Hugo Parente Lima
e20a97a480 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.
2010-12-01 15:38:16 -02:00
Luciano Wolf
9e26b5f39d Add needed cast to compile using python versions <2.6
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-12-01 11:08:28 -03:00
Hugo Parente Lima
113b8efdaf Fix doc generation after the refactor for v1.0.
Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
2010-11-29 14:48:58 -02:00
Kalev Lember
0d60daf1e1 Fix phonon VideoCaptureDevice detection to properly use phonon_ namespace
Fixes build with phonon 4.4.3 on Fedora rawhide.

Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2010-11-26 18:55:57 -03:00
823 changed files with 20783 additions and 24978 deletions

View file

@ -5,9 +5,10 @@ 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_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Macros/
${CMAKE_MODULE_PATH}) ${CMAKE_MODULE_PATH})
find_package(GeneratorRunner 0.6.3 REQUIRED) find_package(GeneratorRunner 0.6.11 REQUIRED)
find_package(Shiboken 1.0.0 REQUIRED) find_package(Shiboken 1.0.4 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) include(FindQt4Extra)
set(XVFB_EXEC "") set(XVFB_EXEC "")
@ -15,11 +16,12 @@ option(USE_XVFB "Uses xvfb-run with the unit tests to avoid QtGui tests popping
if(USE_XVFB) if(USE_XVFB)
find_program(XVFB_RUN NAMES xvfb-run) find_program(XVFB_RUN NAMES xvfb-run)
if (NOT ${XVFB_RUN} MATCHES "XVFB_RUN-NOTFOUND") if (NOT ${XVFB_RUN} MATCHES "XVFB_RUN-NOTFOUND")
set(XVFB_EXEC ${XVFB_RUN}) set(XVFB_EXEC ${XVFB_RUN} -a)
message(STATUS "Using xvfb-run to perform QtGui tests.") message(STATUS "Using xvfb-run to perform QtGui tests.")
endif() endif()
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) 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)
@ -55,14 +57,23 @@ else()
endif() endif()
if(NOT CMAKE_BUILD_TYPE) if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release) set(CMAKE_BUILD_TYPE ${SHIBOKEN_BUILD_TYPE})
endif() endif()
set(BINDING_NAME PySide) set(BINDING_NAME PySide)
set(BINDING_API_MAJOR_VERSION "1") set(BINDING_API_MAJOR_VERSION "1")
set(BINDING_API_MINOR_VERSION "0") set(BINDING_API_MINOR_VERSION "0")
set(BINDING_API_MICRO_VERSION "0") set(BINDING_API_MICRO_VERSION "4")
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) 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) set(PYSIDE_QT_VERSION "${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}" CACHE STRING "Qt version used to compile PySide" FORCE)
if(ENABLE_VERSION_SUFFIX) if(ENABLE_VERSION_SUFFIX)
set(pyside_SUFFIX "-${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}") set(pyside_SUFFIX "-${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}")
@ -106,11 +117,7 @@ else()
endif() endif()
# Define supported Qt Version # Define supported Qt Version
if(${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} GREATER 6) set(SUPPORTED_QT_VERSION "${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}")
set(SUPPORTED_QT_VERSION 4.7)
else()
set(SUPPORTED_QT_VERSION 4.6)
endif()
set(BINDING_VERSION ${BINDING_API_VERSION}.${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}) set(BINDING_VERSION ${BINDING_API_VERSION}.${QT_VERSION_MAJOR}.${QT_VERSION_MINOR})
@ -122,7 +129,7 @@ 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 pyside-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" &&
@ -145,9 +152,14 @@ if (NOT SITE_PACKAGE)
endif() 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) if(QT_QTUITOOLS_FOUND AND QT_QTDESIGNER_FOUND)
@ -155,7 +167,10 @@ if(QT_QTUITOOLS_FOUND AND QT_QTDESIGNER_FOUND)
endif() endif()
# project directories # project directories
add_subdirectory(PySide) add_subdirectory(PySide)
if (BUILD_TESTS)
enable_testing()
add_subdirectory(tests) add_subdirectory(tests)
endif ()
find_program(DOT_EXEC dot) find_program(DOT_EXEC dot)
if (QT_SRC_DIR AND DOT_EXEC) if (QT_SRC_DIR AND DOT_EXEC)

View file

@ -1,12 +1,10 @@
project(pyside) project(pyside)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/__init__.py" "${CMAKE_CURRENT_BINARY_DIR}/private.py"
DESTINATION "${SITE_PACKAGE}/${BINDING_NAME}${pyside_SUFFIX}")
include(PySideModules) include(PySideModules)
# Configure include based on platform # Configure include based on platform
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/global.h.in" configure_file("${CMAKE_CURRENT_SOURCE_DIR}/global.h.in"
"${CMAKE_CURRENT_BINARY_DIR}/global.h" @ONLY) "${CMAKE_CURRENT_BINARY_DIR}/pyside_global.h" @ONLY)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/__init__.py.in" configure_file("${CMAKE_CURRENT_SOURCE_DIR}/__init__.py.in"
"${CMAKE_CURRENT_BINARY_DIR}/__init__.py" @ONLY) "${CMAKE_CURRENT_BINARY_DIR}/__init__.py" @ONLY)
@ -23,7 +21,9 @@ 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) HAS_QT_MODULE(QT_QTUITOOLS_FOUND QtUiTools)
endif()
HAS_QT_MODULE(QT_QTHELP_FOUND QtHelp) HAS_QT_MODULE(QT_QTHELP_FOUND QtHelp)
HAS_QT_MODULE(QT_QTXMLPATTERNS_FOUND QtXmlPatterns) HAS_QT_MODULE(QT_QTXMLPATTERNS_FOUND QtXmlPatterns)
HAS_QT_MODULE(QT_QTMAEMO5_FOUND QtMaemo5) HAS_QT_MODULE(QT_QTMAEMO5_FOUND QtMaemo5)
@ -34,6 +34,10 @@ HAS_QT_MODULE(QT_PHONON_FOUND phonon)
HAS_QT_MODULE(QT_QTDECLARATIVE_FOUND QtDeclarative) HAS_QT_MODULE(QT_QTDECLARATIVE_FOUND QtDeclarative)
# install # install
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/__init__.py" "${CMAKE_CURRENT_BINARY_DIR}/private.py"
DESTINATION "${SITE_PACKAGE}/${BINDING_NAME}${pyside_SUFFIX}")
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_templates.xml install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_templates.xml
DESTINATION share/PySide${pyside_SUFFIX}/typesystems) 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()
@ -34,7 +36,16 @@ else()
) )
endif() endif()
if(ENABLE_WIN)
set(QtCore_typesystem "typesystem_core_win.xml")
set(QtCore_extra_SRC
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/msg_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/point_wrapper.cpp
)
else()
set(QtCore_typesystem "typesystem_core.xml")
set(QtCore_extra_SRC "")
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
@ -60,7 +71,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}/${BINDING_NAME}/QtCore/qfactoryinterface_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
@ -135,6 +146,7 @@ ${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} ${QtCore_47_SRC}
${QtCore_extra_SRC}
) )
set(QtCore_typesystem_path "") set(QtCore_typesystem_path "")
@ -155,4 +167,5 @@ create_pyside_module(QtCore
"" ""
QtCore_typesystem_path QtCore_typesystem_path
QtCore_SRC QtCore_SRC
"") QtCore_gluecode
${CMAKE_CURRENT_SOURCE_DIR}/${QtCore_typesystem})

View file

@ -0,0 +1,32 @@
namespace Shiboken {
template <>
struct Converter<HWND__>
{
static bool checkType(PyObject* pyObj)
{
return false;
}
static bool isConvertible(PyObject* pyobj)
{
return PyCObject_Check(pyobj);
}
static inline PyObject* toPython(void* cppobj)
{
// not supported
Q_ASSERT(true);
return 0;
}
static PyObject* toPython(HWND__ cppobj)
{
return PyCObject_FromVoidPtr(&cppobj, 0);
}
static HWND__ toCpp(PyObject* pyobj)
{
return *((HWND__*) PyCObject_AsVoidPtr(pyobj));
}
};
}

View file

@ -2,43 +2,23 @@
static int QCoreApplicationArgCount; static int QCoreApplicationArgCount;
static char** QCoreApplicationArgValues; static char** QCoreApplicationArgValues;
int Sbk_QCoreApplication_Init(PyObject* self, PyObject* args, PyObject*) void QCoreApplication_constructor(PyObject* self, PyObject* args, QCoreApplicationWrapper** cptr)
{ {
if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType<QApplication >()))
return -1;
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 (!Shiboken::sequenceToArgcArgv(PyTuple_GET_ITEM(args, 0), &QCoreApplicationArgCount, &QCoreApplicationArgValues, "PySideApp")) { *cptr = new QCoreApplicationWrapper(QCoreApplicationArgCount, QCoreApplicationArgValues);
PyErr_BadArgument();
return -1;
}
SbkObject* sbkSelf = reinterpret_cast<SbkObject*>(self);
QCoreApplicationWrapper* cptr = new QCoreApplicationWrapper(QCoreApplicationArgCount, QCoreApplicationArgValues);
Shiboken::Object::setCppPointer(sbkSelf,
Shiboken::SbkType<QCoreApplication>(),
cptr);
Shiboken::Object::setValidCpp(sbkSelf, true);
Shiboken::Object::setHasCppWrapper(sbkSelf, true);
Shiboken::Object::releaseOwnership(sbkSelf);
Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr);
PySide::Signal::updateSourceObject(self);
cptr->metaObject();
Shiboken::Object::releaseOwnership(reinterpret_cast<SbkObject*>(self));
PySide::registerCleanupFunction(&PySide::destroyQCoreApplication); PySide::registerCleanupFunction(&PySide::destroyQCoreApplication);
Py_INCREF(self); Py_INCREF(self);
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) {
cppResult = Shiboken::Converter<qreal>::toCpp(result);
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,9 +1,21 @@
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(PyObject* callback, QObject** receiver, PyObject** self) static bool getReceiver(PyObject* callback, QObject** receiver, PyObject** self)
{ {
bool forceGlobalReceiver = false;
if (PyMethod_Check(callback)) { if (PyMethod_Check(callback)) {
*self = PyMethod_GET_SELF(callback); *self = PyMethod_GET_SELF(callback);
if (Shiboken::Converter<QObject*>::checkType(*self)) if (Shiboken::Converter<QObject*>::checkType(*self))
*receiver = Shiboken::Converter<QObject*>::toCpp(*self); *receiver = Shiboken::Converter<QObject*>::toCpp(*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 && Shiboken::Converter<QObject*>::checkType(*self)) if (*self && Shiboken::Converter<QObject*>::checkType(*self))
@ -14,7 +26,7 @@ static bool getReceiver(PyObject* callback, QObject** receiver, PyObject** self)
*self = 0; *self = 0;
} }
bool usingGlobalReceiver = !*receiver; bool usingGlobalReceiver = !*receiver || forceGlobalReceiver;
if (usingGlobalReceiver) { if (usingGlobalReceiver) {
PySide::SignalManager& signalManager = PySide::SignalManager::instance(); PySide::SignalManager& signalManager = PySide::SignalManager::instance();
*receiver = signalManager.globalReceiver(); *receiver = signalManager.globalReceiver();

View file

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

View file

@ -0,0 +1,34 @@
namespace Shiboken {
inline bool Converter<QByteArray>::checkType(PyObject* pyObj)
{
return ValueTypeConverter<QByteArray>::checkType(pyObj);
}
inline bool Converter<QByteArray>::isConvertible(PyObject* pyObj)
{
if (ValueTypeConverter<QByteArray>::isConvertible(pyObj))
return true;
SbkObjectType* shiboType = reinterpret_cast<SbkObjectType*>(SbkType< ::QByteArray >());
return Shiboken::Converter<const char *>::checkType(pyObj)
|| (ObjectType::isExternalConvertible(shiboType, pyObj));
}
inline QByteArray Converter<QByteArray>::toCpp(PyObject* pyObj)
{
if (pyObj == Py_None)
return 0;
else if (PyObject_TypeCheck(pyObj, SbkType<QByteArray>()))
return *Converter<QByteArray*>::toCpp(pyObj);
else if (PyString_Check(pyObj))
return QByteArray(PyString_AS_STRING(pyObj), PyString_GET_SIZE(pyObj));
else
return ValueTypeConverter<QByteArray>::toCpp(pyObj);
}
inline PyObject* Converter<QByteArray>::toPython(const ::QByteArray& cppObj)
{
return ValueTypeConverter<QByteArray>::toPython(cppObj);
}
}

View file

@ -1,35 +1,45 @@
namespace Shiboken { namespace Shiboken {
template <>
struct PythonConverter<QDate> inline bool Converter<QDate>::checkType(PyObject* pyObj)
{ {
static bool isPythonConvertible(PyObject* pyObj) return ValueTypeConverter<QDate>::checkType(pyObj);
}
inline PyObject* Converter<QDate>::toPython(const ::QDate& cppObj)
{
return ValueTypeConverter<QDate>::toPython(cppObj);
}
inline bool Converter<QDate>::isConvertible(PyObject* pyObj)
{
if (ValueTypeConverter<QDate>::isConvertible(pyObj))
return true;
if (!PyDateTimeAPI)
PyDateTime_IMPORT;
SbkObjectType* shiboType = reinterpret_cast<SbkObjectType*>(SbkType< ::QDate >());
return PyDate_Check(pyObj) || ObjectType::isExternalConvertible(shiboType, pyObj);
}
inline QDate Converter<QDate>::toCpp(PyObject* pyObj)
{ {
if (!PyDateTimeAPI) if (!PyDateTimeAPI)
PyDateTime_IMPORT; PyDateTime_IMPORT;
return pyObj && PyDate_Check(pyObj); if (pyObj == Py_None) {
return QDate();
} else if (PyObject_TypeCheck(pyObj, SbkType<QDate>())) {
return *Converter<QDate*>::toCpp(pyObj);
} else if (PyDate_Check(pyObj)) {
int day = PyDateTime_GET_DAY(pyObj);
int month = PyDateTime_GET_MONTH(pyObj);
int year = PyDateTime_GET_YEAR(pyObj);
return QDate(year, month, day);
} else {
return ValueTypeConverter<QDate>::toCpp(pyObj);
}
} }
static QDate* transformFromPython(PyObject* obj)
{
if (isPythonConvertible(obj)) {
int day = PyDateTime_GET_DAY(obj);
int month = PyDateTime_GET_MONTH(obj);
int year = PyDateTime_GET_YEAR(obj);
return new QDate(year, month, day);
}
return 0;
}
static PyObject* transformToPython(QDate* d)
{
if (d) {
if (!PyDateTimeAPI)
PyDateTime_IMPORT;
return PyDate_FromDate(d->year(), d->month(), d->day());
}
return 0;
}
};
} }

View file

@ -1,41 +1,49 @@
namespace Shiboken { namespace Shiboken {
template <>
struct PythonConverter<QDateTime> inline bool Converter<QDateTime>::checkType(PyObject* pyObj)
{ {
static bool isPythonConvertible(PyObject* pyObj) return ValueTypeConverter<QDateTime>::checkType(pyObj);
}
inline PyObject* Converter<QDateTime>::toPython(const ::QDateTime& cppObj)
{
return ValueTypeConverter<QDateTime>::toPython(cppObj);
}
inline bool Converter<QDateTime>::isConvertible(PyObject* pyObj)
{
if (ValueTypeConverter<QDateTime>::isConvertible(pyObj))
return true;
if (!PyDateTimeAPI)
PyDateTime_IMPORT;
SbkObjectType* shiboType = reinterpret_cast<SbkObjectType*>(SbkType< ::QDateTime >());
return PyDateTime_Check(pyObj) || ObjectType::isExternalConvertible(shiboType, pyObj);
}
inline QDateTime Converter<QDateTime>::toCpp(PyObject* pyObj)
{ {
if (!PyDateTimeAPI) if (!PyDateTimeAPI)
PyDateTime_IMPORT; PyDateTime_IMPORT;
return pyObj && PyDateTime_Check(pyObj); if (pyObj == Py_None) {
return QDateTime();
} else if (PyObject_TypeCheck(pyObj, SbkType<QDateTime>())) {
return *Converter<QDateTime*>::toCpp(pyObj);
} else if (PyDateTime_Check(pyObj)) {
int day = PyDateTime_GET_DAY(pyObj);
int month = PyDateTime_GET_MONTH(pyObj);
int year = PyDateTime_GET_YEAR(pyObj);
int hour = PyDateTime_DATE_GET_HOUR(pyObj);
int min = PyDateTime_DATE_GET_MINUTE(pyObj);
int sec = PyDateTime_DATE_GET_SECOND(pyObj);
int usec = PyDateTime_DATE_GET_MICROSECOND(pyObj);
return QDateTime(QDate(year, month, day), QTime(hour, min, sec, usec/1000));
} else {
return ValueTypeConverter<QDateTime>::toCpp(pyObj);
}
} }
static QDateTime* transformFromPython(PyObject* obj)
{
if (isPythonConvertible(obj)) {
int day = PyDateTime_GET_DAY(obj);
int month = PyDateTime_GET_MONTH(obj);
int year = PyDateTime_GET_YEAR(obj);
int hour = PyDateTime_DATE_GET_HOUR(obj);
int min = PyDateTime_DATE_GET_MINUTE(obj);
int sec = PyDateTime_DATE_GET_SECOND(obj);
int msec = PyDateTime_DATE_GET_MICROSECOND(obj);
return new QDateTime(QDate(year, month, day), QTime(hour, min, sec, msec));
}
return 0;
}
static PyObject* transformToPython(QDateTime* d)
{
if (d) {
if (!PyDateTimeAPI)
PyDateTime_IMPORT;
QDate date = d->date();
QTime time = d->time();
return PyDateTime_FromDateAndTime(date.year(), date.month(), date.day(), time.hour(), time.minute(), time.second(), time.msec());
}
return 0;
}
};
} }

View file

@ -1,36 +1,45 @@
namespace Shiboken { namespace Shiboken {
template <>
struct PythonConverter<QTime> inline bool Converter<QTime>::checkType(PyObject* pyObj)
{ {
static bool isPythonConvertible(PyObject* pyObj) return ValueTypeConverter<QTime>::checkType(pyObj);
}
inline PyObject* Converter<QTime>::toPython(const ::QTime& cppObj)
{
return ValueTypeConverter<QTime>::toPython(cppObj);
}
inline bool Converter<QTime>::isConvertible(PyObject* pyObj)
{
if (ValueTypeConverter<QTime>::isConvertible(pyObj))
return true;
if (!PyDateTimeAPI)
PyDateTime_IMPORT;
SbkObjectType* shiboType = reinterpret_cast<SbkObjectType*>(SbkType< ::QTime >());
return PyTime_Check(pyObj) || ObjectType::isExternalConvertible(shiboType, pyObj);
}
inline QTime Converter<QTime>::toCpp(PyObject* pyObj)
{ {
if (!PyDateTimeAPI) if (!PyDateTimeAPI)
PyDateTime_IMPORT; PyDateTime_IMPORT;
return pyObj && PyTime_Check(pyObj); if (pyObj == Py_None) {
return QTime();
} else if (PyObject_TypeCheck(pyObj, SbkType<QTime>())) {
return *Converter<QTime*>::toCpp(pyObj);
} else if (PyTime_Check(pyObj)) {
int hour = PyDateTime_TIME_GET_HOUR(pyObj);
int min = PyDateTime_TIME_GET_MINUTE(pyObj);
int sec = PyDateTime_TIME_GET_SECOND(pyObj);
int usec = PyDateTime_TIME_GET_MICROSECOND(pyObj);
return QTime(hour, min, sec, usec/1000);
} else {
return ValueTypeConverter<QTime>::toCpp(pyObj);
}
} }
static QTime* transformFromPython(PyObject* obj)
{
if (isPythonConvertible(obj)) {
int hour = PyDateTime_TIME_GET_HOUR(obj);
int min = PyDateTime_TIME_GET_MINUTE(obj);
int sec = PyDateTime_TIME_GET_SECOND(obj);
int msec = PyDateTime_TIME_GET_MICROSECOND(obj);
return new QTime(hour, min, sec, msec);
}
return 0;
}
static PyObject* transformToPython(QTime* d)
{
if (d) {
if (!PyDateTimeAPI)
PyDateTime_IMPORT;
return PyTime_FromTime(d->hour(), d->minute(), d->second(), d->msec());
}
return 0;
}
};
} }

View file

@ -14,26 +14,28 @@ struct Converter<QVariant>
return true; return true;
} }
static QByteArray resolveMetaType(PyTypeObject* type, int &typeId) static const char* resolveMetaType(PyTypeObject* type, int* typeId)
{ {
if (PyObject_TypeCheck(type, &SbkObjectType_Type)) { if (PyObject_TypeCheck(type, &SbkObjectType_Type)) {
SbkObjectType* sbkType = reinterpret_cast<SbkObjectType*>(type); SbkObjectType* sbkType = reinterpret_cast<SbkObjectType*>(type);
QByteArray typeName(Shiboken::ObjectType::getOriginalName(sbkType)); const char* typeName = Shiboken::ObjectType::getOriginalName(sbkType);
bool valueType = !typeName.endsWith("*"); if (!typeName)
return 0;
bool valueType = '*' != typeName[qstrlen(typeName) - 1];
// Do not convert user type of value // Do not convert user type of value
if (valueType && Shiboken::ObjectType::isUserType(type)) if (valueType && Shiboken::ObjectType::isUserType(type))
return QByteArray(); return 0;
int obTypeId = QMetaType::type(typeName); int obTypeId = QMetaType::type(typeName);
if (obTypeId) { if (obTypeId) {
typeId = obTypeId; *typeId = obTypeId;
return QByteArray(typeName); return typeName;
} }
// Do not resolve types to value type // Do not resolve types to value type
if (valueType) if (valueType)
return QByteArray(); return 0;
// find in base types // find in base types
if (type->tp_base) { if (type->tp_base) {
@ -41,14 +43,14 @@ struct Converter<QVariant>
} else if (type->tp_bases) { } else if (type->tp_bases) {
int size = PyTuple_GET_SIZE(type->tp_bases); int size = PyTuple_GET_SIZE(type->tp_bases);
for(int i=0; i < size; i++){ for(int i=0; i < size; i++){
QByteArray derivedName = resolveMetaType(reinterpret_cast<PyTypeObject*>(PyTuple_GET_ITEM(type->tp_bases, i)), typeId); const char* derivedName = resolveMetaType(reinterpret_cast<PyTypeObject*>(PyTuple_GET_ITEM(type->tp_bases, i)), typeId);
if (!derivedName.isEmpty()) if (derivedName)
return derivedName; return derivedName;
} }
} }
} }
typeId = 0; *typeId = 0;
return QByteArray(); return 0;
} }
static QVariant toCpp(PyObject* pyObj) static QVariant toCpp(PyObject* pyObj)
@ -80,35 +82,31 @@ struct Converter<QVariant>
} else if (Shiboken::isShibokenEnum(pyObj)) { } else if (Shiboken::isShibokenEnum(pyObj)) {
// QVariant(enum) // QVariant(enum)
return QVariant(Converter<int>::toCpp(pyObj)); return QVariant(Converter<int>::toCpp(pyObj));
} else if (PyDict_Check(pyObj)) { } else if (Shiboken::Object::checkType(pyObj)) {
return convertToVariantMap(pyObj); // a class supported by QVariant?
int typeCode;
const char* typeName = resolveMetaType(pyObj->ob_type, &typeCode);
if (typeCode && typeName) {
Shiboken::TypeResolver* tr = Shiboken::TypeResolver::get(typeName);
QVariant var(typeCode, (void*)0);
void* args[] = { var.data() };
tr->toCpp(pyObj, args);
return var;
}
}
//sequence and dictornay
if (PyDict_Check(pyObj)) {
QVariant ret = convertToVariantMap(pyObj);
if (ret.isValid())
return ret;
} else if (PySequence_Check(pyObj)) { } else if (PySequence_Check(pyObj)) {
return convertToVariantList(pyObj); return convertToVariantList(pyObj);
} else {
// a class supported by QVariant?
if (Shiboken::Object::checkType(pyObj)) {
SbkObjectType* objType = reinterpret_cast<SbkObjectType*>(pyObj->ob_type);
int typeCode = 0;
QByteArray typeName = resolveMetaType(reinterpret_cast<PyTypeObject*>(objType), typeCode);
if (typeCode) {
Shiboken::TypeResolver* tr = Shiboken::TypeResolver::get(typeName);
void* data = 0;
data = tr->toCpp(pyObj, &data, true);
if (typeName.endsWith("*")) {
QVariant var(typeCode, &data);
tr->deleteObject(data);
return var;
} else {
QVariant var(typeCode, data);
tr->deleteObject(data);
return var;
}
}
} }
// Is a shiboken type not known by Qt // Is a shiboken type not known by Qt
return QVariant::fromValue<PySide::PyObjectWrapper>(pyObj); return QVariant::fromValue<PySide::PyObjectWrapper>(pyObj);
} }
}
static PyObject* toPython(void* cppObj) static PyObject* toPython(void* cppObj)
{ {
@ -140,28 +138,25 @@ struct Converter<QVariant>
return QVariant(); return QVariant();
Shiboken::AutoDecRef element(PySequence_GetItem(list, 0)); Shiboken::AutoDecRef element(PySequence_GetItem(list, 0));
int typeId = 0; int typeId;
QByteArray typeName = resolveMetaType(element.cast<PyTypeObject*>(), typeId); const char* typeName = resolveMetaType(element.cast<PyTypeObject*>(), &typeId);
if (!typeName.isEmpty()) { if (typeName) {
QByteArray listTypeName = QByteArray("QList<"+typeName+">"); QByteArray listTypeName("QList<");
listTypeName += typeName;
listTypeName += '>';
typeId = QMetaType::type(listTypeName); typeId = QMetaType::type(listTypeName);
if (typeId > 0) { if (typeId > 0) {
Shiboken::TypeResolver* tr = Shiboken::TypeResolver::get(listTypeName); Shiboken::TypeResolver* tr = Shiboken::TypeResolver::get(listTypeName);
if (!tr) { if (!tr) {
qWarning() << "TypeResolver for :" << listTypeName << "not registered."; qWarning() << "TypeResolver for :" << listTypeName << "not registered.";
return QVariant();
} else { } else {
void *data = 0; QVariant var(typeId, (void*)0);
data = tr->toCpp(list, &data, true); void* args[] = { var.data(), 0 };
QVariant var(typeId, data); tr->toCpp(list, args);
tr->deleteObject(data);
return var; return var;
} }
} else {
return QVariant();
} }
} }
return QVariant(); return QVariant();
} }
@ -177,7 +172,7 @@ struct Converter<QVariant>
ret.insert(Converter<QString>::toCpp(key), toCpp(value)); ret.insert(Converter<QString>::toCpp(key), toCpp(value));
return QVariant(ret); return QVariant(ret);
} else { } else {
return toCpp(map); return QVariant();
} }
} }

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,35 @@
<?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="HWND__">
<conversion-rule file="glue/hwnd_conversions.h"/>
</primitive-type>
<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'"/>
<load-typesystem name="typesystem_core.xml" generate="yes"/>
</typesystem>

View file

@ -1,5 +1,7 @@
project(QtDeclarative) project(QtDeclarative)
set(QtDeclarative_registerType "${CMAKE_CURRENT_SOURCE_DIR}/pysideqmlregistertype.cpp")
set(QtDeclarative_SRC set(QtDeclarative_SRC
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativecomponent_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativecomponent_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativecontext_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativecontext_wrapper.cpp
@ -56,5 +58,5 @@ create_pyside_module(QtDeclarative
QtDeclarative_deps QtDeclarative_deps
QtDeclarative_typesystem_path QtDeclarative_typesystem_path
QtDeclarative_SRC QtDeclarative_SRC
"") QtDeclarative_registerType)

View file

@ -0,0 +1,339 @@
/*
* 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*);
/// QDeclarativeItem will create objects using placement new then this pointer is non-null.
void* PySide::nextQmlElementMemoryAddr = 0;
// Mutex used to avoid race condition on PySide::nextQmlElementMemoryAddr
static QMutex nextQmlElementMutex;
template<int N>
struct ElementFactoryBase
{
static void createInto(void* memory)
{
QMutexLocker locker(&nextQmlElementMutex);
PySide::nextQmlElementMemoryAddr = memory;
Shiboken::GilState state;
PyObject* obj = PyObject_CallObject(pyTypes[N], 0);
if (!obj || PyErr_Occurred())
PyErr_Print();
PySide::nextQmlElementMemoryAddr = 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* declarativeItemType = TypeResolver::get("QDeclarativeItem*")->pythonType();
assert(declarativeItemType);
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*)declarativeItemType)) {
PyErr_Format(PyExc_TypeError, "A type inherited from %s expected, got %s.", declarativeItemType->tp_name, ((PyTypeObject*)pyObj)->tp_name);
return -1;
}
QMetaObject* metaObject = reinterpret_cast<QMetaObject*>(ObjectType::getTypeUserData(reinterpret_cast<SbkObjectType*>(pyObj)));
Q_ASSERT(metaObject);
// All ready... now the ugly code begins... :-)
pyTypes[nextType] = pyObj;
// Init proxy object static meta object
QDeclarativePrivate::RegisterType type;
type.version = 0;
type.typeId = qMetaTypeId<QDeclarativeItem*>();
type.listId = qMetaTypeId<QDeclarativeListProperty<QDeclarativeItem> >();
type.objectSize = sizeof(QDeclarativeItemWrapper);
type.create = createFuncs[nextType];
type.uri = uri;
type.versionMajor = versionMajor;
type.versionMinor = versionMinor;
type.elementName = qmlName;
type.metaObject = metaObject;
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();
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
pySelf->ob_type->tp_base->tp_free(self);
}
PyTypeObject PropertyListType = {
PyObject_HEAD_INIT(0)
0, /*ob_size*/
"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(Shiboken::makeTuple(propList->object, 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(Shiboken::makeTuple(propList->object));
DeclarativeListProperty* data = reinterpret_cast<DeclarativeListProperty*>(propList->data);
Shiboken::AutoDecRef retVal(PyObject_CallObject(data->count, args));
// Check return type
if (PyErr_Occurred())
PyErr_Print();
else if (Shiboken::Converter<int>::isConvertible(retVal))
return Shiboken::Converter<int>::toCpp(retVal);
return 0;
}
// Implementation of QDeclarativeListProperty<T>::AtFunction callback
QDeclarativeItem* propListAt(QDeclarativeListProperty<QDeclarativeItem>* propList, int index)
{
Shiboken::GilState state;
Shiboken::AutoDecRef args(Shiboken::makeTuple(propList->object, index));
DeclarativeListProperty* data = reinterpret_cast<DeclarativeListProperty*>(propList->data);
Shiboken::AutoDecRef retVal(PyObject_CallObject(data->at, args));
if (PyErr_Occurred())
PyErr_Print();
else if (PyType_IsSubtype(Py_TYPE(retVal), data->type))
return Shiboken::Converter<QDeclarativeItem*>::toCpp(retVal);
return 0;
}
// Implementation of QDeclarativeListProperty<T>::ClearFunction callback
void propListClear(QDeclarativeListProperty<QDeclarativeItem>* propList)
{
Shiboken::GilState state;
Shiboken::AutoDecRef args(Shiboken::makeTuple(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));
QDeclarativeListProperty<QDeclarativeItem> declProp(Shiboken::Converter<QObject*>::toCpp(self), 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

@ -23,30 +23,69 @@
<load-typesystem name="typesystem_network.xml" generate="no"/> <load-typesystem name="typesystem_network.xml" generate="no"/>
<load-typesystem name="typesystem_gui.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">
%PYARG_0 = %CONVERTTOPYTHON[int](PySide::qmlRegisterType(%1, %2, %3, %4, %5));
</inject-code>
</add-function>
<enum-type identified-by-value="QML_HAS_ATTACHED_PROPERTIES" since="4.7"> <enum-type identified-by-value="QML_HAS_ATTACHED_PROPERTIES" since="4.7">
<extra-includes> <extra-includes>
<include file-name="QtDeclarative" location="global"/> <include file-name="QtDeclarative" location="global"/>
<!-- FIXME The include tag doesn't work on modules -->
<include file-name="pysideqmlregistertype.h" location="local"/>
</extra-includes> </extra-includes>
</enum-type> </enum-type>
<inject-code> <inject-code class="target" position="end">
Shiboken::TypeResolver::createValueTypeResolver&lt; QList&lt;QObject*&gt; &gt;("QList&lt;QObject*&gt;"); Shiboken::TypeResolver::createValueTypeResolver&lt; QList&lt;QObject*&gt; &gt;("QList&lt;QObject*&gt;");
PySide::initQmlSupport(module);
</inject-code> </inject-code>
<object-type name="QDeclarativeExtensionInterface"/> <object-type name="QDeclarativeExtensionInterface"/>
<object-type name="QDeclarativeComponent"> <object-type name="QDeclarativeComponent">
<enum-type name="Status"/> <enum-type name="Status"/>
<!-- This ctor isn't part of Qt public API -->
<modify-function signature="QDeclarativeComponent(QObject*)" remove="all" />
</object-type> </object-type>
<object-type name="QDeclarativeContext"> <object-type name="QDeclarativeContext">
<modify-function signature="setContextProperty(const QString &amp;, QObject*)"> <modify-function signature="setContextProperty(const QString &amp;, QObject*)">
<modify-argument index="2"> <inject-code class="target" position="end">
<reference-count action="add"/> QByteArray key("%FUNCTION_NAME_");
</modify-argument> key.append(%1.toLocal8Bit());
Shiboken::Object::keepReference(reinterpret_cast&lt;SbkObject*&gt;(%PYSELF), key.constData(), %PYARG_2);
</inject-code>
</modify-function> </modify-function>
</object-type> </object-type>
<object-type name="QDeclarativeEngine"> <object-type name="QDeclarativeEngine">
<enum-type name="ObjectOwnership" /> <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-function signature="setNetworkAccessManagerFactory(QDeclarativeNetworkAccessManagerFactory*)">
<modify-argument index="1"> <modify-argument index="1">
<parent index="this" action="add" /> <parent index="this" action="add" />
@ -59,8 +98,19 @@
<object-type name="QDeclarativeImageProvider"> <object-type name="QDeclarativeImageProvider">
<enum-type name="ImageType" /> <enum-type name="ImageType" />
</object-type> </object-type>
<object-type name="QDeclarativeItem"> <object-type name="QDeclarativeItem" polymorphic-id-expression="qgraphicsitem_cast&lt;QDeclarativeItem*>(%1)">
<extra-includes>
<include file-name="pysideqmlregistertype.h" location="local"/>
</extra-includes>
<enum-type name="TransformOrigin" /> <enum-type name="TransformOrigin" />
<modify-function signature="QDeclarativeItem(QDeclarativeItem*)">
<inject-code class="target">
if (PySide::nextQmlElementMemoryAddr)
%0 = new (PySide::nextQmlElementMemoryAddr) ::QDeclarativePrivate::QDeclarativeElement&lt;%TYPE>();
else
%0 = new %TYPE(%1);
</inject-code>
</modify-function>
</object-type> </object-type>
<value-type name="QDeclarativeListReference" /> <value-type name="QDeclarativeListReference" />
@ -78,7 +128,20 @@
<enum-type name="Type" /> <enum-type name="Type" />
</value-type> </value-type>
<object-type name="QDeclarativePropertyMap" /> <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" /> <object-type name="QDeclarativePropertyValueSource" />
<value-type name="QDeclarativeScriptString" /> <value-type name="QDeclarativeScriptString" />
<object-type name="QDeclarativeView"> <object-type name="QDeclarativeView">

View file

@ -17,7 +17,7 @@ endif()
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
@ -60,6 +60,23 @@ else()
) )
endif () 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") qt4_wrap_cpp(QPYTEXTOBJECT_MOC "${pyside_SOURCE_DIR}/qpytextobject.h")
set(QtGui_SRC set(QtGui_SRC
@ -225,6 +242,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
@ -378,28 +396,14 @@ ${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_OPTIONAL_SRC}
) )
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/typesystem_gui.xml.in" configure_file("${CMAKE_CURRENT_SOURCE_DIR}/typesystem_gui.xml.in"
"${CMAKE_CURRENT_BINARY_DIR}/typesystem_gui.xml" @ONLY) "${CMAKE_CURRENT_BINARY_DIR}/typesystem_gui.xml" @ONLY)
check_qt_class(QtGui QGtkStyle QtGui_SRC)
check_qt_class(QtGui QSessionManager QtGui_SRC)
check_qt_class(QtGui QSizeGrip QtGui_SRC)
check_qt_class(QtGui QSystemTrayIcon QtGui_SRC)
check_qt_class(QtGui QAbstractPageSetupDialog QtGui_SRC)
check_qt_class(QtGui QAbstractPrintDialog QtGui_SRC)
check_qt_class(QtGui QPageSetupDialog QtGui_SRC)
check_qt_class(QtGui QPrintDialog QtGui_SRC)
check_qt_class(QtGui QPrintPreviewWidget QtGui_SRC)
check_qt_class(QtGui QPrintPreviewDialog QtGui_SRC)
check_qt_class(QtGui QPrinter QtGui_SRC)
check_qt_class(QtGui QPrinterInfo QtGui_SRC)
check_qt_class(QtGui QPrintEngine QtGui_SRC)
set(QtGui_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}") set(QtGui_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}")
set(QtGui_include_dirs ${CMAKE_CURRENT_SOURCE_DIR} set(QtGui_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/
@ -421,8 +425,7 @@ create_pyside_module(QtGui
QtGui_deps QtGui_deps
QtGui_typesystem_path QtGui_typesystem_path
QtGui_SRC QtGui_SRC
"${CMAKE_CURRENT_BINARY_DIR}/typesystem_gui.xml" ""
QPYTEXTOBJECT_MOC) ${CMAKE_CURRENT_BINARY_DIR}/typesystem_gui.xml)
install(FILES ${pyside_SOURCE_DIR}/qpytextobject.h DESTINATION include/PySide/QtGui/) install(FILES ${pyside_SOURCE_DIR}/qpytextobject.h DESTINATION include/PySide/QtGui/)

View file

@ -5,39 +5,18 @@ static int QApplicationArgCount;
static char** QApplicationArgValues; static char** QApplicationArgValues;
static const char QAPP_MACRO[] = "qApp"; static const char QAPP_MACRO[] = "qApp";
int Sbk_QApplication_Init(PyObject* self, PyObject* args, PyObject*) bool QApplicationConstructorStart(PyObject* argv)
{ {
if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType<QApplication>()))
return -1;
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;
} }
if (!Shiboken::sequenceToArgcArgv(PyTuple_GET_ITEM(args, 0), &QApplicationArgCount, &QApplicationArgValues, "PySideApp")) { void QApplicationConstructorEnd(PyObject* self)
PyErr_BadArgument(); {
return -1;
}
SbkObject* sbkSelf = reinterpret_cast<SbkObject*>(self);
QApplicationWrapper* cptr = new QApplicationWrapper(QApplicationArgCount, QApplicationArgValues);
Shiboken::Object::setCppPointer(sbkSelf,
Shiboken::SbkType<QApplication>(),
cptr);
Shiboken::Object::setValidCpp(sbkSelf, true);
Shiboken::Object::setHasCppWrapper(sbkSelf, true);
Shiboken::Object::releaseOwnership(sbkSelf);
Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr);
PySide::Signal::updateSourceObject(self);
cptr->metaObject();
// Verify if qApp is in main module // Verify if qApp is in main module
PyObject* globalsDict = PyEval_GetGlobals(); PyObject* globalsDict = PyEval_GetGlobals();
if (globalsDict) { if (globalsDict) {
@ -49,5 +28,23 @@ int Sbk_QApplication_Init(PyObject* self, PyObject* args, PyObject*)
PyObject_SetAttrString(moduleQtGui, QAPP_MACRO, self); PyObject_SetAttrString(moduleQtGui, QAPP_MACRO, self);
PySide::registerCleanupFunction(&PySide::destroyQCoreApplication); PySide::registerCleanupFunction(&PySide::destroyQCoreApplication);
Py_INCREF(self); Py_INCREF(self);
return 1; }
static void QApplicationConstructor(PyObject* self, PyObject* argv, QApplicationWrapper** cptr)
{
if (QApplicationConstructorStart(argv)) {
*cptr = new QApplicationWrapper(QApplicationArgCount, QApplicationArgValues);
Shiboken::Object::releaseOwnership(reinterpret_cast<SbkObject*>(self));
QApplicationConstructorEnd(self);
}
}
template <typename T>
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

@ -40,7 +40,7 @@ inline void addLayoutOwnership(QLayout* layout, QLayout* other)
for (int i=0, i_max=other->count(); i < i_max; i++) { for (int i=0, i_max=other->count(); i < i_max; i++) {
QLayoutItem* item = other->itemAt(i); QLayoutItem* item = other->itemAt(i);
if (PyErr_Occurred()) if (PyErr_Occurred() || !item)
return; return;
addLayoutOwnership(layout, item); addLayoutOwnership(layout, item);

View file

@ -1,4 +1,10 @@
// Init qApp macro to None. // Init qApp macro to None.
if (qApp) {
PyObject* pyApp = Shiboken::Converter<QApplication*>::toPython(qApp);
Py_INCREF(pyApp);
PyModule_AddObject(module, "qApp", pyApp);
} else {
Py_INCREF(Py_None); Py_INCREF(Py_None);
PyModule_AddObject(module, "qApp", Py_None); PyModule_AddObject(module, "qApp", Py_None);
}
moduleQtGui = module; moduleQtGui = module;

View file

@ -14,7 +14,7 @@ static inline void qwidgetReparentLayout(QWidget *parent, QLayout *layout)
for (int i=0; i < layout->count(); i++) { for (int i=0; i < layout->count(); i++) {
QLayoutItem* item = layout->itemAt(i); QLayoutItem* item = layout->itemAt(i);
if (PyErr_Occurred()) if (PyErr_Occurred() || !item)
return; return;
QWidget* w = item->widget(); QWidget* w = item->widget();

File diff suppressed because it is too large Load diff

View file

@ -23,6 +23,10 @@
<rejection class="*" function-name="macMenu"/> <rejection class="*" function-name="macMenu"/>
<primitive-type name="Qt::HANDLE" target-lang-api-name="PyObject"/> <primitive-type name="Qt::HANDLE" target-lang-api-name="PyObject"/>
<object-type name="QMacStyle" >
<enum-type name="FocusRectPolicy"/>
<enum-type name="WidgetSizePolicy"/>
</object-type>
<suppress-warning text="enum 'QPixmap::ShareMode' does not have a type entry or is not an enum" /> <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="enum 'QSysInfo::Endian' is specified in typesystem, but not declared" />

View file

@ -23,8 +23,10 @@
<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">
<!-- ### Both methods return void pointers, for which particular cases no handling was discussed. -->
<modify-function signature="visual()const" remove="all"/> <modify-function signature="visual()const" remove="all"/>
<modify-function signature="appVisual(int)" remove="all"/> <modify-function signature="appVisual(int)" remove="all"/>
<!-- ### -->
</value-type> </value-type>
<object-type name="QX11EmbedContainer"> <object-type name="QX11EmbedContainer">
<enum-type name="Error"/> <enum-type name="Error"/>

View file

@ -11,7 +11,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/${BINDING_NAME}/QtMaemo5/qmaemo5valuebutton_wrapper.
${CMAKE_CURRENT_BINARY_DIR}/${BINDING_NAME}/QtMaemo5/qtmaemo5_module_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/${BINDING_NAME}/QtMaemo5/qtmaemo5_module_wrapper.cpp
) )
set(QtMaemo5_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtMaemo5_SOURCE_DIR}") set(QtMaemo5_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtMaemo5_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}")
# QT_QTMAEMO5_* variables are not defined by CMake # QT_QTMAEMO5_* variables are not defined by CMake
if(NOT QT_QTMAEMO5_INCLUDE_DIR) if(NOT QT_QTMAEMO5_INCLUDE_DIR)

View file

@ -47,7 +47,7 @@
<object-type name="QMaemo5InformationBox"> <object-type name="QMaemo5InformationBox">
<modify-function signature="setWidget(QWidget*)"> <modify-function signature="setWidget(QWidget*)">
<modify-argument index="1"> <modify-argument index="1">
<reference-count action="add"/> <reference-count action="set"/>
</modify-argument> </modify-argument>
</modify-function> </modify-function>
<modify-function signature="paintEvent(QPaintEvent*)"> <modify-function signature="paintEvent(QPaintEvent*)">
@ -61,7 +61,7 @@
<object-type name="QMaemo5ListPickSelector"> <object-type name="QMaemo5ListPickSelector">
<modify-function signature="setModel(QAbstractItemModel*)"> <modify-function signature="setModel(QAbstractItemModel*)">
<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

@ -10,6 +10,15 @@ else()
set(QtNetwork_47_SRC ) set(QtNetwork_47_SRC )
endif () endif ()
set(QtNetwork_OPTIONAL_SRC )
set(QtNetwork_DROPPED_ENTRIES )
check_qt_class(QtNetwork QSslCertificate QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
check_qt_class(QtNetwork QSslCipher QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
check_qt_class(QtNetwork QSslConfiguration QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
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/qabstractnetworkcache_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qabstractsocket_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qabstractsocket_wrapper.cpp
@ -32,6 +41,8 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkcookiejar_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkdiskcache_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/qssl_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qssl_wrapper.cpp
@ -42,14 +53,9 @@ ${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
${QtNetwork_47_SRC} ${QtNetwork_47_SRC}
${QtNetwork_OPTIONAL_SRC}
) )
check_qt_class(QtNetwork QSslCipher QtNetwork_SRC)
check_qt_class(QtNetwork QSslConfiguration QtNetwork_SRC)
check_qt_class(QtNetwork QSslError QtNetwork_SRC)
check_qt_class(QtNetwork QSslKey QtNetwork_SRC)
check_qt_class(QtNetwork QSslSocket QtNetwork_SRC)
set(QtNetwork_typesystem_path "${QtCore_SOURCE_DIR}") set(QtNetwork_typesystem_path "${QtCore_SOURCE_DIR}")
set(QtNetwork_include_dirs ${CMAKE_CURRENT_SOURCE_DIR} set(QtNetwork_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/
@ -72,4 +78,6 @@ create_pyside_module(QtNetwork
QtNetwork_deps QtNetwork_deps
QtNetwork_typesystem_path QtNetwork_typesystem_path
QtNetwork_SRC QtNetwork_SRC
"") ""
""
QtNetwork_DROPPED_ENTRIES)

View file

@ -33,12 +33,11 @@
</namespace-type> </namespace-type>
<rejection class="QIPv6Address" field-name="c"/> <rejection class="QIPv6Address" field-name="c"/>
<rejection class="QSslCertificate"/>
<object-type name="QAbstractSocket"> <object-type name="QAbstractSocket">
<enum-type name="NetworkLayerProtocol"/> <enum-type name="NetworkLayerProtocol"/>
<enum-type name="SocketError"/> <enum-type name="SocketError"/>
<enum-type name="SocketOption"/> <enum-type name="SocketOption" since="4.6"/>
<enum-type name="SocketState"/> <enum-type name="SocketState"/>
<enum-type name="SocketType"/> <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" />
@ -93,7 +92,6 @@
<include file-name="autoarraypointer.h" location="global"/> <include file-name="autoarraypointer.h" location="global"/>
</extra-includes> </extra-includes>
<modify-function signature="closeConnection()" remove="all"/>
<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">
@ -106,6 +104,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">
@ -127,7 +128,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="QUdpSocket::BindMode"/> <enum-type name="BindFlag" flags="BindMode"/>
<extra-includes> <extra-includes>
<include file-name="autoarraypointer.h" location="global"/> <include file-name="autoarraypointer.h" location="global"/>
</extra-includes> </extra-includes>
@ -149,13 +150,13 @@
</modify-argument> </modify-argument>
<inject-code class="target" position="beginning" file="glue/qudpsocket_read_datagram_glue.cpp"/> <inject-code class="target" position="beginning" file="glue/qudpsocket_read_datagram_glue.cpp"/>
</modify-function> </modify-function>
<modify-function signature="writeDatagram(const char*,qint64,const QHostAddress&amp;,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="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 -->
@ -190,7 +191,7 @@
<modify-function signature="post(const QNetworkRequest &amp;, const QByteArray &amp;)" 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;, QIODevice *)" allow-thread="yes"/>
<modify-function signature="put(const QNetworkRequest &amp;, const QByteArray &amp;)" 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"/> <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++"/>
@ -204,7 +205,9 @@
<value-type name="QHostAddress" hash-function="qHash"> <value-type name="QHostAddress" hash-function="qHash">
<enum-type name="SpecialAddress"/> <enum-type name="SpecialAddress"/>
<!-- ### QHostAddress(QIPv6Address) does this -->
<modify-function signature="QHostAddress(quint8*)" remove="all" /> <modify-function signature="QHostAddress(quint8*)" remove="all" />
<!-- ### -->
</value-type> </value-type>
<value-type name="QHostInfo"> <value-type name="QHostInfo">
@ -219,21 +222,62 @@
<value-type name="QNetworkAddressEntry" /> <value-type name="QNetworkAddressEntry" />
<value-type name="QNetworkInterface"> <value-type name="QNetworkInterface">
<enum-type name="InterfaceFlag" flags="QNetworkInterface::InterfaceFlags"/> <enum-type name="InterfaceFlag" flags="InterfaceFlags"/>
</value-type> </value-type>
<value-type name="QNetworkProxy"> <value-type name="QNetworkProxy">
<enum-type name="Capability"/> <enum-type name="Capability" flags="Capabilities" />
<enum-type name="ProxyType"/> <enum-type name="ProxyType"/>
</value-type> </value-type>
<object-type name="QNetworkProxyFactory" />
<value-type name="QNetworkProxyQuery">
<enum-type name="QueryType" />
</value-type>
<value-type name="QUrlInfo"> <value-type name="QUrlInfo">
<enum-type name="PermissionSpec"/> <enum-type name="PermissionSpec"/>
</value-type> </value-type>
<value-type name="QIPv6Address"> <value-type name="QIPv6Address">
<modify-function signature="operator[](int)const" remove="all" /> <add-function signature="__len__">
<modify-function signature="operator[](int)" remove="all" /> <inject-code class="target" position="beginning">
return 16;
</inject-code>
</add-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);
return %CONVERTTOPYTHON[uint](%CPPSELF->c[_i]);
</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);
%CPPSELF->c[_i] = %CONVERTTOCPP[quint8](_value);
return 0;
</inject-code>
</add-function>
</value-type> </value-type>
<value-type name="QAuthenticator" /> <value-type name="QAuthenticator" />
@ -251,37 +295,20 @@
<enum-type name="KnownHeaders"/> <enum-type name="KnownHeaders"/>
</value-type> </value-type>
<value-type name="QSslCipher"/>
<value-type name="QSslError">
<enum-type name="SslError"/>
</value-type>
<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"/>
--> -->
<enum-type name="QSslCertificate::SubjectInfo"/> <enum-type name="QSslCertificate::SubjectInfo"/>
<value-type name="QSslConfiguration"/>
<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>
<!-- Qt 4.7 --> <!-- Qt 4.7 -->
<value-type name="QNetworkConfiguration" since="4.7"> <value-type name="QNetworkConfiguration" since="4.7">
<enum-type name="BearerType" /> <enum-type name="BearerType" />
<enum-type name="Purpose" since="4.7"/> <enum-type name="Purpose" since="4.7"/>
<enum-type name="StateFlag" flags="QNetworkConfiguration::StateFlags" since="4.7"/> <enum-type name="StateFlag" flags="StateFlags" since="4.7"/>
<enum-type name="Type" since="4.7"/> <enum-type name="Type" since="4.7"/>
</value-type> </value-type>
<object-type name="QNetworkConfigurationManager" since="4.7"> <object-type name="QNetworkConfigurationManager" since="4.7">
<enum-type name="Capability" flags="QNetworkConfigurationManager::Capabilities" since="4.7"/> <enum-type name="Capability" flags="Capabilities" since="4.7"/>
</object-type> </object-type>
<object-type name="QNetworkSession" since="4.7"> <object-type name="QNetworkSession" since="4.7">
<enum-type name="SessionError" since="4.7"/> <enum-type name="SessionError" since="4.7"/>
@ -293,4 +320,23 @@
<value-type name="QNetworkCacheMetaData"/> <value-type name="QNetworkCacheMetaData"/>
<suppress-warning text="Shadowing: QAbstractSocket::*"/> <suppress-warning text="Shadowing: QAbstractSocket::*"/>
<!-- 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

@ -22,11 +22,10 @@
<load-typesystem name="typesystem_gui.xml" generate="no" /> <load-typesystem name="typesystem_gui.xml" generate="no" />
<rejection class="QGLColormap::QGLColormapData"/> <rejection class="QGLColormap::QGLColormapData"/>
<rejection class="QGLWidget" function-name="setMouseTracking"/>
<rejection class="QGLContext" field-name="currentCtx"/> <rejection class="QGLContext" field-name="currentCtx"/>
<namespace-type name="QGL"> <namespace-type name="QGL">
<enum-type name="FormatOption" flags="QGL::FormatOptions" force-integer="yes"/> <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>
@ -40,11 +39,12 @@
<value-type name="QGLFormat"> <value-type name="QGLFormat">
<enum-type name="OpenGLContextProfile" since="4.7"/> <enum-type name="OpenGLContextProfile" since="4.7"/>
<enum-type name="OpenGLVersionFlag" flags="QGLFormat::OpenGLVersionFlags"/> <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="QGLContext::BindOptions"/> <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>
@ -52,16 +52,10 @@
<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>
<object-type name="QGLFramebufferObject"> <object-type name="QGLFramebufferObject">
<enum-type name="Attachment"/> <enum-type name="Attachment"/>
@ -84,24 +78,28 @@
<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">
<enum-type name="ShaderTypeBit" flags="QGLShader::ShaderType"/> <enum-type name="ShaderTypeBit" flags="ShaderType"/>
</object-type> </object-type>
<object-type name="QGLShaderProgram"> <object-type name="QGLShaderProgram" since="4.6">
<!-- use QMatrixZxY overloads --> <!-- ### Use QMatrixZxY overloads -->
<modify-function signature="setUniformValue(int, Array)" remove="all" /> <modify-function signature="setUniformValue(int, Array)" remove="all" />
<modify-function signature="setUniformValue(const char*, 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(int,const float*,int,int)" remove="all" />
<modify-function signature="setAttributeValue(const char*,const float*,int,int)" remove="all" /> <modify-function signature="setAttributeValue(const char*,const float*,int,int)" remove="all" />
<modify-function signature="setAttributeArray(int, uint, const void*, int, int)" remove="all" since="4.7" /> <modify-function signature="setAttributeArray(int, uint, const void*, int, int)" remove="all" since="4.7" />
<modify-function signature="setAttributeArray(const char*, uint, const void*, int, int)" remove="all" since="4.7" /> <modify-function signature="setAttributeArray(const char*, uint, const void*, int, int)" remove="all" since="4.7" />
<!-- ### -->
</object-type> </object-type>
<!-- Qt 4.7 --> <!-- Qt 4.7 -->
@ -124,12 +122,18 @@
</inject-code> </inject-code>
</modify-function> </modify-function>
<modify-function signature="map(QGLBuffer::Access)"> <modify-function signature="map(QGLBuffer::Access)">
<inject-code class="target" position="beginning"> <inject-code>
Py_ssize_t dataSize = %CPPSELF.size();
void* data = %CPPSELF.map(%1); void* data = %CPPSELF.map(%1);
QByteArray ret;
if (data) if (!data) {
ret.append((const char*)data, %CPPSELF.size()); Py_INCREF(Py_None);
%PYARG_0 = %CONVERTTOPYTHON[QByteArray](ret); %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> </inject-code>
</modify-function> </modify-function>
<modify-function signature="read(int, void*, int)"> <modify-function signature="read(int, void*, int)">

View file

@ -38,16 +38,16 @@
<enum-type name="Extension"/> <enum-type name="Extension"/>
</object-type> </object-type>
<object-type name="QScriptEngine"> <object-type name="QScriptEngine">
<enum-type name="QObjectWrapOption" flags="QScriptEngine::QObjectWrapOptions"/> <enum-type name="QObjectWrapOption" flags="QObjectWrapOptions"/>
<enum-type name="ValueOwnership"/> <enum-type name="ValueOwnership"/>
</object-type> </object-type>
<object-type name="QScriptExtensionInterface"/> <object-type name="QScriptExtensionInterface"/>
<object-type name="QScriptExtensionPlugin"/> <object-type name="QScriptExtensionPlugin"/>
<value-type name="QScriptProgram"/> <value-type name="QScriptProgram" since="4.7"/>
<value-type name="QScriptString"/> <value-type name="QScriptString"/>
<value-type name="QScriptValue"> <value-type name="QScriptValue">
<enum-type name="PropertyFlag" flags="QScriptValue::PropertyFlags"/> <enum-type name="PropertyFlag" flags="PropertyFlags"/>
<enum-type name="ResolveFlag" flags="QScriptValue::ResolveFlags"/> <enum-type name="ResolveFlag" flags="ResolveFlags"/>
<enum-type name="SpecialValue"/> <enum-type name="SpecialValue"/>
</value-type> </value-type>
<object-type name="QScriptValueIterator"/> <object-type name="QScriptValueIterator"/>

View file

@ -24,7 +24,7 @@
<object-type name="QScriptEngineDebugger"> <object-type name="QScriptEngineDebugger">
<enum-type name="DebuggerAction"/> <enum-type name="DebuggerAction"/>
<enum-type name="DebuggerState"/> <enum-type name="DebuggerState" since="4.6"/>
<enum-type name="DebuggerWidget"/> <enum-type name="DebuggerWidget"/>
<extra-includes> <extra-includes>
<include file-name="QScriptEngine" location="global"/> <include file-name="QScriptEngine" location="global"/>

View file

@ -27,7 +27,7 @@
<namespace-type name="QSql"> <namespace-type name="QSql">
<enum-type name="Location"/> <enum-type name="Location"/>
<enum-type name="ParamTypeFlag" flags="QSql::ParamType"/> <enum-type name="ParamTypeFlag" flags="ParamType"/>
<enum-type name="TableType"/> <enum-type name="TableType"/>
<enum-type name="NumericalPrecisionPolicy"/> <enum-type name="NumericalPrecisionPolicy"/>
<extra-includes> <extra-includes>
@ -113,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">
@ -143,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" />

View file

@ -27,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,8 +1,17 @@
project(QtTest) project(QtTest)
if (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6)
set(QtTest_46_SRC "")
else()
set(QtTest_46_SRC
${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
${QtTest_46_SRC}
) )
set(QtTest_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}") set(QtTest_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}")

View file

@ -51,11 +51,12 @@
<rejection class="QTest" function-name="toString&lt;ushort>"/> <rejection class="QTest" function-name="toString&lt;ushort>"/>
<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"/> <enum-type name="AttributeIndex" since="4.6"/>
<enum-type name="KeyAction"/> <enum-type name="KeyAction"/>
<enum-type name="LogElementType"/> <enum-type name="LogElementType" since="4.6"/>
<enum-type name="MouseAction"/> <enum-type name="MouseAction"/>
<enum-type name="QBenchmarkMetric" since="4.7"/> <enum-type name="QBenchmarkMetric" since="4.7"/>
<enum-type name="SkipMode"/> <enum-type name="SkipMode"/>
@ -64,9 +65,35 @@
<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" >
<modify-function signature="press(int, const QPoint&amp;, QWidget*)">
<modify-argument index="return">
<define-ownership class="target" owner="default"/>
</modify-argument>
</modify-function>
<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

@ -30,6 +30,40 @@
Q_IMPORT_PLUGIN(uiplugin); Q_IMPORT_PLUGIN(uiplugin);
</inject-code> </inject-code>
<add-function signature="registerCustomWidget(PyObject*)" return-type="void"> <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"> <inject-code class="target" position="beginning">
registerCustomWidget(%PYARG_1); registerCustomWidget(%PYARG_1);
%CPPSELF.addPluginPath(""); // force reload widgets %CPPSELF.addPluginPath(""); // force reload widgets
@ -71,7 +105,7 @@
<parent index="2" action="add"/> <parent index="2" action="add"/>
</modify-argument> </modify-argument>
<inject-code> <inject-code>
//Avoid calling the original function: %CPPSELF.load // Avoid calling the original function: %CPPSELF.%FUNCTION_NAME()
%PYARG_0 = quiloader_load_ui_from_device(%CPPSELF, %1, %2); %PYARG_0 = quiloader_load_ui_from_device(%CPPSELF, %1, %2);
</inject-code> </inject-code>
</modify-function> </modify-function>
@ -89,7 +123,7 @@
<parent index="2" action="add"/> <parent index="2" action="add"/>
</modify-argument> </modify-argument>
<inject-code> <inject-code>
//Avoid calling the original function: %CPPSELF.load // Avoid calling the original function: %CPPSELF.%FUNCTION_NAME()
%PYARG_0 = quiloader_load_ui(%CPPSELF, %1, %2); %PYARG_0 = quiloader_load_ui(%CPPSELF, %1, %2);
</inject-code> </inject-code>
</add-function> </add-function>

View file

@ -7,6 +7,8 @@ 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 () endif ()
@ -20,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

View file

@ -31,7 +31,7 @@
<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">
<reference-count action="add"/> <reference-count action="set"/>
</modify-argument> </modify-argument>
</modify-function> </modify-function>
<modify-function signature="page() const"> <modify-function signature="page() const">
@ -47,14 +47,26 @@
<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"/> <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 QMultiMap isn't implemented yet --> <modify-function signature="print(QPrinter*)const" rename="print_" />
<modify-function signature="metaData()const" remove="all" /> <modify-function signature="metaData()const">
<modify-argument index="return">
<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">
@ -64,16 +76,70 @@
<enum-type name="WebGraphic"/> <enum-type name="WebGraphic"/>
</object-type> </object-type>
<object-type name="QWebPage"> <object-type name="QWebPage">
<enum-type name="ErrorDomain"/> <enum-type name="FindFlag" flags="FindFlags"/>
<enum-type name="FindFlag" flags="QWebPage::FindFlags"/>
<enum-type name="LinkDelegationPolicy"/> <enum-type name="LinkDelegationPolicy"/>
<enum-type name="NavigationType"/> <enum-type name="NavigationType"/>
<enum-type name="WebAction"/> <enum-type name="WebAction"/>
<enum-type name="WebWindowType"/> <enum-type name="WebWindowType"/>
<!-- Qt 4.6 --> <!-- Qt 4.6 -->
<enum-type name="ErrorDomain"/> <enum-type name="ErrorDomain" since="4.6"/>
<enum-type name="Extension"/> <enum-type name="Extension"/>
<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*)">
<modify-argument index="2" invalidate-after-use="yes">
<conversion-rule class="target">
PyObject* %out = 0;
// Cast the parameters according to the extension type
if (extension == QWebPage::ChooseMultipleFilesExtension)
%out = %CONVERTTOPYTHON[ChooseMultipleFilesExtensionOption*](reinterpret_cast&lt;const ChooseMultipleFilesExtensionOption*>(option));
#if QT_VERSION >= 0x040600
else if (extension == QWebPage::ErrorPageExtension)
%out = %CONVERTTOPYTHON[ErrorPageExtensionOption*](reinterpret_cast&lt;const ErrorPageExtensionOption*>(option));
#endif
</conversion-rule>
</modify-argument>
<modify-argument index="3" invalidate-after-use="yes">
<conversion-rule class="target">
PyObject* %out = 0;
// Cast the parameters according to the extension type
if (extension == QWebPage::ChooseMultipleFilesExtension)
%out = %CONVERTTOPYTHON[ChooseMultipleFilesExtensionReturn*](reinterpret_cast&lt;const ChooseMultipleFilesExtensionReturn*>(output));
#if QT_VERSION >= 0x040600
else if (extension == QWebPage::ErrorPageExtension)
%out = %CONVERTTOPYTHON[ErrorPageExtensionReturn*](reinterpret_cast&lt;const ErrorPageExtensionReturn*>(output));
#endif
</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-function signature="javaScriptPrompt(QWebFrame*,const QString &amp;,const QString &amp;,QString*)">
<modify-argument index="return"> <modify-argument index="return">
<replace-type modified-type="PyObject"/> <replace-type modified-type="PyObject"/>
@ -104,10 +170,25 @@
<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">
<enum-type name="StyleResolveStrategy"/> <enum-type name="StyleResolveStrategy"/>
</value-type> </value-type>
<value-type name="QWebElementCollection"/> <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;
}
return %CONVERTTOPYTHON[QWebElement](%CPPSELF.at(_i));
</inject-code>
</add-function>
</value-type>
</typesystem> </typesystem>

View file

@ -27,33 +27,23 @@
<rejection class="QXmlInputSource" field-name="EndOfData"/> <rejection class="QXmlInputSource" field-name="EndOfData"/>
<rejection class="QXmlInputSource" field-name="EndOfDocument"/> <rejection class="QXmlInputSource" field-name="EndOfDocument"/>
<value-type name="QDomAttr"> <value-type name="QDomAttr" />
<modify-function signature="nodeType()const" remove="all"/> <value-type name="QDomCDATASection" />
</value-type> <value-type name="QDomCharacterData" />
<value-type name="QDomComment" />
<value-type name="QDomCDATASection">
<modify-function signature="nodeType()const" remove="all"/>
</value-type>
<value-type name="QDomCharacterData">
<modify-function signature="nodeType()const" remove="all"/>
</value-type>
<value-type name="QDomComment">
<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_);
%END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(_ret_, _errorMsg_, _errorLine_, _errorColumn_); %PYARG_0 = Shiboken::makeTuple(_ret_, _errorMsg_, _errorLine_, _errorColumn_);
</template> </template>
<value-type name="QDomDocument"> <value-type name="QDomDocument">
<modify-function signature="nodeType()const" 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">
@ -217,22 +207,10 @@
</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" />
</value-type> <value-type name="QDomEntity" />
<value-type name="QDomEntityReference" />
<value-type name="QDomDocumentType">
<modify-function signature="nodeType()const" remove="all"/>
</value-type>
<value-type name="QDomEntity">
<modify-function signature="nodeType()const" remove="all"/>
</value-type>
<value-type name="QDomEntityReference">
<modify-function signature="nodeType()const" remove="all"/>
</value-type>
<value-type name="QDomImplementation"> <value-type name="QDomImplementation">
<enum-type name="InvalidDataPolicy"/> <enum-type name="InvalidDataPolicy"/>
</value-type> </value-type>
@ -247,30 +225,13 @@
</value-type> </value-type>
<value-type name="QDomNodeList" /> <value-type name="QDomNodeList" />
<value-type name="QDomNotation" />
<value-type name="QDomProcessingInstruction" />
<value-type name="QDomNotation"> <value-type name="QDomText" />
<modify-function signature="nodeType()const" remove="all"/>
</value-type>
<value-type name="QDomProcessingInstruction">
<modify-function signature="nodeType()const" remove="all"/>
</value-type>
<value-type name="QDomText">
<modify-function signature="nodeType()const" remove="all"/>
</value-type>
<object-type name="QXmlParseException"/> <object-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"/>
<object-type name="QXmlNamespaceSupport"/> <object-type name="QXmlNamespaceSupport"/>
@ -309,7 +270,11 @@
</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_);
%END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(%0, _qxmlinputsource_arg_); %PYARG_0 = Shiboken::makeTuple(%0, _qxmlinputsource_arg_);
</inject-code> </inject-code>
</modify-function> </modify-function>
@ -332,7 +297,9 @@
</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_);
%END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(%0, _qxmlinputsource_arg_); %PYARG_0 = Shiboken::makeTuple(%0, _qxmlinputsource_arg_);
</inject-code> </inject-code>
</modify-function> </modify-function>
@ -340,16 +307,6 @@
<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">
<enum-type name="Error" />
<enum-type name="TokenType" />
</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"/>
@ -452,9 +409,5 @@
</inject-code> </inject-code>
</modify-function> </modify-function>
</object-type> </object-type>
<suppress-warning text="Shadowing: QDomNode::attributes() const and QDomElement::attributes() const"/>
<suppress-warning text="Shadowing: QDomNode::nodeType() const and QDomElement::nodeType() const"/>
</typesystem> </typesystem>

View file

@ -21,8 +21,8 @@
<typesystem package="PySide.QtXmlPatterns"> <typesystem package="PySide.QtXmlPatterns">
<load-typesystem name="typesystem_core.xml" generate="no"/> <load-typesystem name="typesystem_core.xml" generate="no"/>
<object-type name="QXmlSchema"/> <!-- Qt scoped pointer does not allow declare this as value type --> <object-type name="QXmlSchema" since="4.6" /> <!-- Qt scoped pointer does not allow declare this as value type -->
<object-type name="QXmlSchemaValidator"> <object-type name="QXmlSchemaValidator" since="4.6">
<modify-function signature="schema() const"> <modify-function signature="schema() const">
<modify-argument index="return"> <modify-argument index="return">
<replace-type modified-type="QXmlSchema*"/> <replace-type modified-type="QXmlSchema*"/>
@ -44,6 +44,7 @@
<object-type name="QXmlFormatter" /> <object-type name="QXmlFormatter" />
<value-type name="QXmlItem" /> <value-type name="QXmlItem" />
<value-type name="QXmlName"> <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="QXmlName(short, short, short)" remove="all" />
<modify-function signature="setNamespaceURI(short)" remove="all" /> <modify-function signature="setNamespaceURI(short)" remove="all" />
<modify-function signature="localName()const" remove="all" /> <modify-function signature="localName()const" remove="all" />
@ -55,14 +56,19 @@
<modify-function signature="setPrefix(short)" remove="all" /> <modify-function signature="setPrefix(short)" remove="all" />
<modify-function signature="setLocalName(short)" remove="all" /> <modify-function signature="setLocalName(short)" remove="all" />
<modify-function signature="code()const" remove="all" /> <modify-function signature="code()const" remove="all" />
<!-- ### -->
</value-type> </value-type>
<value-type name="QXmlNamePool" /> <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"> <value-type name="QXmlNodeModelIndex">
<enum-type name="Axis"/>
<enum-type name="DocumentOrder" /> <enum-type name="DocumentOrder" />
<enum-type name="NodeKind" /> <enum-type name="NodeKind" />
<modify-function signature="internalPointer()const" remove="all" /> <!-- ### Qt internal methods -->
<!-- Qt internal methods -->
<modify-function signature="name()const" remove="all" /> <modify-function signature="name()const" remove="all" />
<modify-function signature="root()const" remove="all" /> <modify-function signature="root()const" remove="all" />
<modify-function signature="documentUri()const" remove="all" /> <modify-function signature="documentUri()const" remove="all" />
@ -76,6 +82,7 @@
<modify-function signature="stringValue()const" remove="all" /> <modify-function signature="stringValue()const" remove="all" />
<modify-function signature="is(const QXmlNodeModelIndex &amp;)const" remove="all" /> <modify-function signature="is(const QXmlNodeModelIndex &amp;)const" remove="all" />
<modify-function signature="reset()" remove="all" /> <modify-function signature="reset()" remove="all" />
<!-- ### -->
</value-type> </value-type>
<value-type name="QXmlQuery"> <value-type name="QXmlQuery">
@ -84,7 +91,6 @@
<object-type name="QXmlResultItems" /> <object-type name="QXmlResultItems" />
<object-type name="QXmlSerializer" /> <object-type name="QXmlSerializer" />
<suppress-warning text="class 'QAbstractXmlNodeModel' inherits from unknown base class 'QSharedData'"/>
<suppress-warning text="unhandled enum value: ForwardAxis in QXmlNodeModelIndex::Axis"/> <suppress-warning text="class not found for setup inheritance 'QSharedData'"/>
<suppress-warning text="unhandled enum value: ReverseAxis in QXmlNodeModelIndex::Axis"/>
</typesystem> </typesystem>

View file

@ -1,5 +1,5 @@
__all__ = ['QtCore', 'QtGui', 'QtNetwork', 'QtOpenGL', 'QtSql', 'QtSvg', 'QtTest', 'QtWebKit', 'QtScript'] __all__ = ['QtCore', 'QtGui', 'QtNetwork', 'QtOpenGL', 'QtSql', 'QtSvg', 'QtTest', 'QtWebKit', 'QtScript']
import private import private
__version__ = "@BINDING_API_VERSION@" __version__ = "@BINDING_API_VERSION_FULL@"
__version_info__ = (@BINDING_API_MAJOR_VERSION@, @BINDING_API_MINOR_VERSION@, @BINDING_API_MICRO_VERSION@) __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

@ -5,6 +5,10 @@ if (NOT QT_PHONON_INCLUDE_DIR AND CMAKE_HOST_APPLE)
set(QT_PHONON_INCLUDE_DIR "${QT_LIBRARY_DIR}/phonon.framework/Headers") set(QT_PHONON_INCLUDE_DIR "${QT_LIBRARY_DIR}/phonon.framework/Headers")
endif () 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 set(phonon_SRC
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_abstractaudiooutput_wrapper.cpp ${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_abstractmediastream_wrapper.cpp
@ -42,10 +46,9 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_volumefaderinterface_wrapper.cp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_volumeslider_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_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_backendcapabilities_notifierwrapper_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_backendcapabilities_notifierwrapper_wrapper.cpp
${phonon_OPTIONAL_SRC}
) )
check_qt_class("phonon" "VideoCaptureDevice" phonon_SRC "Phonon" "ObjectDescription")
set(phonon_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${phonon_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}") set(phonon_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${phonon_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}")
set(phonon_include_dirs ${CMAKE_CURRENT_SOURCE_DIR} set(phonon_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
${QT_QTCORE_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR}
@ -70,4 +73,6 @@ create_pyside_module(phonon
phonon_deps phonon_deps
phonon_typesystem_path phonon_typesystem_path
phonon_SRC phonon_SRC
"") ""
""
phonon_DROPPED_ENTRIES)

View file

@ -78,20 +78,22 @@
<include file-name="backendcapabilities.h" location="global"/> <include file-name="backendcapabilities.h" location="global"/>
<include file-name="pyside_phonon.h" location="local"/> <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="notifier()" remove="all"/>
<modify-function signature="Phonon::BackendCapabilities::NotifierWrapper(Phonon::BackendCapabilities::Notifier*)"> <modify-function signature="Phonon::BackendCapabilities::NotifierWrapper(Phonon::BackendCapabilities::Notifier*)">
<access modifier="private"/> <access modifier="private"/>
</modify-function> </modify-function>
<!-- ### -->
<inject-code class="target" position="end"> <inject-code class="target" position="end">
PySideSignal* signal_item; PySideSignal* signal_item;
signal_item = PySide::Signal::newObject("capabilitiesChanged", "void", NULL); signal_item = PySide::Signal::newObject("capabilitiesChanged", "void", NULL);
PyDict_SetItemString(Sbk_Phonon_BackendCapabilities_NotifierWrapper_Type.super.ht_type.tp_dict, "capabilitiesChanged", (PyObject*)signal_item); PyDict_SetItemString(Sbk_Phonon_BackendCapabilities_NotifierWrapper_Type.super.ht_type.tp_dict, "capabilitiesChanged", (PyObject*)signal_item);
Py_DECREF(signal_item); Py_DECREF((PyObject*)signal_item);
signal_item = PySide::Signal::newObject("availableAudioOutputDevicesChanged", "void", NULL); signal_item = PySide::Signal::newObject("availableAudioOutputDevicesChanged", "void", NULL);
PyDict_SetItemString( Sbk_Phonon_BackendCapabilities_NotifierWrapper_Type.super.ht_type.tp_dict, "availableAudioOutputDevicesChanged", (PyObject*)signal_item); PyDict_SetItemString( Sbk_Phonon_BackendCapabilities_NotifierWrapper_Type.super.ht_type.tp_dict, "availableAudioOutputDevicesChanged", (PyObject*)signal_item);
Py_DECREF(signal_item); Py_DECREF((PyObject*)signal_item);
</inject-code> </inject-code>
</object-type> </object-type>
</namespace-type> </namespace-type>
@ -102,6 +104,7 @@
<enum-type name="MetaData"/> <enum-type name="MetaData"/>
<enum-type name="ObjectDescriptionType"/> <enum-type name="ObjectDescriptionType"/>
<enum-type name="State"/> <enum-type name="State"/>
<enum-type name="CaptureCategory"/>
<object-type name="AbstractVideoOutput"/> <object-type name="AbstractVideoOutput"/>
<object-type name="AddonInterface"> <object-type name="AddonInterface">
@ -126,22 +129,20 @@
<object-type name="VolumeFaderInterface"/> <object-type name="VolumeFaderInterface"/>
<value-type name="EffectParameter"> <value-type name="EffectParameter">
<enum-type name="Hint" flags="Phonon::EffectParameter::Hints"/> <enum-type name="Hint" flags="Hints"/>
<modify-function signature="EffectParameter()" remove="all"/> <!-- internal --> <!-- ### Internal methods and ctors -->
<modify-function signature="operator&lt;(const Phonon::EffectParameter &amp;)const" remove="all"/> <!-- internal --> <modify-function signature="EffectParameter()" remove="all"/>
<modify-function signature="operator&gt;(const Phonon::EffectParameter &amp;)const" remove="all"/> <!-- internal --> <modify-function signature="operator&lt;(const Phonon::EffectParameter &amp;)const" remove="all"/>
<modify-function signature="id()const" remove="all"/> <!-- internal --> <modify-function signature="operator&gt;(const Phonon::EffectParameter &amp;)const" remove="all"/>
<modify-function signature="operator=(Phonon::EffectParameter)" remove="all"/> <!-- Covered by copy constructor --> <modify-function signature="id()const" remove="all"/>
<modify-function signature="EffectParameter(Phonon::EffectParameter)" remove="all"/>
<modify-function signature="operator==(Phonon::EffectParameter)const" remove="all"/> <modify-function signature="operator==(Phonon::EffectParameter)const" remove="all"/>
<!-- ### -->
</value-type> </value-type>
<value-type name="MediaSource"> <value-type name="MediaSource">
<enum-type name="Type"/> <enum-type name="Type"/>
<modify-function signature="operator=(Phonon::MediaSource)" remove="all"/> <!-- Covered by copy constructor -->
</value-type> </value-type>
<value-type name="Path"> <value-type name="Path">
<modify-function signature="disconnect()" rename="disconnectPath"/> <modify-function signature="disconnect()" rename="disconnectPath"/>
<modify-function signature="operator=(Phonon::Path)" remove="all"/> <!-- Covered by copy constructor -->
<modify-function signature="insertEffect(Phonon::EffectDescription,Phonon::Effect*)"> <modify-function signature="insertEffect(Phonon::EffectDescription,Phonon::Effect*)">
<modify-argument index="1"> <modify-argument index="1">
<parent index="this" action="add"/> <parent index="this" action="add"/>
@ -170,37 +171,90 @@
</value-type> </value-type>
<value-type name="ObjectDescription" generate="no"/> <value-type name="ObjectDescription" generate="no"/>
<value-type name="EffectDescription"> <value-type name="EffectDescription">
<modify-function signature="operator==(Phonon::ObjectDescription)const" remove="all"/> <modify-function signature="operator==(Phonon::ObjectDescription)const">
<modify-function signature="operator!=(Phonon::ObjectDescription)const" remove="all"/> <modify-argument index="1">
<modify-function signature="fromIndex(int)" remove="all"/> <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>
<value-type name="AudioOutputDevice"> <value-type name="AudioOutputDevice">
<modify-function signature="operator==(Phonon::ObjectDescription)const" remove="all"/> <modify-function signature="operator==(Phonon::ObjectDescription)const">
<modify-function signature="operator!=(Phonon::ObjectDescription)const" remove="all"/> <modify-argument index="1">
<modify-function signature="fromIndex(int)" remove="all"/> <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>
<value-type name="AudioCaptureDevice"> <value-type name="AudioCaptureDevice">
<modify-function signature="operator==(Phonon::ObjectDescription)const" remove="all"/> <modify-function signature="operator==(Phonon::ObjectDescription)const">
<modify-function signature="operator!=(Phonon::ObjectDescription)const" remove="all"/> <modify-argument index="1">
<modify-function signature="fromIndex(int)" remove="all"/> <replace-type modified-type="Phonon::AudioCaptureDevice"/>
</value-type> </modify-argument>
<value-type name="VideoCaptureDevice"> </modify-function>
<modify-function signature="operator==(Phonon::ObjectDescription)const" remove="all"/> <modify-function signature="operator!=(Phonon::ObjectDescription)const">
<modify-function signature="operator!=(Phonon::ObjectDescription)const" remove="all"/> <modify-argument index="1">
<modify-function signature="fromIndex(int)" remove="all"/> <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>
<value-type name="AudioChannelDescription"> <value-type name="AudioChannelDescription">
<modify-function signature="operator==(Phonon::ObjectDescription)const" remove="all"/> <modify-function signature="operator==(Phonon::ObjectDescription)const">
<modify-function signature="operator!=(Phonon::ObjectDescription)const" remove="all"/> <modify-argument index="1">
<modify-function signature="fromIndex(int)" remove="all"/> <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>
<value-type name="SubtitleDescription"> <value-type name="SubtitleDescription">
<modify-function signature="operator==(Phonon::ObjectDescription)const" remove="all"/> <modify-function signature="operator==(Phonon::ObjectDescription)const">
<modify-function signature="operator!=(Phonon::ObjectDescription)const" remove="all"/> <modify-argument index="1">
<modify-function signature="fromIndex(int)" remove="all"/> <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> </value-type>
<object-type name="ObjectDescriptionModel" generate="no"/> <object-type name="ObjectDescriptionModel" generate="no"/>
<object-type name="EffectDescriptionModel" /> <object-type name="EffectDescriptionModel" />
<object-type name="AudioOutputDeviceModel" /> <object-type name="AudioOutputDeviceModel" />
@ -211,7 +265,8 @@
<object-type name="Effect"/> <object-type name="Effect"/>
<object-type name="EffectWidget"/> <object-type name="EffectWidget"/>
<object-type name="MediaController"> <object-type name="MediaController">
<enum-type name="Feature" flags="Phonon::MediaController::Features"/> <enum-type name="Feature" flags="Features"/>
<enum-type name="NavigationMenu"/>
</object-type> </object-type>
<object-type name="MediaObject" /> <object-type name="MediaObject" />
<object-type name="SeekSlider"> <object-type name="SeekSlider">
@ -236,6 +291,25 @@
</modify-argument> </modify-argument>
</modify-function> </modify-function>
</object-type> </object-type>
</namespace-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> </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

View file

@ -31,47 +31,65 @@
<!-- Templates to fix bool* parameters --> <!-- Templates to fix bool* parameters -->
<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_);
%END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(retval_, ok_); %PYARG_0 = Shiboken::makeTuple(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_);
%END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(retval_, ok_); %PYARG_0 = Shiboken::makeTuple(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);
%END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(retval_, ok_); %PYARG_0 = Shiboken::makeTuple(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);
%END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(retval_, ok_); %PYARG_0 = Shiboken::makeTuple(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);
%END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(retval_, ok_); %PYARG_0 = Shiboken::makeTuple(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);
%END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(retval_, ok_); %PYARG_0 = Shiboken::makeTuple(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);
%END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(retval_, ok_); %PYARG_0 = Shiboken::makeTuple(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);
%END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(retval_, ok_); %PYARG_0 = Shiboken::makeTuple(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);
%END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(retval_, ok_); %PYARG_0 = Shiboken::makeTuple(retval_, ok_);
</template> </template>
<template name="get_slice"> <template name="get_slice">
@ -102,36 +120,66 @@
<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_);
%END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(retval_, val_); %PYARG_0 = Shiboken::makeTuple(retval_, val_);
</template> </template>
<template name="fix_int*,int*,int*,int*"> <template name="fix_number*,number*,number*,number*">
int a, b, c, d; $TYPE a, b, c, d;
%CPPSELF.%FUNCTION_NAME(&amp;a, &amp;b, &amp;c, &amp;d); %BEGIN_ALLOW_THREADS
%CPPSELF->::%TYPE::%FUNCTION_NAME(&amp;a, &amp;b, &amp;c, &amp;d);
%END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(a, b, c, d); %PYARG_0 = Shiboken::makeTuple(a, b, c, d);
</template> </template>
<template name="fix_qreal*,qreal*,qreal*,qreal*">
qreal a, b, c, d; <template name="fix_number*,number*,number*,number*,args">
%CPPSELF.%FUNCTION_NAME(&amp;a, &amp;b, &amp;c, &amp;d); $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
%PYARG_0 = Shiboken::makeTuple(a, b, c, d); %PYARG_0 = Shiboken::makeTuple(a, b, c, d);
</template> </template>
<template name="fix_native_return_number*,number*,number*,number*">
PyObject* _obj = %PYARG_0.object();
if (!PySequence_Check(_obj)
|| 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 name="fix_int*,int*,int*,int*,int*"> <template name="fix_int*,int*,int*,int*,int*">
int a, b, c, d, e; int 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);
%END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(a, b, c, d, e); %PYARG_0 = Shiboken::makeTuple(a, b, c, d, e);
</template> </template>
<template name="fix_qreal*,qreal*,qreal*,qreal*,qreal*"> <template name="fix_qreal*,qreal*,qreal*,qreal*,qreal*">
@ -150,10 +198,20 @@
<template name="fix_return_args,int*"> <template name="fix_return_args,int*">
RETURNTYPE _ret; RETURNTYPE _ret;
int _arg; int _arg;
%BEGIN_ALLOW_THREADS
_ret = %CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &amp;_arg); _ret = %CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &amp;_arg);
%END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(_ret, _arg); %PYARG_0 = Shiboken::makeTuple(_ret, _arg);
</template> </template>
<template name="fix_args,number*,number*">
$TYPE a, b;
%BEGIN_ALLOW_THREADS
%CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &amp;a, &amp;b);
%END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(a, b);
</template>
<template name="fix_virtual_method_return_value_and_bool*"> <template name="fix_virtual_method_return_value_and_bool*">
Shiboken::AutoDecRef _py_ret_(PySequence_GetItem(%PYARG_0, 0)); Shiboken::AutoDecRef _py_ret_(PySequence_GetItem(%PYARG_0, 0));
Shiboken::AutoDecRef _py_ok_(PySequence_GetItem(%PYARG_0, 1)); Shiboken::AutoDecRef _py_ok_(PySequence_GetItem(%PYARG_0, 1));
@ -164,7 +222,9 @@
<template name="fix_arg,int*,int*"> <template name="fix_arg,int*,int*">
%RETURN_TYPE _ret; %RETURN_TYPE _ret;
int a, b; int a, b;
%BEGIN_ALLOW_THREADS
_ret = %CPPSELF.%FUNCTION_NAME(%1, &amp;a, &amp;b); _ret = %CPPSELF.%FUNCTION_NAME(%1, &amp;a, &amp;b);
%END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(_ret, a, b); %PYARG_0 = Shiboken::makeTuple(_ret, a, b);
</template> </template>
@ -173,25 +233,55 @@
</template> </template>
<template name="return_tuple_QValidator_QString_int"> <template name="return_tuple_QValidator_QString_int">
%BEGIN_ALLOW_THREADS
%RETURN_TYPE retval_ = %RETURN_TYPE(%CPPSELF.%FUNCTION_NAME(%1, %2)); %RETURN_TYPE retval_ = %RETURN_TYPE(%CPPSELF.%FUNCTION_NAME(%1, %2));
%END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(retval_, %1, %2); %PYARG_0 = Shiboken::makeTuple(retval_, %1, %2);
</template> </template>
<template name="return_for_QFileDialog"> <template name="return_for_QFileDialog">
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%1, %2, %3, %4, %5); %BEGIN_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(retval_, %4); %RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%1, %2, %3, %4, &amp;%5, %6);
%END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(retval_, %5);
</template> </template>
<template name="set_qapp_parent_for_orphan"> <template name="set_qapp_parent_for_orphan">
SbkObject* _pySelf = reinterpret_cast&lt;SbkObject*&gt;(%PYARG_0); SbkObject* _pySelf = reinterpret_cast&lt;SbkObject*&gt;(%PYARG_0);
if (!Shiboken::Object::hasParentInfo(_pySelf)) if (!Shiboken::Object::hasParentInfo(_pySelf))
Shiboken::Object::setParent(%CONVERTTOPYTHON[QApplication*](qApp), %PYARG_0); Shiboken::Object::setParent(%CONVERTTOPYTHON[QApplication*](qApp), %PYARG_0);
</template> </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 = PyString_FromString(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 = PyString_FromString(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__ --> <!-- templates for __reduce__ -->
<template name="reduce_code"> <template name="reduce_code">
PyObject *type = PyObject_Type(%PYSELF); %PYARG_0 = Py_BuildValue("(N(%REDUCE_FORMAT))", PyObject_Type(%PYSELF), %REDUCE_ARGS);
PyObject *args = NULL;
args = Py_BuildValue("%REDUCE_FORMAT", %REDUCE_ARGS);
%PYARG_0 = Py_BuildValue("(NN)", type, args);
</template> </template>
<template name="reduce_code_matrix"> <template name="reduce_code_matrix">
QList&lt; %MATRIX_TYPE &gt; cppArgs; QList&lt; %MATRIX_TYPE &gt; cppArgs;
@ -209,7 +299,7 @@
<!-- Matrix Aux functions --> <!-- Matrix Aux functions -->
<template name="matrix_constructor"> <template name="matrix_constructor">
if (PySequence_Size(%PYARG_1) == %SIZE) { if (PySequence_Size(%PYARG_1) == %SIZE) {
Shiboken::AutoDecRef fast(PySequence_Fast(%PYARG_1, "Fail to parse sequnce on %TYPE constructor.")); Shiboken::AutoDecRef fast(PySequence_Fast(%PYARG_1, "Failed to parse sequence on %TYPE constructor."));
qreal values[%SIZE]; qreal values[%SIZE];
for(int i=0; i &lt; %SIZE; i++) { for(int i=0; i &lt; %SIZE; i++) {
PyObject *pv = PySequence_Fast_GET_ITEM(fast.object(), i); PyObject *pv = PySequence_Fast_GET_ITEM(fast.object(), i);
@ -238,5 +328,44 @@
return %CONVERTTOPYTHON[%TRANSPOSED_TYPE](%CPPSELF.transposed()); return %CONVERTTOPYTHON[%TRANSPOSED_TYPE](%CPPSELF.transposed());
</template> </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__">
%PYARG_0 = %CONVERTTOPYTHON[%CPPSELF_TYPE](%CPPSELF.begin());
</template>
<template name="__next__">
if (!%CPPSELF.atEnd())
%PYARG_0 = %CONVERTTOPYTHON[%CPPSELF_TYPE]((*%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>
</typesystem> </typesystem>

View file

@ -1,6 +1,18 @@
macro(create_pyside_module module_name module_include_dir module_libraries module_deps module_typesystem_path module_sources typesystem_name) 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(TOLOWER ${module_name} _module)
string(REGEX REPLACE ^qt "" _module ${_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}) if (NOT EXISTS ${typesystem_name})
set(typesystem_path ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_${_module}.xml) set(typesystem_path ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_${_module}.xml)
else() else()
@ -9,18 +21,19 @@ macro(create_pyside_module module_name module_include_dir module_libraries modul
add_custom_command(OUTPUT ${${module_sources}} add_custom_command(OUTPUT ${${module_sources}}
COMMAND ${GENERATORRUNNER_BINARY} ${GENERATOR_EXTRA_FLAGS} COMMAND ${GENERATORRUNNER_BINARY} ${GENERATOR_EXTRA_FLAGS}
${CMAKE_BINARY_DIR}/PySide/global.h ${pyside_BINARY_DIR}/pyside_global.h
--include-paths=${pyside_SOURCE_DIR}${PATH_SEP}${QT_INCLUDE_DIR} --include-paths=${pyside_SOURCE_DIR}${PATH_SEP}${QT_INCLUDE_DIR}
--typesystem-paths=${pyside_SOURCE_DIR}${PATH_SEP}${${module_typesystem_path}} --typesystem-paths=${pyside_SOURCE_DIR}${PATH_SEP}${${module_typesystem_path}}
--output-directory=${CMAKE_CURRENT_BINARY_DIR} --output-directory=${CMAKE_CURRENT_BINARY_DIR}
--license-file=${CMAKE_CURRENT_SOURCE_DIR}/../licensecomment.txt --license-file=${CMAKE_CURRENT_SOURCE_DIR}/../licensecomment.txt
${typesystem_path} ${typesystem_path}
--api-version=${SUPPORTED_QT_VERSION} --api-version=${SUPPORTED_QT_VERSION}
--drop-type-entries="${dropped_entries}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Running generator for ${module_name}...") COMMENT "Running generator for ${module_name}...")
include_directories(${module_name} ${${module_include_dir}} ${pyside_SOURCE_DIR}) include_directories(${module_name} ${${module_include_dir}} ${pyside_SOURCE_DIR})
add_library(${module_name} MODULE ${${module_sources}} ${${ARGN}}) add_library(${module_name} MODULE ${${module_sources}} ${${module_static_sources}})
set_target_properties(${module_name} PROPERTIES PREFIX "" LIBRARY_OUTPUT_DIRECTORY ${pyside_BINARY_DIR}) set_target_properties(${module_name} PROPERTIES PREFIX "" LIBRARY_OUTPUT_DIRECTORY ${pyside_BINARY_DIR})
if(WIN32) if(WIN32)
set_target_properties(${module_name} PROPERTIES SUFFIX ".pyd") set_target_properties(${module_name} PROPERTIES SUFFIX ".pyd")
@ -43,29 +56,31 @@ macro(create_pyside_module module_name module_include_dir module_libraries modul
install(FILES ${typesystem_files} DESTINATION share/PySide${pyside_SUFFIX}/typesystems) install(FILES ${typesystem_files} DESTINATION share/PySide${pyside_SUFFIX}/typesystems)
endmacro() endmacro()
#macro(check_qt_class_with_namespace module namespace class global_sources [namespace]) #macro(check_qt_class_with_namespace module namespace class optional_source_files dropped_entries [namespace] [module])
macro(check_qt_class module class global_sources) macro(check_qt_class module class optional_source_files dropped_entries)
if (${ARGC} GREATER 3) if (${ARGC} GREATER 4)
set (namespace ${ARGV3}) set (namespace ${ARGV4})
string(TOLOWER ${namespace} _namespace) string(TOLOWER ${namespace} _namespace)
else () else ()
set (namespace "") set (namespace "")
endif () endif ()
if (${ARGC} GREATER 4) if (${ARGC} GREATER 5)
set (include_file ${ARGV4}) set (include_file ${ARGV5})
else () else ()
set (include_file ${module}) set (include_file ${class})
endif () endif ()
string(TOLOWER ${class} _class) string(TOLOWER ${class} _class)
string(TOUPPER ${module} _module) string(TOUPPER ${module} _module)
if (${namespace}) if (_namespace)
set(_cppfile ${CMAKE_CURRENT_BINARY_DIR}/PySide/${module}/${_namespace}_${_class}_wrapper.cpp) set(_cppfile ${CMAKE_CURRENT_BINARY_DIR}/PySide/${module}/${_namespace}_${_class}_wrapper.cpp)
else () else ()
set(_cppfile ${CMAKE_CURRENT_BINARY_DIR}/PySide/${module}/${_class}_wrapper.cpp) set(_cppfile ${CMAKE_CURRENT_BINARY_DIR}/PySide/${module}/${_class}_wrapper.cpp)
endif () endif ()
if (DEFINED PYSIDE_${class}) if (DEFINED PYSIDE_${class})
if (PYSIDE_${class}) if (PYSIDE_${class})
list(APPEND ${global_sources} ${_cppfile}) list(APPEND ${optional_source_files} ${_cppfile})
else()
list(APPEND ${dropped_entries} PySide.${module}.${class})
endif() endif()
else() else()
if (NOT ${namespace} STREQUAL "" ) if (NOT ${namespace} STREQUAL "" )
@ -76,9 +91,8 @@ macro(check_qt_class module class global_sources)
set(SRC_FILE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/test${class}.cxx) set(SRC_FILE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/test${class}.cxx)
file(WRITE ${SRC_FILE} file(WRITE ${SRC_FILE}
"#include <${include_file}>\n" "#include <${include_file}>\n"
"#include <typeinfo>\n"
"${NAMESPACE_USE}\n" "${NAMESPACE_USE}\n"
"int main() { typeid(${class}); }\n" "int main() { sizeof(${class}); }\n"
) )
try_compile(Q_WORKS ${CMAKE_BINARY_DIR} try_compile(Q_WORKS ${CMAKE_BINARY_DIR}
${SRC_FILE} ${SRC_FILE}
@ -92,9 +106,10 @@ macro(check_qt_class module class global_sources)
set("PYSIDE_${class}" ${Q_WORKS} CACHE STRING "Has ${class} class been found?") set("PYSIDE_${class}" ${Q_WORKS} CACHE STRING "Has ${class} class been found?")
if(Q_WORKS) if(Q_WORKS)
message(STATUS "Checking for ${class} in ${module} -- found") message(STATUS "Checking for ${class} in ${module} -- found")
list(APPEND ${global_sources} ${_cppfile}) list(APPEND ${optional_source_files} ${_cppfile})
else() else()
message(STATUS "Checking for ${class} in ${module} -- not found") message(STATUS "Checking for ${class} in ${module} -- not found")
list(APPEND ${dropped_entries} PySide.${module}.${class})
endif() endif()
endif() endif()
endmacro() endmacro()

View file

@ -18,8 +18,8 @@ configure_file("conf.py.in" "rst/conf.py" @ONLY)
configure_file(typesystem_doc.xml.in typesystem_doc.xml @ONLY) configure_file(typesystem_doc.xml.in typesystem_doc.xml @ONLY)
add_custom_target("docrsts" add_custom_target("docrsts"
COMMAND ${GENERATORRUNNER_BINARY} --generatorSet=qtdoc COMMAND ${GENERATORRUNNER_BINARY} --generator-set=qtdoc
${pyside_BINARY_DIR}/global.h ${pyside_BINARY_DIR}/pyside_global.h
--include-paths="${QT_INCLUDE_DIR}${PATH_SEP}${pyside_SOURCE_DIR}" --include-paths="${QT_INCLUDE_DIR}${PATH_SEP}${pyside_SOURCE_DIR}"
--api-version=${SUPPORTED_QT_VERSION} --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}" --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}"
@ -27,7 +27,8 @@ add_custom_target("docrsts"
--documentation-only --documentation-only
--documentation-data-dir=${DOC_DATA_DIR} --documentation-data-dir=${DOC_DATA_DIR}
--output-directory=${CMAKE_CURRENT_BINARY_DIR}/rst --output-directory=${CMAKE_CURRENT_BINARY_DIR}/rst
--documentation-code-snippets-dir=${CMAKE_CURRENT_SOURCE_DIR}/codesnippets --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 ${CMAKE_CURRENT_BINARY_DIR}/typesystem_doc.xml
WORKING_DIRECTORY ${${module}_SOURCE_DIR} WORKING_DIRECTORY ${${module}_SOURCE_DIR}
COMMENT "Running generator to generate documentation..." COMMENT "Running generator to generate documentation..."

View file

@ -12,7 +12,12 @@
<p>PySide is built using the <a href="http://www.pyside.org/docs/shiboken">Shiboken</a> binding generator.</p> <p>PySide is built using the <a href="http://www.pyside.org/docs/shiboken">Shiboken</a> binding generator.</p>
<h2>Modules</h2> <h2>Modules</h2>
<table class="contentstable" align="center" style="margin-left: 30px"><tr>
<div class="admonition warning">
<strong>Note:</strong> 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 is 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.
</div>
<table class="contentstable" align="center" ><tr>
<td width="50%"> <td width="50%">
<p class="biglink"><a class="biglink" href="{{ pathto("PySide/QtCore/index") }}">QtCore</a><br/> <p class="biglink"><a class="biglink" href="{{ pathto("PySide/QtCore/index") }}">QtCore</a><br/>
<span class="linkdescr">core non-GUI functionality</span></p> <span class="linkdescr">core non-GUI functionality</span></p>
@ -49,5 +54,10 @@
content in Qt applications</span></p> content in Qt applications</span></p>
</td></tr> </td></tr>
</table> </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>
</div> </div>
{% endblock %} {% endblock %}

View file

@ -77,7 +77,7 @@
<div id="container"> <div id="container">
<div id="header"> <div id="header">
<div id="header_container"> <div id="header_container">
<div id="logo"></div> <div id="logo"><a href="http://www.pyside.org"><img alt="PySide" src="{{ pathto('_static/pysidelogo.png', 1) }}" width="199" height="102" /></a></div>
<ul id="relbar"> <ul id="relbar">
{%- for rellink in rellinks %} {%- for rellink in rellinks %}
<li class="right"> <li class="right">

View file

@ -1,16 +1,31 @@
/// XXX: make it cross browser /*
* doctools.js
* ~~~~~~~~~~~
*
* Sphinx JavaScript utilties for all documentation.
*
* :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
/**
* select a different prefix for underscore
*/
$u = _.noConflict();
/** /**
* make the code below compatible with browsers without * make the code below compatible with browsers without
* an installed firebug like debugger * an installed firebug like debugger
*/
if (!window.console || !console.firebug) { if (!window.console || !console.firebug) {
var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", var names = ["log", "debug", "info", "warn", "error", "assert", "dir",
"group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"]; "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace",
"profile", "profileEnd"];
window.console = {}; window.console = {};
for (var i = 0; i < names.length; ++i) for (var i = 0; i < names.length; ++i)
window.console[names[i]] = function() {} window.console[names[i]] = function() {};
} }
*/
/** /**
* small helper function to urldecode strings * small helper function to urldecode strings
@ -44,7 +59,7 @@ jQuery.getQueryParameters = function(s) {
result[key] = [value]; result[key] = [value];
} }
return result; return result;
} };
/** /**
* small function to check if an array contains * small function to check if an array contains
@ -56,7 +71,7 @@ jQuery.contains = function(arr, item) {
return true; return true;
} }
return false; return false;
} };
/** /**
* highlight a given string on a jquery object by wrapping it in * highlight a given string on a jquery object by wrapping it in
@ -67,7 +82,7 @@ jQuery.fn.highlightText = function(text, className) {
if (node.nodeType == 3) { if (node.nodeType == 3) {
var val = node.nodeValue; var val = node.nodeValue;
var pos = val.toLowerCase().indexOf(text); var pos = val.toLowerCase().indexOf(text);
if (pos >= 0 && !jQuery.className.has(node.parentNode, className)) { if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) {
var span = document.createElement("span"); var span = document.createElement("span");
span.className = className; span.className = className;
span.appendChild(document.createTextNode(val.substr(pos, text.length))); span.appendChild(document.createTextNode(val.substr(pos, text.length)));
@ -79,14 +94,14 @@ jQuery.fn.highlightText = function(text, className) {
} }
else if (!jQuery(node).is("button, select, textarea")) { else if (!jQuery(node).is("button, select, textarea")) {
jQuery.each(node.childNodes, function() { jQuery.each(node.childNodes, function() {
highlight(this) highlight(this);
}); });
} }
} }
return this.each(function() { return this.each(function() {
highlight(this); highlight(this);
}); });
} };
/** /**
* Small JavaScript module for the documentation. * Small JavaScript module for the documentation.
@ -96,7 +111,7 @@ var Documentation = {
init : function() { init : function() {
this.fixFirefoxAnchorBug(); this.fixFirefoxAnchorBug();
this.highlightSearchWords(); this.highlightSearchWords();
this.initModIndex(); this.initIndexTable();
}, },
/** /**
@ -107,7 +122,7 @@ var Documentation = {
LOCALE : 'unknown', LOCALE : 'unknown',
// gettext and ngettext don't access this so that the functions // gettext and ngettext don't access this so that the functions
// can savely bound to a different name (_ = Documentation.gettext) // can safely bound to a different name (_ = Documentation.gettext)
gettext : function(string) { gettext : function(string) {
var translated = Documentation.TRANSLATIONS[string]; var translated = Documentation.TRANSLATIONS[string];
if (typeof translated == 'undefined') if (typeof translated == 'undefined')
@ -167,7 +182,7 @@ var Documentation = {
var body = $('div.body'); var body = $('div.body');
window.setTimeout(function() { window.setTimeout(function() {
$.each(terms, function() { $.each(terms, function() {
body.highlightText(this.toLowerCase(), 'highlight'); body.highlightText(this.toLowerCase(), 'highlighted');
}); });
}, 10); }, 10);
$('<li class="highlight-link"><a href="javascript:Documentation.' + $('<li class="highlight-link"><a href="javascript:Documentation.' +
@ -177,19 +192,19 @@ var Documentation = {
}, },
/** /**
* init the modindex toggle buttons * init the domain index toggle buttons
*/ */
initModIndex : function() { initIndexTable : function() {
var togglers = $('img.toggler').click(function() { var togglers = $('img.toggler').click(function() {
var src = $(this).attr('src'); var src = $(this).attr('src');
var idnum = $(this).attr('id').substr(7); var idnum = $(this).attr('id').substr(7);
console.log($('tr.cg-' + idnum).toggle()); $('tr.cg-' + idnum).toggle();
if (src.substr(-9) == 'minus.png') if (src.substr(-9) == 'minus.png')
$(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); $(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
else else
$(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); $(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
}).css('display', ''); }).css('display', '');
if (DOCUMENTATION_OPTIONS.COLLAPSE_MODINDEX) { if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) {
togglers.click(); togglers.click();
} }
}, },
@ -199,7 +214,7 @@ var Documentation = {
*/ */
hideSearchWords : function() { hideSearchWords : function() {
$('.sidebar .this-page-menu li.highlight-link').fadeOut(300); $('.sidebar .this-page-menu li.highlight-link').fadeOut(300);
$('span.highlight').removeClass('highlight'); $('span.highlighted').removeClass('highlighted');
}, },
/** /**

File diff suppressed because one or more lines are too long

View file

@ -136,8 +136,24 @@ pre * {
font: 100% monospace; font: 100% monospace;
} }
.pre {
font: 100% monospace;
color: black;
}
.headerlink { .headerlink {
display: none; font-size: 100%;
color: inherit;
float: right;
visibility: Hidden
}
h1 .headerlink {
padding-right: 50px;
}
h1:hover .headerlink, h2:hover .headerlink, h3:hover .headerlink {
visibility: Visible;
} }
a, a:visited { a, a:visited {
@ -263,10 +279,8 @@ hr {
} }
#logo { #logo {
background-image: url(pysidelogo.png); text-align: left;
background-repeat: no-repeat; margin-bottom: 10px;
/* background-position: 0px 4px; */
height: 112px;
} }
#search_box { #search_box {

View file

@ -1,3 +1,14 @@
/*
* searchtools.js
* ~~~~~~~~~~~~~~
*
* Sphinx JavaScript utilties for the full-text search.
*
* :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
/** /**
* helper function to return a node containing the * helper function to return a node containing the
* search summary for a given text. keywords is a list * search summary for a given text. keywords is a list
@ -20,7 +31,7 @@ jQuery.makeSearchSummary = function(text, keywords, hlwords) {
((start + 240 - text.length) ? '...' : ''); ((start + 240 - text.length) ? '...' : '');
var rv = $('<div class="context"></div>').text(excerpt); var rv = $('<div class="context"></div>').text(excerpt);
$.each(hlwords, function() { $.each(hlwords, function() {
rv = rv.highlightText(this, 'highlight'); rv = rv.highlightText(this, 'highlighted');
}); });
return rv; return rv;
} }
@ -226,9 +237,11 @@ var Search = {
} }
}, },
/** loadIndex : function(url) {
* Sets the index $.ajax({type: "GET", url: url, data: null, success: null,
*/ dataType: "script", cache: true});
},
setIndex : function(index) { setIndex : function(index) {
var q; var q;
this._index = index; this._index = index;
@ -287,8 +300,13 @@ var Search = {
}, },
query : function(query) { query : function(query) {
// stem the searchterms and add them to the var stopwords = ['and', 'then', 'into', 'it', 'as', 'are', 'in',
// correct list 'if', 'for', 'no', 'there', 'their', 'was', 'is',
'be', 'to', 'that', 'but', 'they', 'not', 'such',
'with', 'by', 'a', 'on', 'these', 'of', 'will',
'this', 'near', 'the', 'or', 'at'];
// stem the searchterms and add them to the correct list
var stemmer = new PorterStemmer(); var stemmer = new PorterStemmer();
var searchterms = []; var searchterms = [];
var excluded = []; var excluded = [];
@ -296,6 +314,11 @@ var Search = {
var tmp = query.split(/\s+/); var tmp = query.split(/\s+/);
var object = (tmp.length == 1) ? tmp[0].toLowerCase() : null; var object = (tmp.length == 1) ? tmp[0].toLowerCase() : null;
for (var i = 0; i < tmp.length; i++) { for (var i = 0; i < tmp.length; i++) {
if ($u.indexOf(stopwords, tmp[i]) != -1 || tmp[i].match(/^\d+$/) ||
tmp[i] == "") {
// skip this "word"
continue;
}
// stem the word // stem the word
var word = stemmer.stemWord(tmp[i]).toLowerCase(); var word = stemmer.stemWord(tmp[i]).toLowerCase();
// select the correct list // select the correct list
@ -313,39 +336,42 @@ var Search = {
}; };
var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" ")); var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" "));
console.debug('SEARCH: searching for:'); // console.debug('SEARCH: searching for:');
console.info('required: ', searchterms); // console.info('required: ', searchterms);
console.info('excluded: ', excluded); // console.info('excluded: ', excluded);
// prepare search // prepare search
var filenames = this._index.filenames; var filenames = this._index.filenames;
var titles = this._index.titles; var titles = this._index.titles;
var terms = this._index.terms; var terms = this._index.terms;
var descrefs = this._index.descrefs; var objects = this._index.objects;
var modules = this._index.modules; var objtypes = this._index.objtypes;
var desctypes = this._index.desctypes; var objnames = this._index.objnames;
var fileMap = {}; var fileMap = {};
var files = null; var files = null;
// different result priorities
var importantResults = [];
var objectResults = []; var objectResults = [];
var regularResults = []; var regularResults = [];
var unimportantResults = [];
$('#search-progress').empty(); $('#search-progress').empty();
// lookup as object // lookup as object
if (object != null) { if (object != null) {
for (var module in modules) { for (var prefix in objects) {
if (module.indexOf(object) > -1) { for (var name in objects[prefix]) {
fn = modules[module];
descr = _('module, in ') + titles[fn];
objectResults.push([filenames[fn], module, '#module-'+module, descr]);
}
}
for (var prefix in descrefs) {
for (var name in descrefs[prefix]) {
var fullname = (prefix ? prefix + '.' : '') + name; var fullname = (prefix ? prefix + '.' : '') + name;
if (fullname.toLowerCase().indexOf(object) > -1) { if (fullname.toLowerCase().indexOf(object) > -1) {
match = descrefs[prefix][name]; match = objects[prefix][name];
descr = desctypes[match[1]] + _(', in ') + titles[match[0]]; descr = objnames[match[1]] + _(', in ') + titles[match[0]];
objectResults.push([filenames[match[0]], fullname, '#'+fullname, descr]); // XXX the generated anchors are not generally correct
// XXX there may be custom prefixes
result = [filenames[match[0]], fullname, '#'+fullname, descr];
switch (match[2]) {
case 1: objectResults.push(result); break;
case 0: importantResults.push(result); break;
case 2: unimportantResults.push(result); break;
}
} }
} }
} }
@ -356,6 +382,14 @@ var Search = {
return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0); return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
}); });
importantResults.sort(function(a, b) {
return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
});
unimportantResults.sort(function(a, b) {
return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
});
// perform the search on the required terms // perform the search on the required terms
for (var i = 0; i < searchterms.length; i++) { for (var i = 0; i < searchterms.length; i++) {
@ -411,8 +445,9 @@ var Search = {
return (left > right) ? -1 : ((left < right) ? 1 : 0); return (left > right) ? -1 : ((left < right) ? 1 : 0);
}); });
// combine both // combine all results
var results = regularResults.concat(objectResults); var results = unimportantResults.concat(regularResults)
.concat(objectResults).concat(importantResults);
// print the results // print the results
var resultCount = results.length; var resultCount = results.length;
@ -421,10 +456,23 @@ var Search = {
if (results.length) { if (results.length) {
var item = results.pop(); var item = results.pop();
var listItem = $('<li style="display:none"></li>'); var listItem = $('<li style="display:none"></li>');
listItem.append($('<a/>').attr( if (DOCUMENTATION_OPTIONS.FILE_SUFFIX == '') {
'href', // dirhtml builder
var dirname = item[0] + '/';
if (dirname.match(/\/index\/$/)) {
dirname = dirname.substring(0, dirname.length-6);
} else if (dirname == 'index/') {
dirname = '';
}
listItem.append($('<a/>').attr('href',
DOCUMENTATION_OPTIONS.URL_ROOT + dirname +
highlightstring + item[2]).html(item[1]));
} else {
// normal html builders
listItem.append($('<a/>').attr('href',
item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX + item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
highlightstring + item[2]).html(item[1])); highlightstring + item[2]).html(item[1]));
}
if (item[3]) { if (item[3]) {
listItem.append($('<span> (' + item[3] + ')</span>')); listItem.append($('<span> (' + item[3] + ')</span>'));
Search.output.append(listItem); Search.output.append(listItem);
@ -432,9 +480,12 @@ var Search = {
displayNextItem(); displayNextItem();
}); });
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) { } else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
$.get('_sources/' + item[0] + '.txt', function(data) { $.get(DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' +
item[0] + '.txt', function(data) {
if (data != '') {
listItem.append($.makeSearchSummary(data, searchterms, hlterms)); listItem.append($.makeSearchSummary(data, searchterms, hlterms));
Search.output.append(listItem); Search.output.append(listItem);
}
listItem.slideDown(5, function() { listItem.slideDown(5, function() {
displayNextItem(); displayNextItem();
}); });

View file

@ -0,0 +1,16 @@
(function(){var j=this,n=j._,i=function(a){this._wrapped=a},m=typeof StopIteration!=="undefined"?StopIteration:"__break__",b=j._=function(a){return new i(a)};if(typeof exports!=="undefined")exports._=b;var k=Array.prototype.slice,o=Array.prototype.unshift,p=Object.prototype.toString,q=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;b.VERSION="0.5.5";b.each=function(a,c,d){try{if(a.forEach)a.forEach(c,d);else if(b.isArray(a)||b.isArguments(a))for(var e=0,f=a.length;e<f;e++)c.call(d,
a[e],e,a);else{var g=b.keys(a);f=g.length;for(e=0;e<f;e++)c.call(d,a[g[e]],g[e],a)}}catch(h){if(h!=m)throw h;}return a};b.map=function(a,c,d){if(a&&b.isFunction(a.map))return a.map(c,d);var e=[];b.each(a,function(f,g,h){e.push(c.call(d,f,g,h))});return e};b.reduce=function(a,c,d,e){if(a&&b.isFunction(a.reduce))return a.reduce(b.bind(d,e),c);b.each(a,function(f,g,h){c=d.call(e,c,f,g,h)});return c};b.reduceRight=function(a,c,d,e){if(a&&b.isFunction(a.reduceRight))return a.reduceRight(b.bind(d,e),c);
var f=b.clone(b.toArray(a)).reverse();b.each(f,function(g,h){c=d.call(e,c,g,h,a)});return c};b.detect=function(a,c,d){var e;b.each(a,function(f,g,h){if(c.call(d,f,g,h)){e=f;b.breakLoop()}});return e};b.select=function(a,c,d){if(a&&b.isFunction(a.filter))return a.filter(c,d);var e=[];b.each(a,function(f,g,h){c.call(d,f,g,h)&&e.push(f)});return e};b.reject=function(a,c,d){var e=[];b.each(a,function(f,g,h){!c.call(d,f,g,h)&&e.push(f)});return e};b.all=function(a,c,d){c=c||b.identity;if(a&&b.isFunction(a.every))return a.every(c,
d);var e=true;b.each(a,function(f,g,h){(e=e&&c.call(d,f,g,h))||b.breakLoop()});return e};b.any=function(a,c,d){c=c||b.identity;if(a&&b.isFunction(a.some))return a.some(c,d);var e=false;b.each(a,function(f,g,h){if(e=c.call(d,f,g,h))b.breakLoop()});return e};b.include=function(a,c){if(b.isArray(a))return b.indexOf(a,c)!=-1;var d=false;b.each(a,function(e){if(d=e===c)b.breakLoop()});return d};b.invoke=function(a,c){var d=b.rest(arguments,2);return b.map(a,function(e){return(c?e[c]:e).apply(e,d)})};b.pluck=
function(a,c){return b.map(a,function(d){return d[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);var e={computed:-Infinity};b.each(a,function(f,g,h){g=c?c.call(d,f,g,h):f;g>=e.computed&&(e={value:f,computed:g})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);var e={computed:Infinity};b.each(a,function(f,g,h){g=c?c.call(d,f,g,h):f;g<e.computed&&(e={value:f,computed:g})});return e.value};b.sortBy=function(a,c,d){return b.pluck(b.map(a,
function(e,f,g){return{value:e,criteria:c.call(d,e,f,g)}}).sort(function(e,f){e=e.criteria;f=f.criteria;return e<f?-1:e>f?1:0}),"value")};b.sortedIndex=function(a,c,d){d=d||b.identity;for(var e=0,f=a.length;e<f;){var g=e+f>>1;d(a[g])<d(c)?(e=g+1):(f=g)}return e};b.toArray=function(a){if(!a)return[];if(a.toArray)return a.toArray();if(b.isArray(a))return a;if(b.isArguments(a))return k.call(a);return b.values(a)};b.size=function(a){return b.toArray(a).length};b.first=function(a,c,d){return c&&!d?k.call(a,
0,c):a[0]};b.rest=function(a,c,d){return k.call(a,b.isUndefined(c)||d?1:c)};b.last=function(a){return a[a.length-1]};b.compact=function(a){return b.select(a,function(c){return!!c})};b.flatten=function(a){return b.reduce(a,[],function(c,d){if(b.isArray(d))return c.concat(b.flatten(d));c.push(d);return c})};b.without=function(a){var c=b.rest(arguments);return b.select(a,function(d){return!b.include(c,d)})};b.uniq=function(a,c){return b.reduce(a,[],function(d,e,f){if(0==f||(c===true?b.last(d)!=e:!b.include(d,
e)))d.push(e);return d})};b.intersect=function(a){var c=b.rest(arguments);return b.select(b.uniq(a),function(d){return b.all(c,function(e){return b.indexOf(e,d)>=0})})};b.zip=function(){for(var a=b.toArray(arguments),c=b.max(b.pluck(a,"length")),d=new Array(c),e=0;e<c;e++)d[e]=b.pluck(a,String(e));return d};b.indexOf=function(a,c){if(a.indexOf)return a.indexOf(c);for(var d=0,e=a.length;d<e;d++)if(a[d]===c)return d;return-1};b.lastIndexOf=function(a,c){if(a.lastIndexOf)return a.lastIndexOf(c);for(var d=
a.length;d--;)if(a[d]===c)return d;return-1};b.range=function(a,c,d){var e=b.toArray(arguments),f=e.length<=1;a=f?0:e[0];c=f?e[0]:e[1];d=e[2]||1;e=Math.ceil((c-a)/d);if(e<=0)return[];e=new Array(e);f=a;for(var g=0;1;f+=d){if((d>0?f-c:c-f)>=0)return e;e[g++]=f}};b.bind=function(a,c){var d=b.rest(arguments,2);return function(){return a.apply(c||j,d.concat(b.toArray(arguments)))}};b.bindAll=function(a){var c=b.rest(arguments);if(c.length==0)c=b.functions(a);b.each(c,function(d){a[d]=b.bind(a[d],a)});
return a};b.delay=function(a,c){var d=b.rest(arguments,2);return setTimeout(function(){return a.apply(a,d)},c)};b.defer=function(a){return b.delay.apply(b,[a,1].concat(b.rest(arguments)))};b.wrap=function(a,c){return function(){var d=[a].concat(b.toArray(arguments));return c.apply(c,d)}};b.compose=function(){var a=b.toArray(arguments);return function(){for(var c=b.toArray(arguments),d=a.length-1;d>=0;d--)c=[a[d].apply(this,c)];return c[0]}};b.keys=function(a){if(b.isArray(a))return b.range(0,a.length);
var c=[];for(var d in a)q.call(a,d)&&c.push(d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=function(a){return b.select(b.keys(a),function(c){return b.isFunction(a[c])}).sort()};b.extend=function(a,c){for(var d in c)a[d]=c[d];return a};b.clone=function(a){if(b.isArray(a))return a.slice(0);return b.extend({},a)};b.tap=function(a,c){c(a);return a};b.isEqual=function(a,c){if(a===c)return true;var d=typeof a;if(d!=typeof c)return false;if(a==c)return true;if(!a&&c||a&&!c)return false;
if(a.isEqual)return a.isEqual(c);if(b.isDate(a)&&b.isDate(c))return a.getTime()===c.getTime();if(b.isNaN(a)&&b.isNaN(c))return true;if(b.isRegExp(a)&&b.isRegExp(c))return a.source===c.source&&a.global===c.global&&a.ignoreCase===c.ignoreCase&&a.multiline===c.multiline;if(d!=="object")return false;if(a.length&&a.length!==c.length)return false;d=b.keys(a);var e=b.keys(c);if(d.length!=e.length)return false;for(var f in a)if(!b.isEqual(a[f],c[f]))return false;return true};b.isEmpty=function(a){return b.keys(a).length==
0};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=function(a){return!!(a&&a.concat&&a.unshift)};b.isArguments=function(a){return a&&b.isNumber(a.length)&&!b.isArray(a)&&!r.call(a,"length")};b.isFunction=function(a){return!!(a&&a.constructor&&a.call&&a.apply)};b.isString=function(a){return!!(a===""||a&&a.charCodeAt&&a.substr)};b.isNumber=function(a){return p.call(a)==="[object Number]"};b.isDate=function(a){return!!(a&&a.getTimezoneOffset&&a.setUTCFullYear)};b.isRegExp=function(a){return!!(a&&
a.test&&a.exec&&(a.ignoreCase||a.ignoreCase===false))};b.isNaN=function(a){return b.isNumber(a)&&isNaN(a)};b.isNull=function(a){return a===null};b.isUndefined=function(a){return typeof a=="undefined"};b.noConflict=function(){j._=n;return this};b.identity=function(a){return a};b.breakLoop=function(){throw m;};var s=0;b.uniqueId=function(a){var c=s++;return a?a+c:c};b.template=function(a,c){a=new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+a.replace(/[\r\t\n]/g,
" ").replace(/'(?=[^%]*%>)/g,"\t").split("'").join("\\'").split("\t").join("'").replace(/<%=(.+?)%>/g,"',$1,'").split("<%").join("');").split("%>").join("p.push('")+"');}return p.join('');");return c?a(c):a};b.forEach=b.each;b.foldl=b.inject=b.reduce;b.foldr=b.reduceRight;b.filter=b.select;b.every=b.all;b.some=b.any;b.head=b.first;b.tail=b.rest;b.methods=b.functions;var l=function(a,c){return c?b(a).chain():a};b.each(b.functions(b),function(a){var c=b[a];i.prototype[a]=function(){var d=b.toArray(arguments);
o.call(d,this._wrapped);return l(c.apply(b,d),this._chain)}});b.each(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var c=Array.prototype[a];i.prototype[a]=function(){c.apply(this._wrapped,arguments);return l(this._wrapped,this._chain)}});b.each(["concat","join","slice"],function(a){var c=Array.prototype[a];i.prototype[a]=function(){return l(c.apply(this._wrapped,arguments),this._chain)}});i.prototype.chain=function(){this._chain=true;return this};i.prototype.value=function(){return this._wrapped}})();

View file

@ -0,0 +1,55 @@
class Window2 (QWidget):
//![0]
@Slot(QAudio.State)
def stateChanged(self, newState):
if newState == QAudio.StopState:
if self.input.error() != QAudio.NoError:
# Error handling
//![0]
class Window (QWidget):
def __init__(self):
QWidget.__init__(self)
self.output = QAudioOutput()
self.output.stateChanged[QAudio.State].connect(self.stateChanged)
def setupFormat(self):
//![1]
format = QAudioFormat()
format.setFrequency(44100)
//![1]
format.setChannels(2)
format.setSampleSize(16)
format.setCodec("audio/pcm")
format.setByteOrder(QAudioFormat.LittleEndian)
//![2]
format.setSampleType(QAudioFormat.SignedInt)
info = QAudioDeviceInfo(QAudioDeviceInfo.defaultOutputDevice())
if not info.isFormatSupported(format):
format = info.nearestFormat(format)
//![2]
//![3]
@Slot(QAudio.State)
def stateChanged(self, newState):
if newState == QAudio.StopState:
if self.output.error() != QAudio.NoError:
# Perform error handling
else:
# Normal stop
//![3]
# Handle
elif newState == QAudio.ActiveState:
# Handle active state...
app = QApplication(sys.argv)
window = Window()
window.show()
sys.exit(app.exec_())

View file

@ -1 +0,0 @@
SOURCES += brush.cpp

View file

@ -1,12 +0,0 @@
######################################################################
# Automatically generated by qmake (2.00a) Wed Dec 14 11:46:57 2005
######################################################################
TEMPLATE = app
TARGET +=
DEPENDPATH += .
INCLUDEPATH += .
# Input
HEADERS += renderarea.h stylewidget.h
SOURCES += main.cpp renderarea.cpp stylewidget.cpp

View file

@ -1,14 +0,0 @@
######################################################################
# Automatically generated by qmake (1.08a) Tue Jan 4 13:19:41 2005
######################################################################
TEMPLATE = app
CONFIG -= moc
DEPENDPATH += .
INCLUDEPATH += .
# Input
SOURCES += buffer.cpp
CONFIG += qt warn_on debug create_prl link_prl
OBJECTS_DIR=.obj/debug-shared
MOC_DIR=.moc/debug-shared

View file

@ -1,3 +0,0 @@
HEADERS = clipwindow.h
SOURCES = clipwindow.cpp \
main.cpp

View file

@ -1,8 +0,0 @@
//! [0]
#include <QtScriptTools>
//! [0]
//! [1]
QT += scripttools
//! [1]

View file

@ -1,25 +0,0 @@
//! [0]
Outlook::Application *outlook = new Outlook::Application;
//! [0]
//! [1]
Outlook::_NameSpace *session = outlook->Session();
//! [1]
//! [2]
Outlook::NameSpace *session = outlook->Session();
//! [2]
//! [3]
Outlook::_NameSpace *tmp = outlook->Session();
Outlook::NameSpace *session = new Outlook::NameSpace(tmp);
delete tmp; // or any other use of tmp: segfault
//! [3]
//! [4]
Outlook::NameSpace *session = new Outlook::NameSpace(outlook->Session());
//! [4]

View file

@ -1,23 +0,0 @@
//! [0]
IDI_ICON1 ICON DISCARDABLE "myappico.ico"
//! [0]
//! [1]
RC_FILE = myapp.rc
//! [1]
//! [2]
ICON = myapp.icns
//! [2]
//! [3]
kde-config --path icon
//! [3]
//! [4]
gnome-config --datadir
//! [4]

View file

@ -1,110 +0,0 @@
//! [0]
assistant -collectionFile file
//! [0]
//! [1]
<?xml version="1.0" encoding="utf-8" ?>
<QHelpCollectionProject version="1.0">
<assistant>
<title>My Application Help</title>
<startPage>qthelp://com.mycompany.1_0_0/doc/index.html</startPage>
<currentFilter>myfilter</currentFilter>
<applicationIcon>application.png</applicationIcon>
<enableFilterFunctionality>false</enableFilterFunctionality>
<enableDocumentationManager>false</enableDocumentationManager>
<enableAddressBar visible="true">true</enableAddressBar>
<cacheDirectory>mycompany/myapplication</cacheDirectory>
<aboutMenuText>
<text>About My Application</text>
<text language="de">Über meine Applikation...</text>
</aboutMenuText>
<aboutDialog>
<file>about.txt</file>
<file language="de">ueber.txt</file>
<icon>about.png</icon>
</aboutDialog>
</assistant>
<docFiles>
<generate>
<file>
<input>myapplication-manual.qhp</input>
<output>myapplication-manual.qch</output>
</file>
</generate>
<register>
<file>myapplication-manual.qch</file>
</register>
</docFiles>
</QHelpCollectionProject>
//! [1]
//! [2]
QProcess *process = new QProcess;
QStringList args;
args << QLatin1String("-collectionFile")
<< QLatin1String("mycollection.qhc")
<< QLatin1String("-enableRemoteControl");
process->start(QLatin1String("assistant"), args);
if (!process->waitForStarted())
return;
//! [2]
//! [3]
QByteArray ba;
ba.append("setSource qthelp://com.mycompany.1_0_0/doc/index.html");
ba.append('\0');
process->write(ba);
//! [3]
//! [4]
QByteArray ba;
ba.append("hide bookmarks;");
ba.append("hide index;");
ba.append("setSource qthelp://com.mycompany.1_0_0/doc/index.html");
ba.append('\0');
process->write(ba);
//! [4]
//! [5]
<?xml version="1.0" encoding="utf-8" ?>
<QHelpCollectionProject version="1.0">
...
<docFiles>
<register>
<file>myapplication-manual.qch</file>
<file>another-manual.qch</file>
</register>
</docFiles>
</QHelpCollectionProject>
//! [5]
//! [6]
assistant -collectionFile mycollection.qhc -register myapplication-manual.qch
//! [6]
//! [7]
<?xml version="1.0" encoding="utf-8" ?>
<QHelpCollectionProject version="1.0">
<assistant>
<title>My Application Help</title>
<cacheDirectory>mycompany/myapplication</cacheDirectory>
...
</assistant>
</QHelpCollectionProject>
//! [7]
//! [8]
assistant -collectionFile mycollection.qhc
//! [8]
//! [9]
%QDesktopServices::DataLocation%/mycompany/myapplication/mycollection.qhc
//! [9]
//! [10]
qcollectiongenerator mycollection.qhcp -o mycollection.qhc
//! [10]

View file

@ -1,71 +0,0 @@
//! [0]
if (*ptr == expected) {
*ptr = newval;
return !0;
}
return 0;
//! [0]
//! [1]
if (*ptr == expected) {
*ptr = newval;
return !0;
}
return 0;
//! [1]
//! [2]
++(*ptr);
return *ptr ? !0 : 0;
//! [2]
//! [3]
return ++(*ptr);
//! [3]
//! [4]
++(*ptr);
return !(ControlRegister & ZeroFlag);
//! [4]
//! [5]
--(*ptr);
return *ptr ? : 0;
//! [5]
//! [6]
return --(*ptr);
//! [6]
//! [7]
--(*ptr);
return !(ControlRegister & ZeroFlag);
//! [7]
//! [8]
tmp = *ptr;
*ptr = newval;
return tmp;
//! [8]
//! [9]
tmp = *ptr;
*ptr = newval;
return tmp;
//! [9]
//! [10]
tmp = *ptr;
*ptr += value;
return tmp;
//! [10]

View file

@ -1,8 +0,0 @@
//! [0]
QTDIR=C:\Progra~1\Qt
//! [0]
//! [1]
/usr/vacpp/bin/makeC++SharedLib -o shr1.o cplussource1.o
//! [1]

View file

@ -1,235 +0,0 @@
//! [0]
class Employee
{
public:
Employee() {}
Employee(const Employee &other);
Employee &operator=(const Employee &other);
private:
QString myName;
QDate myDateOfBirth;
};
//! [0]
//! [1]
QList<QString> list;
list << "A" << "B" << "C" << "D";
QListIterator<QString> i(list);
while (i.hasNext())
qDebug() << i.next();
//! [1]
//! [2]
QListIterator<QString> i(list);
i.toBack();
while (i.hasPrevious())
qDebug() << i.previous();
//! [2]
//! [3]
QMutableListIterator<int> i(list);
while (i.hasNext()) {
if (i.next() % 2 != 0)
i.remove();
}
//! [3]
//! [4]
QMutableListIterator<int> i(list);
i.toBack();
while (i.hasPrevious()) {
if (i.previous() % 2 != 0)
i.remove();
}
//! [4]
//! [5]
QMutableListIterator<int> i(list);
while (i.hasNext()) {
if (i.next() > 128)
i.setValue(128);
}
//! [5]
//! [6]
QMutableListIterator<int> i(list);
while (i.hasNext())
i.next() *= 2;
//! [6]
//! [7]
QMap<QString, QString> map;
map.insert("Paris", "France");
map.insert("Guatemala City", "Guatemala");
map.insert("Mexico City", "Mexico");
map.insert("Moscow", "Russia");
...
QMutableMapIterator<QString, QString> i(map);
while (i.hasNext()) {
if (i.next().key().endsWith("City"))
i.remove();
}
//! [7]
//! [8]
QMap<int, QWidget *> map;
QHash<int, QWidget *> hash;
QMapIterator<int, QWidget *> i(map);
while (i.hasNext()) {
i.next();
hash.insert(i.key(), i.value());
}
//! [8]
//! [9]
QMutableMapIterator<int, QWidget *> i(map);
while (i.findNext(widget))
i.remove();
//! [9]
//! [10]
QList<QString> list;
list << "A" << "B" << "C" << "D";
QList<QString>::iterator i;
for (i = list.begin(); i != list.end(); ++i)
*i = (*i).toLower();
//! [10]
//! [11]
QList<QString> list;
list << "A" << "B" << "C" << "D";
QList<QString>::iterator i = list.end();
while (i != list.begin()) {
--i;
*i = (*i).toLower();
}
//! [11]
//! [12]
QList<QString>::const_iterator i;
for (i = list.constBegin(); i != list.constEnd(); ++i)
qDebug() << *i;
//! [12]
//! [13]
QMap<int, int> map;
...
QMap<int, int>::const_iterator i;
for (i = map.constBegin(); i != map.constEnd(); ++i)
qDebug() << i.key() << ":" << i.value();
//! [13]
//! [14]
// RIGHT
const QList<int> sizes = splitter->sizes();
QList<int>::const_iterator i;
for (i = sizes.begin(); i != sizes.end(); ++i)
...
// WRONG
QList<int>::const_iterator i;
for (i = splitter->sizes().begin();
i != splitter->sizes().end(); ++i)
...
//! [14]
//! [15]
QLinkedList<QString> list;
...
QString str;
foreach (str, list)
qDebug() << str;
//! [15]
//! [16]
QLinkedList<QString> list;
...
QLinkedListIterator<QString> i(list);
while (i.hasNext())
qDebug() << i.next();
//! [16]
//! [17]
QLinkedList<QString> list;
...
foreach (QString str, list)
qDebug() << str;
//! [17]
//! [18]
QLinkedList<QString> list;
...
foreach (QString str, list) {
if (str.isEmpty())
break;
qDebug() << str;
}
//! [18]
//! [19]
QMap<QString, int> map;
...
foreach (QString str, map.keys())
qDebug() << str << ":" << map.value(str);
//! [19]
//! [20]
QMultiMap<QString, int> map;
...
foreach (QString str, map.uniqueKeys()) {
foreach (int i, map.values(str))
qDebug() << str << ":" << i;
}
//! [20]
//! [21]
forever {
...
}
//! [21]
//! [22]
CONFIG += no_keywords
//! [22]
//! [23]
QString onlyLetters(const QString &in)
{
QString out;
for (int j = 0; j < in.size(); ++j) {
if (in[j].isLetter())
out += in[j];
}
return out;
}
//! [23]

View file

@ -1,47 +0,0 @@
//! [0]
QPainter painter(this);
painter.setPen(Qt::darkGreen);
painter.drawRect(1, 2, 6, 4);
//! [0]
//! [1]
QPainter painter(this);
painter.setPen(Qt::darkGreen);
painter.drawLine(2, 7, 6, 1);
//! [1]
//! [2]
QPainter painter(this);
painter.setRenderHint(
QPainter::Antialiasing);
painter.setPen(Qt::darkGreen);
painter.drawRect(1, 2, 6, 4);
//! [2]
//! [3]
QPainter painter(this);
painter.setRenderHint(
QPainter::Antialiasing);
painter.setPen(Qt::darkGreen);
painter.drawLine(2, 7, 6, 1);
//! [3]
//! [4]
QPainter painter(this);
painter.setWindow(QRect(-50, -50, 100, 100));
//! [4]
//! [5]
int side = qMin(width(), height())
int x = (width() - side / 2);
int y = (height() - side / 2);
painter.setViewport(x, y, side, side);
//! [5]

View file

@ -1,24 +0,0 @@
//! [0]
qDebug() << "Widget" << widget << "at position" << widget->pos();
//! [0]
//! [1]
char *alloc(int size)
{
Q_ASSERT(size > 0);
char *ptr = new char[size];
Q_CHECK_PTR(ptr);
return ptr;
}
//! [1]
//! [2]
char *alloc(int size)
{
char *ptr;
Q_CHECK_PTR(ptr = new char[size]); // WRONG
return ptr;
}
//! [2]

View file

@ -1,414 +0,0 @@
//! [0]
cd /path/to/Qt
./configure -static -prefix /path/to/Qt <other parameters>
make sub-src
//! [0]
//! [1]
cd /path/to/Qt/examples/tools/plugandpaint
//! [1]
//! [2]
make clean
PATH=/path/to/Qt/bin:$PATH
export PATH
qmake -config release
make
//! [2]
//! [3]
ldd ./application
//! [3]
//! [4]
cd /path/to/Qt/examples/tools/plugandpaint
//! [4]
//! [5]
make clean
qmake -config release
make
//! [5]
//! [6]
cd ../plugandpaintplugins
make clean
qmake -config release
make
//! [6]
//! [7]
#!/bin/sh
appname=`basename $0 | sed s,\.sh$,,`
dirname=`dirname $0`
tmp="${dirname#?}"
if [ "${dirname%$tmp}" != "/" ]; then
dirname=$PWD/$dirname
fi
LD_LIBRARY_PATH=$dirname
export LD_LIBRARY_PATH
$dirname/$appname $*
//! [7]
//! [8]
DESTDIR = /path/to/Qt/plugandpaint/plugins
//! [8]
//! [9]
qApp->addLibraryPath("/some/other/path");
//! [9]
//! [10]
ldd ./application
//! [10]
//! [11]
cd C:\path\to\Qt
configure -static <any other options you need>
//! [11]
//! [12]
nmake sub-src
//! [12]
//! [13]
cd examples\tools\plugandpaint
//! [13]
//! [14]
nmake clean
qmake -config release
nmake
//! [14]
//! [15]
cd examples\tools\plugandpaint
//! [15]
//! [16]
nmake clean
qmake -config release
nmake
//! [16]
//! [17]
cd ..\plugandpaintplugins
nmake clean
qmake -config release
nmake
//! [17]
//! [18]
plugins\pnp_basictools.dll
plugins\pnp_extrafilters.dll
//! [18]
//! [19]
qApp->addLibraryPath("C:\some\other\path");
//! [19]
//! [20]
embed_manifest_dll
embed_manifest_exe
//! [20]
//! [21]
CONFIG += embed_manifest_exe
//! [21]
//! [22]
<Visual Studio Install Path>\VC\redist\<Architecture>\Microsoft.VC80.CRT
//! [22]
//! [23]
CONFIG-=embed_manifest_dll
//! [23]
//! [24]
depends <application executable>
//! [24]
//! [25]
C:<path to Qt>\plugins
//! [25]
//! [26]
CONFIG-=app_bundle
//! [26]
//! [27]
cd /path/to/Qt
./configure -static <other parameters>
make sub-src
//! [27]
//! [28]
cd /path/to/Qt/examples/tools/plugandpaint
//! [28]
//! [29]
make clean
qmake -config release
make
//! [29]
//! [30]
otool -L plugandpaint.app/Contents/MacOs/plugandpaint
//! [30]
//! [31]
plugandpaint.app/Contents/MacOS/plugandpaint:
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
(compatibility version 2.0.0, current version 128.0.0)
/System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime
(compatibility version 1.0.0, current version 10.0.0)
/usr/lib/libz.1.dylib
(compatibility version 1.0.0, current version 1.2.3)
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
(compatibility version 1.0.0, current version 22.0.0)
/usr/lib/libstdc++.6.dylib
(compatibility version 7.0.0, current version 7.3.0)
/usr/lib/libgcc_s.1.dylib
(compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libmx.A.dylib
(compatibility version 1.0.0, current version 92.0.0)
/usr/lib/libSystem.B.dylib
(compatibility version 1.0.0, current version 88.0.0)
//! [31]
//! [32]
-lQtGui
//! [32]
//! [33]
/where/static/qt/lib/is/libQtGui.a
//! [33]
//! [34]
cd /path/to/Qt/examples/tools/plugandpaint
//! [34]
//! [35]
make clean
qmake -config release
make
//! [35]
//! [36]
cd ../plugandpaintplugins
make clean
qmake -config release
make
//! [36]
//! [37]
otool -L QtGui.framework/QtGui
//! [37]
//! [38]
QtGui.framework/QtGui:
/path/to/Qt/lib/QtGui.framework/Versions/4.0/QtGui
(compatibility version 4.0.0, current version 4.0.1)
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
(compatibility version 2.0.0, current version 128.0.0)
/System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime
(compatibility version 1.0.0, current version 10.0.0)
/path/to/Qt/QtCore.framework/Versions/4.0/QtCore
(compatibility version 4.0.0, current version 4.0.1)
/usr/lib/libz.1.dylib
(compatibility version 1.0.0, current version 1.2.3)
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
(compatibility version 1.0.0, current version 22.0.0)
/usr/lib/libstdc++.6.dylib
(compatibility version 7.0.0, current version 7.3.0)
/usr/lib/libgcc_s.1.dylib
(compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libmx.A.dylib
(compatibility version 1.0.0, current version 92.0.0)
/usr/lib/libSystem.B.dylib
(compatibility version 1.0.0, current version 88.0.0)
//! [38]
//! [39]
mkdir plugandpaint.app/Contents/Frameworks
cp -R /path/to/Qt/lib/QtCore.framework
plugandpaint.app/Contents/Frameworks
cp -R /path/to/Qt/lib/QtGui.framework
plugandpaint.app/Contents/Frameworks
//! [39]
//! [40]
install_name_tool -id @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
plugandpaint.app/Contents/Frameworks/QtCore.framework/Versions/4.0/QtCore
install_name_tool -id @executable_path/../Frameworks/QtGui.framework/Versions/4.0/QtGui
plugandpaint.app/Contents/Frameworks/QtGui.framework/Versions/4.0/QtGui
//! [40]
//! [41]
install_name_tool -change path/to/Qt/lib/QtCore.framework/Versions/4.0/QtCore
@executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
plugandpaint.app/Contents/MacOs/plugandpaint
install_name_tool -change path/to/qt/lib/QtGui.framework/Versions/4.0/QtGui
@executable_path/../Frameworks/QtGui.framework/Versions/4.0/QtGui
plugandpaint.app/Contents/MacOs/plugandpaint
//! [41]
//! [42]
install_name_tool -change path/to/Qt/lib/QtCore.framework/Versions/4.0/QtCore
@executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
plugandpaint.app/Contents/Frameworks/QtGui.framework/Versions/4.0/QtGui
//! [42]
//! [43]
mv plugins plugandpaint.app/Contents
//! [43]
//! [44]
libpnp_basictools.dylib:
libpnp_basictools.dylib
(compatibility version 0.0.0, current version 0.0.0)
/path/to/Qt/lib/QtGui.framework/Versions/4.0/QtGui
(compatibility version 4.0.0, current version 4.0.1)
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
(compatibility version 2.0.0, current version 128.0.0)
/System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime
(compatibility version 1.0.0, current version 10.0.0)
/path/to/Qt/lib/QtCore.framework/Versions/4.0/QtCore
(compatibility version 4.0.0, current version 4.0.1)
/usr/lib/libz.1.dylib
(compatibility version 1.0.0, current version 1.2.3)
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
(compatibility version 1.0.0, current version 22.0.0)
/usr/lib/libstdc++.6.dylib
(compatibility version 7.0.0, current version 7.3.0)
/usr/lib/libgcc_s.1.dylib
(compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libmx.A.dylib
(compatibility version 1.0.0, current version 92.0.0)
/usr/lib/libSystem.B.dylib
(compatibility version 1.0.0, current version 88.0.0)
//! [44]
//! [45]
install_name_tool -change /path/to/Qt/lib/QtCore.framework/Versions/4.0/QtCore
@executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
plugandpaint.app/Contents/plugins/libpnp_basictools.dylib
install_name_tool -change /path/to/Qt/lib/QtGui.framework/Versions/4.0/QtGui
@executable_path/../Frameworks/QtGui.framework/Versions/4.0/QtGui
plugandpaint.app/Contents/plugins/libpnp_basictools.dylib
//! [45]
//! [46]
#elif defined(Q_OS_MAC)
if (pluginsDir.dirName() == "MacOS") {
pluginsDir.cdUp();
}
#endif
//! [46]
//! [47]
cp -R /path/to/Qt/plugins/imageformats
pluginandpaint.app/Contents/plugins
//! [47]
//! [48]
install_name_tool -change /path/to/Qt/lib/QtGui.framework/Versions/4.0/QtGui
@executable_path/../Frameworks/QtGui.framework/Versions/4.0/QtGui
plugandpaint.app/Contents/plugins/imageformats/libqjpeg.dylib
install_name_tool -change /path/to/Qt/lib/QtCore.framework/Versions/4.0/QtCore
@executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
plugandpaint.app/Contents/plugins/imageformats/libqjpeg.dylib
//! [48]
//! [49]
QDir dir(QApplication::applicationDirPath());
dir.cdUp();
dir.cd("plugins");
QApplication::setLibraryPaths(QStringList(dir.absolutePath()));
//! [49]
//! [50]
otool -L MyApp.app/Contents/MacOS/MyApp
//! [50]
//! [51]
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.3
//! [51]
//! [51a]
install_name_tool -change /System/Library/Frameworks/CoreVideo.framework/
Versions/A/CoreVideo /System/Library/Frameworks/QuartzCore.framework/
Versions/A/QuartzCore libphonon_qt7.dylib
//! [51a]
//! [51b]
./CONFIGURE - SDK MacOSX10.4u.sdk
//! [51b]
//! [52]
./configure (other arguments) -universal -sdk /Developer/SDKs/MacOSX10.4u.sdk
//! [52]
//! [53]
QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.4u.sdk
CONFIG+=x86 ppc
//! [53]
//! [54]
qApp->addLibraryPath("C:/customPath/plugins");
//! [54]

View file

@ -1,98 +0,0 @@
//! [0]
CONFIG += uitools
//! [0]
//! [1]
#include <QtUiTools>
//! [1]
//! [2]
void on_<object name>_<signal name>(<signal parameters>);
//! [2]
//! [3]
CONFIG += release
//! [3]
//! [4]
target.path = $$[QT_INSTALL_PLUGINS]/designer
INSTALLS += target
//! [4]
//! [5]
QT += script
//! [5]
//! [6]
widget.text = 'Hi - I was built ' + new Date().toString();
//! [6]
//! [7]
class MyExtension: public QObject,
public QdesignerContainerExtension
{
Q_OBJECT
Q_INTERFACE(QDesignerContainerExtension)
...
}
//! [7]
//! [8]
QObject *ANewExtensionFactory::createExtension(QObject *object,
const QString &iid, QObject *parent) const
{
if (iid != Q_TYPEID(QDesignerContainerExtension))
return 0;
if (MyCustomWidget *widget = qobject_cast<MyCustomWidget*>
(object))
return new MyContainerExtension(widget, parent);
return 0;
}
//! [8]
//! [9]
QObject *AGeneralExtensionFactory::createExtension(QObject *object,
const QString &iid, QObject *parent) const
{
MyCustomWidget *widget = qobject_cast<MyCustomWidget*>(object);
if (widget && (iid == Q_TYPEID(QDesignerTaskMenuExtension))) {
return new MyTaskMenuExtension(widget, parent);
} else if (widget && (iid == Q_TYPEID(QDesignerContainerExtension))) {
return new MyContainerExtension(widget, parent);
} else {
return 0;
}
}
//! [9]
//! [10]
void MyPlugin::initialize(QDesignerFormEditorInterface *formEditor)
{
if (initialized)
return;
QExtensionManager *manager = formEditor->extensionManager();
Q_ASSERT(manager != 0);
manager->registerExtensions(new MyExtensionFactory(manager),
Q_TYPEID(QDesignerTaskMenuExtension));
initialized = true;
}
//! [10]

View file

@ -1,34 +0,0 @@
//! [0]
void MyQt3Widget::customStartDragFunction()
{
QDragObject *d = new QTextDrag( myHighlightedText(), this );
d->dragCopy();
// do NOT delete d.
}
//! [0]
//! [1]
void MyQt3Widget::dragEnterEvent(QDragEnterEvent* event)
{
event->accept(
QTextDrag::canDecode(event) ||
QImageDrag::canDecode(event)
);
}
//! [1]
//! [2]
void MyQt3Widget::dropEvent(QDropEvent* event)
{
QImage image;
QString text;
if ( QImageDrag::decode(event, image) ) {
insertImageAt(image, event->pos());
} else if ( QTextDrag::decode(event, text) ) {
insertTextAt(text, event->pos());
}
}
//! [2]

View file

@ -1,20 +0,0 @@
//! [0]
./configure -help
//! [0]
//! [1]
configure -qt-kbd-s15000
//! [1]
//! [2]
export QWS_KEYBOARD=<driver>[:<driver specific options>]
//! [2]
//! [3]
export QWS_KEYBOARD="<driver>[:<driver specific options>]
<driver>[:<driver specific options>]
<driver>[:<driver specific options>]"
//! [3]

View file

@ -1,36 +0,0 @@
//! [0]
export PATH=path/to/cross/compiler:$PATH
//! [0]
//! [1]
./configure -embedded arm -xplatform qws/linux-arm-g++ <other options>
//! [1]
//! [2]
cp path/to/QtEmbedded/mkspecs/qws/linux-mips-g++/...
path/to/QtEmbedded/mkspecs/qws/linux-myarchitecture-g++/...
//! [2]
//! [3]
cd path/to/QtEmbedded
./configure -embedded <architecture> -qt-kbd-<keyboarddriver>
-qt-mouse-<mousedriver> -qt-gfx-<screendriver>
//! [3]
//! [4]
cd path/to/QtEmbedded
./configure <other options>
-L /path/to/libjpeg/libraries -I /path/to/libjpeg/headers
//! [4]
//! [5]
cd path/to/myApplication
qmake -project
qmake
make
//! [5]

View file

@ -1,38 +0,0 @@
//! [0]
export QWS_DISPLAY=<driver>[:<driver specific options>]...
[:<display num>]
//! [0]
//! [1]
export QWS_SIZE=<width>x<height>
//! [1]
//! [2]
export QWS_MOUSE_PROTO=<driver>[:<driver specific options>]
//! [2]
//! [3]
export QWS_MOUSE_PROTO="<driver>[:<driver specific options>]
<driver>[:<driver specific options>]
<driver>[:<driver specific options>]"
//! [3]
//! [4]
export QWS_MOUSE_PROTO="Vr41xx:press=500:/dev/misc/ts"
//! [4]
//! [5]
export QWS_KEYBOARD=<driver>[:<driver specific options>]
//! [5]
//! [6]
export QWS_KEYBOARD="<driver>[:<driver specific options>]
<driver>[:<driver specific options>]
<driver>[:<driver specific options>]"
//! [6]

View file

@ -1,18 +0,0 @@
//! [0]
configure.exe -D QT_NO_THREAD
//! [0]
//! [1]
./configure -no-feature-thread
//! [1]
//! [2]
configure.exe -qconfig myfile
//! [2]
//! [3]
./configure -qconfig myfile
//! [3]

View file

@ -1,3 +0,0 @@
//! [0]
name file renderer italic weight size flags
//! [0]

View file

@ -1,37 +0,0 @@
//! [0]
cd <anywhere>
gunzip qt-embedded-linux-commercial-src-4.5.2.tar.gz
tar xf qt-embedded-linux-commercial-src-4.5.2.tar
//! [0]
//! [1]
~/qt-embedded-linux-commercial-src-4.5.2
//! [1]
//! [2]
cd ~/qt-embedded-linux-commercial-src-4.5.2
./configure -embedded [architecture]
//! [2]
//! [3]
make
//! [3]
//! [4]
su -c "make install"
//! [4]
//! [5]
PATH=/usr/local/Trolltech/QtEmbedded-4.5.2/bin:$PATH
export PATH
//! [5]
//! [6]
setenv PATH /usr/local/Trolltech/QtEmbedded-4.5.2/bin:$PATH
//! [6]

View file

@ -1,36 +0,0 @@
//! [0]
./configure -static
//! [0]
//! [1]
void *operator new[](size_t size)
{
return malloc(size);
}
void *operator new(size_t size)
{
return malloc(size);
}
void operator delete[](void *ptr)
{
free(ptr);
}
void operator delete[](void *ptr, size_t)
{
free(ptr);
}
void operator delete(void *ptr)
{
free(ptr);
}
void operator delete(void *ptr, size_t)
{
free(ptr);
}
//! [1]

View file

@ -1,68 +0,0 @@
//! [0]
<qtopia-root-dir>/qtopiacore/qt/configure -embedded -help |grep -a1 mouse
//! [0]
//! [1]
./configure -extra-qtopiacore-config -qt-mouse-tslib
//! [1]
//! [2]
./configure -help
//! [2]
//! [3]
configure -qt-mouse-tslib
//! [3]
//! [4]
export QWS_MOUSE_PROTO=<driver>[:<driver specific options>]
//! [4]
//! [5]
export QWS_MOUSE_PROTO="<driver>[:<driver specific options>]
<driver>[:<driver specific options>]
<driver>[:<driver specific options>]"
//! [5]
//! [6]
export QWS_MOUSE_PROTO="Vr41xx:press=500:/dev/misc/ts"
//! [6]
//! [7]
./configure -L <path to tslib library> -I <path to tslib headers>
//! [7]
//! [8]
module_raw input
module linear
//! [8]
//! [9]
QWS_MOUSE_PROTO=IntelliMouse:/dev/input/mouse0
//! [9]
//! [10]
cat /dev/input/mouse0 | hexdump
//! [10]
//! [11]
QWS_MOUSE_PROTO=IntelliMouse:/dev/input/mouse0
//! [11]
//! [12]
chmod a+rw /dev/input/mouse0
//! [12]

View file

@ -1,70 +0,0 @@
//! [0]
cd path/to/QtEmbedded
./configure -qvfb
make
//! [0]
//! [1]
cd path/to/Qt/tools/qvfb
make
./qvfb
//! [1]
//! [2]
cd path/to/Qt/tools/qvfb/ClamshellPhone.skin/
//! [2]
//! [3]
[SkinFile]
Up=ClamshellPhone1-5.png
Down=ClamshellPhone1-5-pressed.png
Closed=ClamshellPhone1-5-closed.png
Screen=72 84 176 208
Areas=22
"Power" 0x0100000a 205 563 249 586
"1" 0x0031 62 414 119 438
"2" 0x0032 130 414 189 438
"3" 0x0033 198 413 257 438
"4" 0x0034 54 444 117 470
"5" 0x0035 128 444 189 471
"6" 0x0036 202 444 264 471
"7" 0x0037 47 477 113 507
"8" 0x0038 126 477 190 507
"9" 0x0039 205 478 270 509
"*" 0x002a 39 515 110 552
"0" 0x0030 122 515 195 553
"#" 0x0023 207 516 280 553
"Context1" 0x01100000 137 360 108 383 123 410 90 409 60 387 63 378
100 362
"Back" 0x01000061 184 361 206 376 213 387 197 410 226 410 256 392
258 381 244 369
"Backspace" 0x01000003 68 563 113 587
"Select" 0x01010000 160 391 172 390 181 386 184 381 180 377 173
373 165 372 155 372 145 375 138 378 136
382 138 387 147 390
"Left" 0x1000012 141 390 136 385 136 381 143 375 132 371 120
380 121 393 129 401
"Down" 0x1000015 143 389 130 402 162 412 191 404 175 390
"Right" 0x1000014 186 370 176 375 184 382 182 387 175 390 190 404
201 396 202 375
"Up" 0x1000013 133 370 143 374 176 374 185 370 169 362 149 362
"Flip" 0x01100006 98 325 225 353
//! [3]
//! [4]
cd path/to/QtEmbedded/examples/widgets/analogclock
make
./analogclock -qws
//! [4]
//! [5]
cd path/to/QtEmbedded/examples/widgets/analogclock
make
./analogclock -qws -display QVFb:0
//! [5]

View file

@ -1,61 +0,0 @@
//! [0]
cd path/to/QtEmbedded/demos/textedit
./textedit -qws
//! [0]
//! [1]
./myfirstserverapplication -qws -display "transformed:rot90:1"
./mysecondserverapplication -qws -display "QVFb:2"
//! [1]
//! [2]
./myclientapplication -display "QVFb:2"
//! [2]
//! [3]
./myserverapplication -qws -display "Multi: QVFb:0
QVFb:1:offset=0,0 VNC:offset=640,0 :2"
//! [3]
//! [4]
./myapplication -fn helvetica
//! [4]
//! [5]
./myapplication -bg blue
//! [5]
//! [6]
./myapplication -btn green
//! [6]
//! [7]
./myapplication -fg 'dark blue'
//! [7]
//! [8]
./myapplication -name texteditapplication
//! [8]
//! [9]
./myapplication -title 'Text Edit'
//! [9]
//! [10]
./myapplication -geometry 300x200+50+50
//! [10]
//! [11]
./myapplication -decoration windows
//! [11]

View file

@ -1,25 +0,0 @@
//! [0]
cd path/to/QtEmbedded
./configure -qt-gfx-vnc
make
//! [0]
//! [1]
cd path/to/QtEmbedded/examples/widgets/analogclock
./analogclock -qws -display VNC:0
//! [1]
//! [2]
vncviewer localhost:0
//! [2]
//! [Starting server]
analogclock -qws -display VNC:0
//! [Starting server]
//! [Starting clients]
calculator -display VNC:0
scribble -display VNC:0
imageviewer -display VNC:0
//! [Starting clients]

View file

@ -1,39 +0,0 @@
//! [0]
Private Application As comappLib.Application
Private MyApp As Boolean
Private Sub UpdateList()
DocumentList.Clear
DocumentsCount.Caption = Application.documents.Count
For Index = 0 To Application.documents.Count - 1
DocumentList.AddItem (Application.documents.Item(Index).Title)
Next
End Sub
Private Sub Form_Load()
On Error GoTo CreateNew
Set Application = GetObject(, "comapp.Application")
MyApp = False
GoTo Initialized
CreateNew:
On Error GoTo InitializeFailed
Set Application = New Application
Application.Visible = True
MyApp = True
Initialized:
Caption = Application.id
UpdateList
InitializeFailed:
End Sub
Private Sub Form_Unload(Cancel As Integer)
If MyApp Then
Application.quit
End If
End Sub
Private Sub NewDocument_Click()
Application.documents.addDocument
UpdateList
End Sub
//! [0]

View file

@ -1,4 +0,0 @@
//! [0]
' VB is case insensitive, but our C++ controls are not.
' Me.resetButton.enabled = True
//! [0]

View file

@ -1,6 +0,0 @@
//! [0]
<object ID="QMenus" CLASSID="CLSID:4dc3f340-a6f7-44e4-a79b-3e9217695fbd"
CODEBASE="http://qtsoftware.com/demos/menusax.cab">
[Object not available! Did you forget to build and register the server?]
</object>
//! [0]

View file

@ -1,8 +0,0 @@
//! [0]
myApplication -qws -display ahigl
//! [0]
//! [1]
myApplication -qws -display ahigl
//! [1]

View file

@ -1,5 +0,0 @@
//! [0]
application -style=windows
application -style=motif
application -style=cde
//! [0]

View file

@ -1,19 +0,0 @@
//! [0]
qApp->translate("ArrowPad", x)
//! [0]
//! [1]
lrelease arrowpad.pro
//! [1]
//! [2]
export LANG=fr
setenv LANG fr
//! [2]
//! [3]
set LANG=fr
//! [3]

View file

@ -1,4 +0,0 @@
//! [0]
target.path = $$[QT_INSTALL_PLUGINS]/designer
INSTALLS += target
//! [0]

View file

@ -1,4 +0,0 @@
//! [0]
target.path = $$[QT_INSTALL_PLUGINS]/designer
INSTALLS += target
//! [0]

View file

@ -1,3 +0,0 @@
//! [0]
foreach(variable, container)
//! [0]

View file

@ -1,8 +0,0 @@
//! [0]
QVariant a = model->index(0, 0, QModelIndex()).data();
//! [0]
//! [1]
QVariant b = model->index(1, 0, QModelIndex()).data();
//! [1]

View file

@ -1,31 +0,0 @@
//! [0]
lupdate -verbose hellotr.pro
//! [0]
//! [1]
<!DOCTYPE TS><TS>
<context>
<name>QPushButton</name>
<message>
<source>Hello world!</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>
//! [1]
//! [2]
linguist hellotr_la.ts
//! [2]
//! [3]
<translation type='unfinished'></translation>
//! [3]
//! [4]
<translation>Orbis, te saluto!</translation>
//! [4]

View file

@ -1,14 +0,0 @@
//! [0]
if (!condition)
qFatal("ASSERT: "condition" in file ...");
//! [0]
//! [1]
qmake "CONFIG += debug" icons.pro
//! [1]
//! [2]
qmake "CONFIG += release" icons.pro
//! [2]

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