summaryrefslogtreecommitdiffstats
path: root/deps/PyQt5/patches/pyqt5-cura-crash.patch
blob: 9b79407cd8fa460958972cd0a410a9d1e47690b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
diff -ur --new-file PyQt5_gpl-5.10.1/qpy/QtQuick/qpyquick_register_type.cpp PyQt5_gpl-5.10.2.dev1803281228/qpy/QtQuick/qpyquick_register_type.cpp
--- PyQt5_gpl-5.10.1/qpy/QtQuick/qpyquick_register_type.cpp	2018-02-27 11:43:52.000000000 +0100
+++ PyQt5_gpl-5.10.2.dev1803281228/qpy/QtQuick/qpyquick_register_type.cpp	2018-03-29 03:32:17.000000000 +0200
@@ -22,6 +22,8 @@
 #include "qpyquickframebufferobject.h"
 #include "qpyquickitem.h"
 #include "qpyquickpainteditem.h"
+#include "qpyquickview.h"
+#include "qpyquickwindow.h"
 
 #include "sipAPIQtQuick.h"
 
@@ -30,6 +32,9 @@
         const QMetaObject *mo, const QByteArray &ptr_name,
         const QByteArray &list_name, QQmlPrivate::RegisterType **rtp)
 {
+    // Make sure the types are tested in the right order (ie. more specific
+    // types first).
+
 #if QT_VERSION >= 0x050200
     if (PyType_IsSubtype(py_type, sipTypeAsPyTypeObject(sipType_QQuickFramebufferObject)))
         return ((*rtp = QPyQuickFramebufferObject::addType(py_type, mo, ptr_name, list_name)) ? sipErrorNone : sipErrorFail);
@@ -41,6 +46,12 @@
     if (PyType_IsSubtype(py_type, sipTypeAsPyTypeObject(sipType_QQuickItem)))
         return ((*rtp = QPyQuickItem::addType(py_type, mo, ptr_name, list_name)) ? sipErrorNone : sipErrorFail);
 
+    if (PyType_IsSubtype(py_type, sipTypeAsPyTypeObject(sipType_QQuickView)))
+        return ((*rtp = QPyQuickView::addType(py_type, mo, ptr_name, list_name)) ? sipErrorNone : sipErrorFail);
+
+    if (PyType_IsSubtype(py_type, sipTypeAsPyTypeObject(sipType_QQuickWindow)))
+        return ((*rtp = QPyQuickWindow::addType(py_type, mo, ptr_name, list_name)) ? sipErrorNone : sipErrorFail);
+
     // We don't recognise the type.
     return sipErrorContinue;
 }
diff -ur --new-file PyQt5_gpl-5.10.1/qpy/QtQuick/qpyquickview.cpp PyQt5_gpl-5.10.2.dev1803281228/qpy/QtQuick/qpyquickview.cpp
--- PyQt5_gpl-5.10.1/qpy/QtQuick/qpyquickview.cpp	1970-01-01 01:00:00.000000000 +0100
+++ PyQt5_gpl-5.10.2.dev1803281228/qpy/QtQuick/qpyquickview.cpp	2018-03-29 03:32:17.000000000 +0200
@@ -0,0 +1,155 @@
+// This is the implementation of the QPyQuickWindow classes.
+//
+// Copyright (c) 2018 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of PyQt5.
+// 
+// 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 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 do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#include <Python.h>
+
+#include <QQmlListProperty>
+
+#include "qpyquickview.h"
+
+#include "sipAPIQtQuick.h"
+
+
+// The maximum number of Python QQuickView types.
+const int NrOfQuickViewTypes = 20;
+
+// The list of registered Python types.
+static QList<PyTypeObject *> pyqt_types;
+
+// The registration data for the canned types.
+static QQmlPrivate::RegisterType canned_types[NrOfQuickViewTypes];
+
+
+#define QPYQUICKVIEW_INIT(n) \
+    case n##U: \
+        QPyQuickView##n::staticMetaObject = *mo; \
+        rt->typeId = qRegisterNormalizedMetaType<QPyQuickView##n *>(ptr_name); \
+        rt->listId = qRegisterNormalizedMetaType<QQmlListProperty<QPyQuickView##n> >(list_name); \
+        rt->objectSize = sizeof(QPyQuickView##n); \
+        rt->create = QQmlPrivate::createInto<QPyQuickView##n>; \
+        rt->metaObject = mo; \
+        rt->attachedPropertiesFunction = QQmlPrivate::attachedPropertiesFunc<QPyQuickView##n>(); \
+        rt->attachedPropertiesMetaObject = QQmlPrivate::attachedPropertiesMetaObject<QPyQuickView##n>(); \
+        rt->parserStatusCast = QQmlPrivate::StaticCastSelector<QPyQuickView##n,QQmlParserStatus>::cast(); \
+        rt->valueSourceCast = QQmlPrivate::StaticCastSelector<QPyQuickView##n,QQmlPropertyValueSource>::cast(); \
+        rt->valueInterceptorCast = QQmlPrivate::StaticCastSelector<QPyQuickView##n,QQmlPropertyValueInterceptor>::cast(); \
+        break
+
+
+// The ctor.
+QPyQuickView::QPyQuickView(QWindow *parent) : sipQQuickView(parent)
+{
+}
+
+
+// Add a new Python type and return its number.
+QQmlPrivate::RegisterType *QPyQuickView::addType(PyTypeObject *type,
+        const QMetaObject *mo, const QByteArray &ptr_name,
+        const QByteArray &list_name)
+{
+    int type_nr = pyqt_types.size();
+
+    // Check we have a spare canned type.
+    if (type_nr >= NrOfQuickViewTypes)
+    {
+        PyErr_Format(PyExc_TypeError,
+                "a maximum of %d QQuickView types may be registered with QML",
+                NrOfQuickViewTypes);
+        return 0;
+    }
+
+    pyqt_types.append(type);
+
+    QQmlPrivate::RegisterType *rt = &canned_types[type_nr];
+
+    // Initialise those members that depend on the C++ type.
+    switch (type_nr)
+    {
+        QPYQUICKVIEW_INIT(0);
+        QPYQUICKVIEW_INIT(1);
+        QPYQUICKVIEW_INIT(2);
+        QPYQUICKVIEW_INIT(3);
+        QPYQUICKVIEW_INIT(4);
+        QPYQUICKVIEW_INIT(5);
+        QPYQUICKVIEW_INIT(6);
+        QPYQUICKVIEW_INIT(7);
+        QPYQUICKVIEW_INIT(8);
+        QPYQUICKVIEW_INIT(9);
+        QPYQUICKVIEW_INIT(10);
+        QPYQUICKVIEW_INIT(11);
+        QPYQUICKVIEW_INIT(12);
+        QPYQUICKVIEW_INIT(13);
+        QPYQUICKVIEW_INIT(14);
+        QPYQUICKVIEW_INIT(15);
+        QPYQUICKVIEW_INIT(16);
+        QPYQUICKVIEW_INIT(17);
+        QPYQUICKVIEW_INIT(18);
+        QPYQUICKVIEW_INIT(19);
+    }
+
+    return rt;
+}
+
+
+// Create the Python instance.
+void QPyQuickView::createPyObject(QWindow *parent)
+{
+    SIP_BLOCK_THREADS
+
+    // Assume C++ owns everything.
+    PyObject *obj = sipConvertFromNewPyType(this, pyqt_types.at(typeNr()),
+            NULL, &sipPySelf, "D", parent, sipType_QWindow, NULL);
+
+    if (!obj)
+        pyqt5_qtquick_err_print();
+
+    SIP_UNBLOCK_THREADS
+}
+
+
+// The canned type implementations.
+#define QPYQUICKVIEW_IMPL(n) \
+QPyQuickView##n::QPyQuickView##n(QWindow *parent) : QPyQuickView(parent) \
+{ \
+    createPyObject(parent); \
+} \
+QMetaObject QPyQuickView##n::staticMetaObject
+
+
+QPYQUICKVIEW_IMPL(0);
+QPYQUICKVIEW_IMPL(1);
+QPYQUICKVIEW_IMPL(2);
+QPYQUICKVIEW_IMPL(3);
+QPYQUICKVIEW_IMPL(4);
+QPYQUICKVIEW_IMPL(5);
+QPYQUICKVIEW_IMPL(6);
+QPYQUICKVIEW_IMPL(7);
+QPYQUICKVIEW_IMPL(8);
+QPYQUICKVIEW_IMPL(9);
+QPYQUICKVIEW_IMPL(10);
+QPYQUICKVIEW_IMPL(11);
+QPYQUICKVIEW_IMPL(12);
+QPYQUICKVIEW_IMPL(13);
+QPYQUICKVIEW_IMPL(14);
+QPYQUICKVIEW_IMPL(15);
+QPYQUICKVIEW_IMPL(16);
+QPYQUICKVIEW_IMPL(17);
+QPYQUICKVIEW_IMPL(18);
+QPYQUICKVIEW_IMPL(19);
diff -ur --new-file PyQt5_gpl-5.10.1/qpy/QtQuick/qpyquickview.h PyQt5_gpl-5.10.2.dev1803281228/qpy/QtQuick/qpyquickview.h
--- PyQt5_gpl-5.10.1/qpy/QtQuick/qpyquickview.h	1970-01-01 01:00:00.000000000 +0100
+++ PyQt5_gpl-5.10.2.dev1803281228/qpy/QtQuick/qpyquickview.h	2018-03-29 03:32:17.000000000 +0200
@@ -0,0 +1,87 @@
+// This is the definition of the QPyQuickView classes.
+//
+// Copyright (c) 2018 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of PyQt5.
+// 
+// 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 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 do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef _QPYQUICKVIEW_H
+#define _QPYQUICKVIEW_H
+
+
+#include <Python.h>
+
+#include <qqmlprivate.h>
+#include <QByteArray>
+#include <QMetaObject>
+#include <QQuickView>
+
+#include "sipAPIQtQuick.h"
+
+
+class QPyQuickView : public sipQQuickView
+{
+public:
+    QPyQuickView(QWindow *parent = 0);
+
+    virtual int typeNr() const = 0;
+
+    static QQmlPrivate::RegisterType *addType(PyTypeObject *type,
+            const QMetaObject *mo, const QByteArray &ptr_name,
+            const QByteArray &list_name);
+    void createPyObject(QWindow *parent);
+
+private:
+    QPyQuickView(const QPyQuickView &);
+};
+
+
+// The canned type declarations.
+#define QPYQUICKVIEW_DECL(n) \
+class QPyQuickView##n : public QPyQuickView \
+{ \
+public: \
+    QPyQuickView##n(QWindow *parent = 0); \
+    static QMetaObject staticMetaObject; \
+    virtual int typeNr() const {return n##U;} \
+private: \
+    QPyQuickView##n(const QPyQuickView##n &); \
+}
+
+
+QPYQUICKVIEW_DECL(0);
+QPYQUICKVIEW_DECL(1);
+QPYQUICKVIEW_DECL(2);
+QPYQUICKVIEW_DECL(3);
+QPYQUICKVIEW_DECL(4);
+QPYQUICKVIEW_DECL(5);
+QPYQUICKVIEW_DECL(6);
+QPYQUICKVIEW_DECL(7);
+QPYQUICKVIEW_DECL(8);
+QPYQUICKVIEW_DECL(9);
+QPYQUICKVIEW_DECL(10);
+QPYQUICKVIEW_DECL(11);
+QPYQUICKVIEW_DECL(12);
+QPYQUICKVIEW_DECL(13);
+QPYQUICKVIEW_DECL(14);
+QPYQUICKVIEW_DECL(15);
+QPYQUICKVIEW_DECL(16);
+QPYQUICKVIEW_DECL(17);
+QPYQUICKVIEW_DECL(18);
+QPYQUICKVIEW_DECL(19);
+
+
+#endif
diff -ur --new-file PyQt5_gpl-5.10.1/qpy/QtQuick/qpyquickwindow.cpp PyQt5_gpl-5.10.2.dev1803281228/qpy/QtQuick/qpyquickwindow.cpp
--- PyQt5_gpl-5.10.1/qpy/QtQuick/qpyquickwindow.cpp	1970-01-01 01:00:00.000000000 +0100
+++ PyQt5_gpl-5.10.2.dev1803281228/qpy/QtQuick/qpyquickwindow.cpp	2018-03-29 03:32:17.000000000 +0200
@@ -0,0 +1,155 @@
+// This is the implementation of the QPyQuickWindow classes.
+//
+// Copyright (c) 2018 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of PyQt5.
+// 
+// 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 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 do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#include <Python.h>
+
+#include <QQmlListProperty>
+
+#include "qpyquickwindow.h"
+
+#include "sipAPIQtQuick.h"
+
+
+// The maximum number of Python QQuickWindow types.
+const int NrOfQuickWindowTypes = 20;
+
+// The list of registered Python types.
+static QList<PyTypeObject *> pyqt_types;
+
+// The registration data for the canned types.
+static QQmlPrivate::RegisterType canned_types[NrOfQuickWindowTypes];
+
+
+#define QPYQUICKWINDOW_INIT(n) \
+    case n##U: \
+        QPyQuickWindow##n::staticMetaObject = *mo; \
+        rt->typeId = qRegisterNormalizedMetaType<QPyQuickWindow##n *>(ptr_name); \
+        rt->listId = qRegisterNormalizedMetaType<QQmlListProperty<QPyQuickWindow##n> >(list_name); \
+        rt->objectSize = sizeof(QPyQuickWindow##n); \
+        rt->create = QQmlPrivate::createInto<QPyQuickWindow##n>; \
+        rt->metaObject = mo; \
+        rt->attachedPropertiesFunction = QQmlPrivate::attachedPropertiesFunc<QPyQuickWindow##n>(); \
+        rt->attachedPropertiesMetaObject = QQmlPrivate::attachedPropertiesMetaObject<QPyQuickWindow##n>(); \
+        rt->parserStatusCast = QQmlPrivate::StaticCastSelector<QPyQuickWindow##n,QQmlParserStatus>::cast(); \
+        rt->valueSourceCast = QQmlPrivate::StaticCastSelector<QPyQuickWindow##n,QQmlPropertyValueSource>::cast(); \
+        rt->valueInterceptorCast = QQmlPrivate::StaticCastSelector<QPyQuickWindow##n,QQmlPropertyValueInterceptor>::cast(); \
+        break
+
+
+// The ctor.
+QPyQuickWindow::QPyQuickWindow(QWindow *parent) : sipQQuickWindow(parent)
+{
+}
+
+
+// Add a new Python type and return its number.
+QQmlPrivate::RegisterType *QPyQuickWindow::addType(PyTypeObject *type,
+        const QMetaObject *mo, const QByteArray &ptr_name,
+        const QByteArray &list_name)
+{
+    int type_nr = pyqt_types.size();
+
+    // Check we have a spare canned type.
+    if (type_nr >= NrOfQuickWindowTypes)
+    {
+        PyErr_Format(PyExc_TypeError,
+                "a maximum of %d QQuickWindow types may be registered with QML",
+                NrOfQuickWindowTypes);
+        return 0;
+    }
+
+    pyqt_types.append(type);
+
+    QQmlPrivate::RegisterType *rt = &canned_types[type_nr];
+
+    // Initialise those members that depend on the C++ type.
+    switch (type_nr)
+    {
+        QPYQUICKWINDOW_INIT(0);
+        QPYQUICKWINDOW_INIT(1);
+        QPYQUICKWINDOW_INIT(2);
+        QPYQUICKWINDOW_INIT(3);
+        QPYQUICKWINDOW_INIT(4);
+        QPYQUICKWINDOW_INIT(5);
+        QPYQUICKWINDOW_INIT(6);
+        QPYQUICKWINDOW_INIT(7);
+        QPYQUICKWINDOW_INIT(8);
+        QPYQUICKWINDOW_INIT(9);
+        QPYQUICKWINDOW_INIT(10);
+        QPYQUICKWINDOW_INIT(11);
+        QPYQUICKWINDOW_INIT(12);
+        QPYQUICKWINDOW_INIT(13);
+        QPYQUICKWINDOW_INIT(14);
+        QPYQUICKWINDOW_INIT(15);
+        QPYQUICKWINDOW_INIT(16);
+        QPYQUICKWINDOW_INIT(17);
+        QPYQUICKWINDOW_INIT(18);
+        QPYQUICKWINDOW_INIT(19);
+    }
+
+    return rt;
+}
+
+
+// Create the Python instance.
+void QPyQuickWindow::createPyObject(QWindow *parent)
+{
+    SIP_BLOCK_THREADS
+
+    // Assume C++ owns everything.
+    PyObject *obj = sipConvertFromNewPyType(this, pyqt_types.at(typeNr()),
+            NULL, &sipPySelf, "D", parent, sipType_QWindow, NULL);
+
+    if (!obj)
+        pyqt5_qtquick_err_print();
+
+    SIP_UNBLOCK_THREADS
+}
+
+
+// The canned type implementations.
+#define QPYQUICKWINDOW_IMPL(n) \
+QPyQuickWindow##n::QPyQuickWindow##n(QWindow *parent) : QPyQuickWindow(parent) \
+{ \
+    createPyObject(parent); \
+} \
+QMetaObject QPyQuickWindow##n::staticMetaObject
+
+
+QPYQUICKWINDOW_IMPL(0);
+QPYQUICKWINDOW_IMPL(1);
+QPYQUICKWINDOW_IMPL(2);
+QPYQUICKWINDOW_IMPL(3);
+QPYQUICKWINDOW_IMPL(4);
+QPYQUICKWINDOW_IMPL(5);
+QPYQUICKWINDOW_IMPL(6);
+QPYQUICKWINDOW_IMPL(7);
+QPYQUICKWINDOW_IMPL(8);
+QPYQUICKWINDOW_IMPL(9);
+QPYQUICKWINDOW_IMPL(10);
+QPYQUICKWINDOW_IMPL(11);
+QPYQUICKWINDOW_IMPL(12);
+QPYQUICKWINDOW_IMPL(13);
+QPYQUICKWINDOW_IMPL(14);
+QPYQUICKWINDOW_IMPL(15);
+QPYQUICKWINDOW_IMPL(16);
+QPYQUICKWINDOW_IMPL(17);
+QPYQUICKWINDOW_IMPL(18);
+QPYQUICKWINDOW_IMPL(19);
diff -ur --new-file PyQt5_gpl-5.10.1/qpy/QtQuick/qpyquickwindow.h PyQt5_gpl-5.10.2.dev1803281228/qpy/QtQuick/qpyquickwindow.h
--- PyQt5_gpl-5.10.1/qpy/QtQuick/qpyquickwindow.h	1970-01-01 01:00:00.000000000 +0100
+++ PyQt5_gpl-5.10.2.dev1803281228/qpy/QtQuick/qpyquickwindow.h	2018-03-29 03:32:17.000000000 +0200
@@ -0,0 +1,87 @@
+// This is the definition of the QPyQuickWindow classes.
+//
+// Copyright (c) 2018 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of PyQt5.
+// 
+// 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 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 do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef _QPYQUICKWINDOW_H
+#define _QPYQUICKWINDOW_H
+
+
+#include <Python.h>
+
+#include <qqmlprivate.h>
+#include <QByteArray>
+#include <QMetaObject>
+#include <QQuickWindow>
+
+#include "sipAPIQtQuick.h"
+
+
+class QPyQuickWindow : public sipQQuickWindow
+{
+public:
+    QPyQuickWindow(QWindow *parent = 0);
+
+    virtual int typeNr() const = 0;
+
+    static QQmlPrivate::RegisterType *addType(PyTypeObject *type,
+            const QMetaObject *mo, const QByteArray &ptr_name,
+            const QByteArray &list_name);
+    void createPyObject(QWindow *parent);
+
+private:
+    QPyQuickWindow(const QPyQuickWindow &);
+};
+
+
+// The canned type declarations.
+#define QPYQUICKWINDOW_DECL(n) \
+class QPyQuickWindow##n : public QPyQuickWindow \
+{ \
+public: \
+    QPyQuickWindow##n(QWindow *parent = 0); \
+    static QMetaObject staticMetaObject; \
+    virtual int typeNr() const {return n##U;} \
+private: \
+    QPyQuickWindow##n(const QPyQuickWindow##n &); \
+}
+
+
+QPYQUICKWINDOW_DECL(0);
+QPYQUICKWINDOW_DECL(1);
+QPYQUICKWINDOW_DECL(2);
+QPYQUICKWINDOW_DECL(3);
+QPYQUICKWINDOW_DECL(4);
+QPYQUICKWINDOW_DECL(5);
+QPYQUICKWINDOW_DECL(6);
+QPYQUICKWINDOW_DECL(7);
+QPYQUICKWINDOW_DECL(8);
+QPYQUICKWINDOW_DECL(9);
+QPYQUICKWINDOW_DECL(10);
+QPYQUICKWINDOW_DECL(11);
+QPYQUICKWINDOW_DECL(12);
+QPYQUICKWINDOW_DECL(13);
+QPYQUICKWINDOW_DECL(14);
+QPYQUICKWINDOW_DECL(15);
+QPYQUICKWINDOW_DECL(16);
+QPYQUICKWINDOW_DECL(17);
+QPYQUICKWINDOW_DECL(18);
+QPYQUICKWINDOW_DECL(19);
+
+
+#endif
diff -ur --new-file PyQt5_gpl-5.10.1/sip/QtQuick/qquickview.sip PyQt5_gpl-5.10.2.dev1803281228/sip/QtQuick/qquickview.sip
--- PyQt5_gpl-5.10.1/sip/QtQuick/qquickview.sip	2018-02-27 11:43:53.000000000 +0100
+++ PyQt5_gpl-5.10.2.dev1803281228/sip/QtQuick/qquickview.sip	2018-03-29 03:32:18.000000000 +0200
@@ -20,7 +20,7 @@
 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 
 
-class QQuickView : QQuickWindow
+class QQuickView : QQuickWindow /ExportDerived/
 {
 %TypeHeaderCode
 #include <qquickview.h>
diff -ur --new-file PyQt5_gpl-5.10.1/sip/QtQuick/qquickwindow.sip PyQt5_gpl-5.10.2.dev1803281228/sip/QtQuick/qquickwindow.sip
--- PyQt5_gpl-5.10.1/sip/QtQuick/qquickwindow.sip	2018-02-27 11:43:53.000000000 +0100
+++ PyQt5_gpl-5.10.2.dev1803281228/sip/QtQuick/qquickwindow.sip	2018-03-29 03:32:18.000000000 +0200
@@ -20,7 +20,7 @@
 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 
 
-class QQuickWindow : QWindow
+class QQuickWindow : QWindow /ExportDerived/
 {
 %TypeHeaderCode
 #include <qquickwindow.h>