1 |
commit: a14c8aababc99e1aeda80a504c5d817c28d04bb9 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun May 6 18:58:46 2018 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 10 14:16:10 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a14c8aab |
7 |
|
8 |
dev-python/PythonQt: Drop 3.1 and 3.1-r1 |
9 |
|
10 |
Package-Manager: Portage-2.3.36, Repoman-2.3.9 |
11 |
|
12 |
dev-python/PythonQt/Manifest | 1 - |
13 |
dev-python/PythonQt/PythonQt-3.1-r1.ebuild | 88 ------ |
14 |
dev-python/PythonQt/PythonQt-3.1.ebuild | 88 ------ |
15 |
.../files/PythonQt-3.1-commit-433-441.patch | 301 --------------------- |
16 |
4 files changed, 478 deletions(-) |
17 |
|
18 |
diff --git a/dev-python/PythonQt/Manifest b/dev-python/PythonQt/Manifest |
19 |
index 6301ac437fb..22e4ca79911 100644 |
20 |
--- a/dev-python/PythonQt/Manifest |
21 |
+++ b/dev-python/PythonQt/Manifest |
22 |
@@ -1,2 +1 @@ |
23 |
-DIST PythonQt3.1.zip 4526699 BLAKE2B 37d79f4d12bc1e4909d08c0ba4c2b95c233aba5097898498575733f323a8d1a5079e85e35e6272d0271421cb945d8a359330ba5ac9854ebcc7b95030b6cf1ad1 SHA512 b3c208e3f909ebb15d40a6e83385f03e6196a8439e39cad4f924e7b1e774edbce83680298ab032161619d1358696a0d073028860f68540aadd8028b712ae8fc1 |
24 |
DIST PythonQt3.2.zip 4539058 BLAKE2B c50b8333b71b6cbce6f372a0292a0ccfe791dc7eae5c660d4e6d1f5f2b3355644e3fd8cce9a514f0500e935f96c46976d0046ddd716465adb35d225e3c4cfeca SHA512 1ee0f50f5035568b38e945108f5496ba64355c6357c1ea8dfc17ad90fa360540769f94e0b3e0e398176e8a21c8afe139607f0b5a2e82c63f1cbd40201a25e0f0 |
25 |
|
26 |
diff --git a/dev-python/PythonQt/PythonQt-3.1-r1.ebuild b/dev-python/PythonQt/PythonQt-3.1-r1.ebuild |
27 |
deleted file mode 100644 |
28 |
index efab4efcc45..00000000000 |
29 |
--- a/dev-python/PythonQt/PythonQt-3.1-r1.ebuild |
30 |
+++ /dev/null |
31 |
@@ -1,88 +0,0 @@ |
32 |
-# Copyright 1999-2017 Gentoo Foundation |
33 |
-# Distributed under the terms of the GNU General Public License v2 |
34 |
- |
35 |
-EAPI=6 |
36 |
- |
37 |
-PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) |
38 |
- |
39 |
-MY_P=${PN}${PV} |
40 |
- |
41 |
-inherit qmake-utils python-single-r1 |
42 |
- |
43 |
-DESCRIPTION="A dynamic Python binding for the Qt framework" |
44 |
-HOMEPAGE="http://pythonqt.sourceforge.net/" |
45 |
-SRC_URI="mirror://sourceforge/pythonqt/pythonqt/${P}/${MY_P}.zip" |
46 |
- |
47 |
-LICENSE="LGPL-2.1" |
48 |
-SLOT="0" |
49 |
-KEYWORDS="~amd64 ~x86" |
50 |
-IUSE="doc +extensions webkit" |
51 |
- |
52 |
-RDEPEND="${PYTHON_DEPS} |
53 |
- <dev-qt/qtcore-5.9:5 |
54 |
- <dev-qt/qtgui-5.9:5 |
55 |
- <dev-qt/qtwidgets-5.9:5 |
56 |
- extensions? ( |
57 |
- <dev-qt/designer-5.9:5 |
58 |
- <dev-qt/qtdeclarative-5.9:5[widgets] |
59 |
- <dev-qt/qtmultimedia-5.9:5[widgets] |
60 |
- <dev-qt/qtnetwork-5.9:5 |
61 |
- <dev-qt/qtopengl-5.9:5 |
62 |
- <dev-qt/qtprintsupport-5.9:5 |
63 |
- <dev-qt/qtsql-5.9:5 |
64 |
- <dev-qt/qtsvg-5.9:5 |
65 |
- <dev-qt/qtxml-5.9:5 |
66 |
- <dev-qt/qtxmlpatterns-5.9:5 |
67 |
- webkit? ( <dev-qt/qtwebkit-5.9:5 ) |
68 |
- )" |
69 |
-DEPEND="${RDEPEND} |
70 |
- <dev-qt/qtxml-5.9:5 |
71 |
- virtual/pkgconfig |
72 |
- doc? ( app-doc/doxygen )" |
73 |
- |
74 |
-S="${WORKDIR}/${MY_P}" |
75 |
- |
76 |
-REQUIRED_USE="webkit? ( extensions ) ${PYTHON_REQUIRED_USE}" |
77 |
- |
78 |
-# Bring uitools back, backport other fixes from trunk |
79 |
-PATCHES=( "${FILESDIR}/${P}-commit-433-441.patch" ) |
80 |
- |
81 |
-src_prepare() { |
82 |
- default |
83 |
- |
84 |
- if ! use extensions ; then |
85 |
- sed -i '/SUBDIRS/s/extensions//' PythonQt.pro || die "sed for extensions" |
86 |
- fi |
87 |
- if ! use webkit ; then |
88 |
- # Remove webkit support if not used |
89 |
- sed -i '/qtHaveModule(webkit):CONFIG += PythonQtWebKit/d' \ |
90 |
- extensions/PythonQt_QtAll/PythonQt_QtAll.pro \ |
91 |
- || die "sed for webkit" |
92 |
- fi |
93 |
- |
94 |
- # Unset python version to use python-config |
95 |
- sed -i "/unix:PYTHON_VERSION=/s/2.7//" build/python.prf \ |
96 |
- || die "sed for python version" |
97 |
-} |
98 |
- |
99 |
-src_configure() { |
100 |
- eqmake5 PREFIX="${ED%/}"/usr |
101 |
-} |
102 |
- |
103 |
-src_install() { |
104 |
- einstalldocs |
105 |
- |
106 |
- # Includes |
107 |
- insinto /usr/include/PythonQt |
108 |
- doins -r src/*.h |
109 |
- insinto /usr/include/PythonQt/gui |
110 |
- doins -r src/gui/*.h |
111 |
- |
112 |
- if use extensions ; then |
113 |
- insinto /usr/include/PythonQt/extensions/PythonQt_QtAll |
114 |
- doins -r extensions/PythonQt_QtAll/*.h |
115 |
- fi |
116 |
- |
117 |
- # Libraries |
118 |
- dolib.so lib/libPythonQt* |
119 |
-} |
120 |
|
121 |
diff --git a/dev-python/PythonQt/PythonQt-3.1.ebuild b/dev-python/PythonQt/PythonQt-3.1.ebuild |
122 |
deleted file mode 100644 |
123 |
index 147196f81ea..00000000000 |
124 |
--- a/dev-python/PythonQt/PythonQt-3.1.ebuild |
125 |
+++ /dev/null |
126 |
@@ -1,88 +0,0 @@ |
127 |
-# Copyright 1999-2016 Gentoo Foundation |
128 |
-# Distributed under the terms of the GNU General Public License v2 |
129 |
- |
130 |
-EAPI=6 |
131 |
- |
132 |
-PYTHON_COMPAT=( python{2_7,3_4,3_5} ) |
133 |
- |
134 |
-MY_P=${PN}${PV} |
135 |
- |
136 |
-inherit qmake-utils python-single-r1 |
137 |
- |
138 |
-DESCRIPTION="A dynamic Python binding for the Qt framework" |
139 |
-HOMEPAGE="http://pythonqt.sourceforge.net/" |
140 |
-SRC_URI="mirror://sourceforge/pythonqt/pythonqt/${P}/${MY_P}.zip" |
141 |
- |
142 |
-LICENSE="LGPL-2.1" |
143 |
-SLOT="0" |
144 |
-KEYWORDS="~amd64 ~x86" |
145 |
-IUSE="doc +extensions webkit" |
146 |
- |
147 |
-RDEPEND="${PYTHON_DEPS} |
148 |
- dev-qt/qtcore:5 |
149 |
- dev-qt/qtgui:5 |
150 |
- dev-qt/qtwidgets:5 |
151 |
- extensions? ( |
152 |
- dev-qt/designer:5 |
153 |
- dev-qt/qtdeclarative:5[widgets] |
154 |
- dev-qt/qtmultimedia:5[widgets] |
155 |
- dev-qt/qtnetwork:5 |
156 |
- dev-qt/qtopengl:5 |
157 |
- dev-qt/qtprintsupport:5 |
158 |
- dev-qt/qtsql:5 |
159 |
- dev-qt/qtsvg:5 |
160 |
- dev-qt/qtxml:5 |
161 |
- dev-qt/qtxmlpatterns:5 |
162 |
- webkit? ( dev-qt/qtwebkit:5 ) |
163 |
- )" |
164 |
-DEPEND="${RDEPEND} |
165 |
- dev-qt/qtxml:5 |
166 |
- virtual/pkgconfig |
167 |
- doc? ( app-doc/doxygen )" |
168 |
- |
169 |
-S="${WORKDIR}/${MY_P}" |
170 |
- |
171 |
-REQUIRED_USE="webkit? ( extensions ) ${PYTHON_REQUIRED_USE}" |
172 |
- |
173 |
-# Bring uitools back, backport other fixes from trunk |
174 |
-PATCHES=( "${FILESDIR}/${P}-commit-433-441.patch" ) |
175 |
- |
176 |
-src_prepare() { |
177 |
- default |
178 |
- |
179 |
- if ! use extensions ; then |
180 |
- sed -i '/SUBDIRS/s/extensions//' PythonQt.pro || die "sed for extensions" |
181 |
- fi |
182 |
- if ! use webkit ; then |
183 |
- # Remove webkit support if not used |
184 |
- sed -i '/qtHaveModule(webkit):CONFIG += PythonQtWebKit/d' \ |
185 |
- extensions/PythonQt_QtAll/PythonQt_QtAll.pro \ |
186 |
- || die "sed for webkit" |
187 |
- fi |
188 |
- |
189 |
- # Unset python version to use python-config |
190 |
- sed -i "/unix:PYTHON_VERSION=/s/2.7//" build/python.prf \ |
191 |
- || die "sed for python version" |
192 |
-} |
193 |
- |
194 |
-src_configure() { |
195 |
- eqmake5 PREFIX="${ED%/}"/usr |
196 |
-} |
197 |
- |
198 |
-src_install() { |
199 |
- einstalldocs |
200 |
- |
201 |
- # Includes |
202 |
- insinto /usr/include/PythonQt |
203 |
- doins -r src/*.h |
204 |
- insinto /usr/include/PythonQt/gui |
205 |
- doins -r src/gui/*.h |
206 |
- |
207 |
- if use extensions ; then |
208 |
- insinto /usr/include/PythonQt/extensions/PythonQt_QtAll |
209 |
- doins -r extensions/PythonQt_QtAll/*.h |
210 |
- fi |
211 |
- |
212 |
- # Libraries |
213 |
- dolib.so lib/libPythonQt* |
214 |
-} |
215 |
|
216 |
diff --git a/dev-python/PythonQt/files/PythonQt-3.1-commit-433-441.patch b/dev-python/PythonQt/files/PythonQt-3.1-commit-433-441.patch |
217 |
deleted file mode 100644 |
218 |
index 90d3cb9d2ec..00000000000 |
219 |
--- a/dev-python/PythonQt/files/PythonQt-3.1-commit-433-441.patch |
220 |
+++ /dev/null |
221 |
@@ -1,301 +0,0 @@ |
222 |
-diff -uprNEBZ --suppress-blank-empty a/extensions/PythonQt_QtAll/PythonQt_QtAll.cpp b/extensions/PythonQt_QtAll/PythonQt_QtAll.cpp |
223 |
---- a/extensions/PythonQt_QtAll/PythonQt_QtAll.cpp 2016-06-09 06:46:16.000000000 -0500 |
224 |
-+++ b/extensions/PythonQt_QtAll/PythonQt_QtAll.cpp 2016-07-25 06:06:45.000000000 -0500 |
225 |
-@@ -45,6 +45,7 @@ void PythonQt_init_QtXmlPatterns(PyObjec |
226 |
- void PythonQt_init_QtMultimedia(PyObject*); |
227 |
- void PythonQt_init_QtQml(PyObject*); |
228 |
- void PythonQt_init_QtQuick(PyObject*); |
229 |
-+void PythonQt_init_QtUiTools(PyObject*); |
230 |
- |
231 |
- #ifdef PYTHONQT_WITH_WEBKIT |
232 |
- void PythonQt_init_QtWebKit(PyObject*); |
233 |
-@@ -67,6 +68,7 @@ namespace PythonQt_QtAll |
234 |
- PythonQt_init_QtMultimedia(0); |
235 |
- PythonQt_init_QtQml(0); |
236 |
- PythonQt_init_QtQuick(0); |
237 |
-+ PythonQt_init_QtUiTools(0); |
238 |
- }; |
239 |
- }; |
240 |
- |
241 |
-diff -uprNEBZ --suppress-blank-empty a/extensions/PythonQt_QtAll/PythonQt_QtAll.pro b/extensions/PythonQt_QtAll/PythonQt_QtAll.pro |
242 |
---- a/extensions/PythonQt_QtAll/PythonQt_QtAll.pro 2016-06-09 07:00:18.000000000 -0500 |
243 |
-+++ b/extensions/PythonQt_QtAll/PythonQt_QtAll.pro 2016-07-25 06:06:45.000000000 -0500 |
244 |
-@@ -21,7 +21,7 @@ SOURCES += \ |
245 |
- |
246 |
- QT += gui svg sql network xml xmlpatterns opengl |
247 |
- QT += widgets printsupport multimedia multimediawidgets |
248 |
--QT += quick qml quickwidgets |
249 |
-+QT += quick qml quickwidgets uitools |
250 |
- |
251 |
- include ($$PYTHONQT_GENERATED_PATH/com_trolltech_qt_core/com_trolltech_qt_core.pri) |
252 |
- include ($$PYTHONQT_GENERATED_PATH/com_trolltech_qt_gui/com_trolltech_qt_gui.pri) |
253 |
-@@ -34,6 +34,7 @@ include ($$PYTHONQT_GENERATED_PATH/com_t |
254 |
- include ($$PYTHONQT_GENERATED_PATH/com_trolltech_qt_multimedia/com_trolltech_qt_multimedia.pri) |
255 |
- include ($$PYTHONQT_GENERATED_PATH/com_trolltech_qt_qml/com_trolltech_qt_qml.pri) |
256 |
- include ($$PYTHONQT_GENERATED_PATH/com_trolltech_qt_quick/com_trolltech_qt_quick.pri) |
257 |
-+include ($$PYTHONQT_GENERATED_PATH/com_trolltech_qt_uitools/com_trolltech_qt_uitools.pri) |
258 |
- |
259 |
- PythonQtWebKit { |
260 |
- QT += webkit webkitwidgets |
261 |
-diff -uprNEBZ --suppress-blank-empty a/generator/abstractmetalang.cpp b/generator/abstractmetalang.cpp |
262 |
---- a/generator/abstractmetalang.cpp 2015-06-18 08:32:57.000000000 -0500 |
263 |
-+++ b/generator/abstractmetalang.cpp 2016-08-03 02:16:08.000000000 -0500 |
264 |
-@@ -838,14 +838,24 @@ AbstractMetaFunctionList AbstractMetaCla |
265 |
- return returned; |
266 |
- } |
267 |
- |
268 |
--bool AbstractMetaClass::hasDefaultIsNull() const |
269 |
-+QString AbstractMetaClass::getDefaultNonZeroFunction() const |
270 |
- { |
271 |
-+ foreach(const AbstractMetaFunction* fun, queryFunctionsByName("isEmpty")) { |
272 |
-+ if (fun->actualMinimumArgumentCount()==0 && fun->isPublic()) { |
273 |
-+ return "isEmpty"; |
274 |
-+ } |
275 |
-+ } |
276 |
-+ foreach(const AbstractMetaFunction* fun, queryFunctionsByName("isValid")) { |
277 |
-+ if (fun->actualMinimumArgumentCount() == 0 && fun->isPublic()) { |
278 |
-+ return "isValid"; |
279 |
-+ } |
280 |
-+ } |
281 |
- foreach(const AbstractMetaFunction* fun, queryFunctionsByName("isNull")) { |
282 |
-- if (fun->actualMinimumArgumentCount()==0) { |
283 |
-- return true; |
284 |
-+ if (fun->actualMinimumArgumentCount() == 0 && fun->isPublic()) { |
285 |
-+ return "isNull"; |
286 |
- } |
287 |
- } |
288 |
-- return false; |
289 |
-+ return QString(); |
290 |
- } |
291 |
- |
292 |
- /******************************************************************************* |
293 |
-diff -uprNEBZ --suppress-blank-empty a/generator/abstractmetalang.h b/generator/abstractmetalang.h |
294 |
---- a/generator/abstractmetalang.h 2014-09-25 05:51:32.000000000 -0500 |
295 |
-+++ b/generator/abstractmetalang.h 2016-08-01 04:12:32.000000000 -0500 |
296 |
-@@ -800,7 +800,8 @@ public: |
297 |
- void setHasCloneOperator(bool on) { m_has_clone_operator = on; } |
298 |
- bool hasCloneOperator() const { return m_has_clone_operator; } |
299 |
- |
300 |
-- bool hasDefaultIsNull() const; |
301 |
-+ QString getDefaultNonZeroFunction() const; |
302 |
-+ |
303 |
- void addPropertySpec(QPropertySpec *spec) { m_property_specs << spec; } |
304 |
- QList<QPropertySpec *> propertySpecs() const { return m_property_specs; } |
305 |
- |
306 |
-diff -uprNEBZ --suppress-blank-empty a/generator/merge.sh b/generator/merge.sh |
307 |
---- a/generator/merge.sh 1969-12-31 18:00:00.000000000 -0600 |
308 |
-+++ b/generator/merge.sh 2010-03-05 16:03:37.000000000 -0600 |
309 |
-@@ -0,0 +1,11 @@ |
310 |
-+#!/bin/sh |
311 |
-+ |
312 |
-+xsltproc -o typesystem_core.xml --stringparam source 'typesystem_core-qtscript.xml' merge.xsl typesystem_core-common.xml |
313 |
-+xsltproc -o typesystem_gui.xml --stringparam source 'typesystem_gui-qtscript.xml' merge.xsl typesystem_gui-common.xml |
314 |
-+xsltproc -o typesystem_opengl.xml --stringparam source 'typesystem_opengl-qtscript.xml' merge.xsl typesystem_opengl-common.xml |
315 |
-+xsltproc -o typesystem_network.xml --stringparam source 'typesystem_network-qtscript.xml' merge.xsl typesystem_network-common.xml |
316 |
-+xsltproc -o typesystem_xml.xml --stringparam source 'typesystem_xml-qtscript.xml' merge.xsl typesystem_xml-common.xml |
317 |
-+xsltproc -o typesystem_webkit.xml --stringparam source 'typesystem_webkit-qtscript.xml' merge.xsl typesystem_webkit-common.xml |
318 |
-+xsltproc -o typesystem_sql.xml --stringparam source 'typesystem_sql-qtscript.xml' merge.xsl typesystem_sql-common.xml |
319 |
-+xsltproc -o typesystem_svg.xml --stringparam source 'typesystem_svg-qtscript.xml' merge.xsl typesystem_svg-common.xml |
320 |
-+xsltproc -o typesystem_xmlpatterns.xml --stringparam source 'typesystem_xmlpatterns-qtscript.xml' merge.xsl typesystem_xmlpatterns-common.xml |
321 |
-\ No newline at end of file |
322 |
-diff -uprNEBZ --suppress-blank-empty a/generator/setupgenerator.cpp b/generator/setupgenerator.cpp |
323 |
---- a/generator/setupgenerator.cpp 2016-05-03 04:25:38.000000000 -0500 |
324 |
-+++ b/generator/setupgenerator.cpp 2016-08-01 04:12:32.000000000 -0500 |
325 |
-@@ -105,7 +105,7 @@ static QStringList getOperatorCodes(cons |
326 |
- r.insert("PythonQt::Type_InplaceXor"); |
327 |
- } |
328 |
- } |
329 |
-- if (cls->hasDefaultIsNull()) { |
330 |
-+ if (!cls->getDefaultNonZeroFunction().isEmpty()) { |
331 |
- r.insert("PythonQt::Type_NonZero"); |
332 |
- } |
333 |
- |
334 |
-diff -uprNEBZ --suppress-blank-empty a/generator/shellheadergenerator.cpp b/generator/shellheadergenerator.cpp |
335 |
---- a/generator/shellheadergenerator.cpp 2016-05-10 10:01:30.000000000 -0500 |
336 |
-+++ b/generator/shellheadergenerator.cpp 2016-08-09 07:20:29.000000000 -0500 |
337 |
-@@ -267,7 +267,11 @@ void ShellHeaderGenerator::write(QTextSt |
338 |
- QList<FlagsTypeEntry*> flags; |
339 |
- foreach(AbstractMetaEnum* enum1, enums1) { |
340 |
- // catch gadgets and enums that are not exported on QObjects... |
341 |
-- if ((enum1->wasProtected() || enum1->wasPublic()) && (!meta_class->isQObject() || !enum1->hasQEnumsDeclaration())) { |
342 |
-+ // since we don't parse Q_FLAG(S), we also need to generate for Q_ENUM which might |
343 |
-+ // have a missing Q_FLAG(S) declaration. |
344 |
-+ if ((enum1->wasProtected() || enum1->wasPublic()) && |
345 |
-+ (!meta_class->isQObject() || !enum1->hasQEnumsDeclaration() || enum1->typeEntry()->flags())) |
346 |
-+ { |
347 |
- enums << enum1; |
348 |
- if (enum1->typeEntry()->flags()) { |
349 |
- flags << enum1->typeEntry()->flags(); |
350 |
-@@ -395,8 +399,13 @@ void ShellHeaderGenerator::write(QTextSt |
351 |
- if (meta_class->hasDefaultToStringFunction() || meta_class->hasToStringCapability()) { |
352 |
- s << " QString py_toString(" << meta_class->qualifiedCppName() << "*);" << endl; |
353 |
- } |
354 |
-- if (meta_class->hasDefaultIsNull()) { |
355 |
-- s << " bool __nonzero__(" << meta_class->qualifiedCppName() << "* obj) { return !obj->isNull(); }" << endl; |
356 |
-+ QString nonZeroFunc = meta_class->getDefaultNonZeroFunction(); |
357 |
-+ if (!nonZeroFunc.isEmpty()) { |
358 |
-+ s << " bool __nonzero__(" << meta_class->qualifiedCppName() << "* obj) { return "; |
359 |
-+ if (nonZeroFunc != "isValid") { |
360 |
-+ s << "!"; |
361 |
-+ } |
362 |
-+ s << "obj->" << nonZeroFunc << "(); }" << endl; |
363 |
- } |
364 |
- |
365 |
- AbstractMetaFieldList fields = meta_class->fields(); |
366 |
-diff -uprNEBZ --suppress-blank-empty a/generator/typesystem_core.xml b/generator/typesystem_core.xml |
367 |
---- a/generator/typesystem_core.xml 2016-05-30 07:33:59.000000000 -0500 |
368 |
-+++ b/generator/typesystem_core.xml 2016-06-13 04:54:38.000000000 -0500 |
369 |
-@@ -550,6 +550,8 @@ |
370 |
- <rejection class="QObject" function-name="disconnectNotify"/> |
371 |
- <rejection class="QObject" function-name="registerUserData"/> |
372 |
- <rejection class="QProcess" function-name="pid"/> |
373 |
-+ <rejection class="QProcess" function-name="setInheritHandles"/> |
374 |
-+ <rejection class="QProcess" function-name="inheritHandles"/> |
375 |
- <rejection class="QRegion" function-name="cleanUp"/> |
376 |
- <rejection class="QSettings" function-name="registerFormat"/> |
377 |
- <rejection class="QVector" function-name="back"/> |
378 |
-diff -uprNEBZ --suppress-blank-empty a/generator/typesystem_gui.xml b/generator/typesystem_gui.xml |
379 |
---- a/generator/typesystem_gui.xml 2016-06-01 03:20:27.000000000 -0500 |
380 |
-+++ b/generator/typesystem_gui.xml 2016-06-20 04:58:59.000000000 -0500 |
381 |
-@@ -1307,6 +1307,17 @@ PyObject* constScanLine(QImage* image, i |
382 |
- <object-type name="QWizard"> |
383 |
- <!-- ### Requires correct class name in meta object --> |
384 |
- <modify-function signature="setDefaultProperty(const char *, const char *, const char *)" remove="all"/> |
385 |
-+ |
386 |
-+ <modify-function signature="addPage(QWizardPage*)"> |
387 |
-+ <modify-argument index="1"> |
388 |
-+ <define-ownership owner="c++" /> |
389 |
-+ </modify-argument> |
390 |
-+ </modify-function> |
391 |
-+ <modify-function signature="setButton(QWizard::WizardButton, QAbstractButton*)"> |
392 |
-+ <modify-argument index="2"> |
393 |
-+ <define-ownership owner="c++" /> |
394 |
-+ </modify-argument> |
395 |
-+ </modify-function> |
396 |
- </object-type> |
397 |
- <object-type name="QWizardPage"> |
398 |
- </object-type> |
399 |
-diff -uprNEBZ --suppress-blank-empty a/src/PythonQtConversion.cpp b/src/PythonQtConversion.cpp |
400 |
---- a/src/PythonQtConversion.cpp 2016-06-02 07:30:53.000000000 -0500 |
401 |
-+++ b/src/PythonQtConversion.cpp 2016-07-21 08:36:40.000000000 -0500 |
402 |
-@@ -746,9 +746,14 @@ QString PythonQtConv::PyObjGetRepresenta |
403 |
- QString PythonQtConv::PyObjGetString(PyObject* val, bool strict, bool& ok) { |
404 |
- QString r; |
405 |
- ok = true; |
406 |
-+#ifndef PY3K |
407 |
-+ // in Python 3, we don't want to convert to QString, since we don't know anything about the encoding |
408 |
-+ // in Python 2, we assume the default for str is latin-1 |
409 |
- if (val->ob_type == &PyBytes_Type) { |
410 |
-- r = QString(PyBytes_AS_STRING(val)); |
411 |
-- } else if (PyUnicode_Check(val)) { |
412 |
-+ r = QString::fromLatin1(PyBytes_AS_STRING(val)); |
413 |
-+ } else |
414 |
-+#endif |
415 |
-+ if (PyUnicode_Check(val)) { |
416 |
- #ifdef PY3K |
417 |
- r = QString::fromUtf8(PyUnicode_AsUTF8(val)); |
418 |
- #else |
419 |
-@@ -976,8 +981,15 @@ QVariant PythonQtConv::PyObjToQVariant(P |
420 |
- #endif |
421 |
- ) { |
422 |
- // no special type requested |
423 |
-- if (PyBytes_Check(val) || PyUnicode_Check(val)) { |
424 |
-- // NOTE: for compatibility reasons between Python 2/3 we don't use ByteArray for PyBytes_Type |
425 |
-+ if (PyBytes_Check(val)) { |
426 |
-+#ifdef PY3K |
427 |
-+ // In Python 3, it is a ByteArray |
428 |
-+ type = QVariant::ByteArray; |
429 |
-+#else |
430 |
-+ // In Python 2, we need to use String, since it might be a string |
431 |
-+ type = QVariant::String; |
432 |
-+#endif |
433 |
-+ } else if (PyUnicode_Check(val)) { |
434 |
- type = QVariant::String; |
435 |
- } else if (val == Py_False || val == Py_True) { |
436 |
- type = QVariant::Bool; |
437 |
-@@ -1117,6 +1129,14 @@ QVariant PythonQtConv::PyObjToQVariant(P |
438 |
- } |
439 |
- |
440 |
- case QVariant::ByteArray: |
441 |
-+ { |
442 |
-+ bool ok; |
443 |
-+#ifdef PY3K |
444 |
-+ v = QVariant(PyObjGetBytes(val, false, ok)); |
445 |
-+#else |
446 |
-+ v = QVariant(PyObjGetString(val, false, ok)); |
447 |
-+#endif |
448 |
-+ } |
449 |
- case QVariant::String: |
450 |
- { |
451 |
- bool ok; |
452 |
-@@ -1504,7 +1524,7 @@ QByteArray PythonQtConv::getCPPTypeName( |
453 |
- bool PythonQtConv::isStringType(PyTypeObject* type) |
454 |
- { |
455 |
- #ifdef PY3K |
456 |
-- return type == &PyUnicode_Type |
457 |
-+ return type == &PyUnicode_Type; |
458 |
- #else |
459 |
- return type == &PyUnicode_Type || type == &PyString_Type; |
460 |
- #endif |
461 |
-diff -uprNEBZ --suppress-blank-empty a/src/PythonQt.cpp b/src/PythonQt.cpp |
462 |
---- a/src/PythonQt.cpp 2016-05-23 02:31:11.000000000 -0500 |
463 |
-+++ b/src/PythonQt.cpp 2016-06-20 03:26:33.000000000 -0500 |
464 |
-@@ -1977,6 +1977,7 @@ void PythonQtPrivate::buildDynamicMetaOb |
465 |
- // Now look for slots: (this is a bug in QMetaObjectBuilder, all signals need to be added first) |
466 |
- while (PyDict_Next(dict, &pos, &key, &value)) { |
467 |
- if (PythonQtProperty_Check(value)) { |
468 |
-+ needsMetaObject = true; |
469 |
- PythonQtProperty* prop = (PythonQtProperty*)value; |
470 |
- QMetaPropertyBuilder newProp = builder.addProperty(PyString_AsString(key), prop->data->cppType); |
471 |
- newProp.setReadable(true); |
472 |
-diff -uprNEBZ --suppress-blank-empty a/src/PythonQtSlotDecorator.cpp b/src/PythonQtSlotDecorator.cpp |
473 |
---- a/src/PythonQtSlotDecorator.cpp 2016-05-19 10:22:41.000000000 -0500 |
474 |
-+++ b/src/PythonQtSlotDecorator.cpp 2016-07-21 08:36:40.000000000 -0500 |
475 |
-@@ -42,9 +42,9 @@ int PythonQtSlotDecorator_init(PyObject |
476 |
- char* argName = 0; |
477 |
- PyObject* argResult = 0; |
478 |
- |
479 |
-- static char* kwlist[] = {"name", "result", 0}; |
480 |
-+ static const char* kwlist[] = {"name", "result", 0}; |
481 |
- static PyObject* emptyTuple = PyTuple_New(0); |
482 |
-- if (!PyArg_ParseTupleAndKeywords(emptyTuple, kw, "|sO:QtCore.Slot", kwlist, &argName, &argResult)) { |
483 |
-+ if (!PyArg_ParseTupleAndKeywords(emptyTuple, kw, "|sO:QtCore.Slot", (char**) kwlist, &argName, &argResult)) { |
484 |
- return 0; |
485 |
- } |
486 |
- |
487 |
-diff -uprNEBZ --suppress-blank-empty a/src/PythonQtStdDecorators.cpp b/src/PythonQtStdDecorators.cpp |
488 |
---- a/src/PythonQtStdDecorators.cpp 2016-06-06 06:45:45.000000000 -0500 |
489 |
-+++ b/src/PythonQtStdDecorators.cpp 2016-06-20 03:26:33.000000000 -0500 |
490 |
-@@ -153,12 +153,12 @@ QVariant PythonQtStdDecorators::property |
491 |
- return o->property(name); |
492 |
- } |
493 |
- |
494 |
--QString PythonQtStdDecorators::tr(QObject* obj, const QByteArray& text, const QByteArray& ambig, int n) |
495 |
-+QString PythonQtStdDecorators::tr(QObject* obj, const QString& text, const QString& ambig, int n) |
496 |
- { |
497 |
- #if( QT_VERSION >= QT_VERSION_CHECK(5,0,0) ) |
498 |
-- return QCoreApplication::translate(obj->metaObject()->className(), text.constData(), ambig.constData(), n); |
499 |
-+ return QCoreApplication::translate(obj->metaObject()->className(), text.toUtf8().constData(), ambig.toUtf8().constData(), n); |
500 |
- #else |
501 |
-- return QCoreApplication::translate(obj->metaObject()->className(), text.constData(), ambig.constData(), QCoreApplication::CodecForTr, n); |
502 |
-+ return QCoreApplication::translate(obj->metaObject()->className(), text.toUtf8().constData(), ambig.toUtf8().constData(), QCoreApplication::CodecForTr, n); |
503 |
- #endif |
504 |
- } |
505 |
- |
506 |
-diff -uprNEBZ --suppress-blank-empty a/src/PythonQtStdDecorators.h b/src/PythonQtStdDecorators.h |
507 |
---- a/src/PythonQtStdDecorators.h 2016-06-06 06:45:45.000000000 -0500 |
508 |
-+++ b/src/PythonQtStdDecorators.h 2016-06-20 03:26:33.000000000 -0500 |
509 |
-@@ -106,10 +106,10 @@ public Q_SLOTS: |
510 |
- int static_Qt_qrand() { return qrand(); } |
511 |
- void static_Qt_qsrand(uint a) { qsrand(a); } |
512 |
- |
513 |
-- QString tr(QObject* obj, const QByteArray& text, const QByteArray& ambig = QByteArray(), int n = -1); |
514 |
-+ QString tr(QObject* obj, const QString& text, const QString& ambig = QString(), int n = -1); |
515 |
- |
516 |
-- QByteArray static_Qt_SIGNAL(const QByteArray& s) { return QByteArray("2") + s; } |
517 |
-- QByteArray static_Qt_SLOT(const QByteArray& s) { return QByteArray("1") + s; } |
518 |
-+ QString static_Qt_SIGNAL(const QString& s) { return QString("2") + s; } |
519 |
-+ QString static_Qt_SLOT(const QString& s) { return QString("1") + s; } |
520 |
- |
521 |
- void static_QTimer_singleShot(int msec, PyObject* callable); |
522 |
- |