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
|
Early workarounds to fix build with upcoming Qt6.7.0 not to have
to wait for the matching PyQt6-6.7.0. Not fully correct fixes,
but should be better than failing. May need revision given 6.7
apis are not finalized as of the writing of this.
Caused by the following commits:
https://github.com/qt/qtbase/commit/fd48ce0b73c (qdatastream+pyqtpyboject)
> qsizetype is ssize_t and ends up more correct (e.g. for Py_ssize_t)
https://github.com/qt/qtbase/commit/7a3fed3f209 (qtimezone)
> removed, can just drop these if 6.7 and ignore the replacement
https://github.com/qt/qtbase/commit/19bc5de296a (qfont)
https://github.com/qt/qtbase/commit/bde443801fe (qfont)
> these tag features are new'ish (and changing) and only available if
> >=6.6 as-is, let's just drop them if 6.7 as no revdeps should need yet
--- a/qpy/QtCore/qpycore_pyqtpyobject.cpp
+++ b/qpy/QtCore/qpycore_pyqtpyobject.cpp
@@ -173,9 +173,13 @@
{
char *ser;
+#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
+ qsizetype len;
+#else
uint len;
+#endif
in.readBytes(ser, len);
- if (len)
+ if (len > 0)
{
static PyObject *loads = 0;
--- a/sip/QtCore/QtCoremod.sip
+++ b/sip/QtCore/QtCoremod.sip
@@ -23,5 +23,5 @@
%Module(name=PyQt6.QtCore, call_super_init=True, default_VirtualErrorHandler=PyQt6, keyword_arguments="Optional", use_limited_api=True, py_ssize_t_clean=True)
-%Timeline {Qt_6_0_0 Qt_6_1_0 Qt_6_2_0 Qt_6_3_0 Qt_6_4_0 Qt_6_5_0 Qt_6_6_0}
+%Timeline {Qt_6_0_0 Qt_6_1_0 Qt_6_2_0 Qt_6_3_0 Qt_6_4_0 Qt_6_5_0 Qt_6_6_0 Qt_6_7_0}
%Platforms {Android iOS Linux macOS WebAssembly Windows}
--- a/sip/QtCore/qdatastream.sip
+++ b/sip/QtCore/qdatastream.sip
@@ -123,5 +123,9 @@
%MethodCode
char *s;
+#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
+ qsizetype l;
+#else
uint l;
+#endif
Py_BEGIN_ALLOW_THREADS
--- a/sip/QtCore/qtimezone.sip
+++ b/sip/QtCore/qtimezone.sip
@@ -72,6 +72,8 @@
~QTimeZone();
void swap(QTimeZone &other /Constrained/);
+%If (- Qt_6_7_0)
bool operator==(const QTimeZone &other) const;
bool operator!=(const QTimeZone &other) const;
+%End
bool isValid() const;
QByteArray id() const;
--- a/sip/QtGui/qfont.sip
+++ b/sip/QtGui/qfont.sip
@@ -209,4 +209,5 @@
QStringList families() const;
void setFamilies(const QStringList &);
+%If (- Qt_6_7_0)
%If (Qt_6_6_0 -)
void setFeature(quint32 tag, quint32 value);
@@ -239,4 +240,5 @@
static quint32 stringToTag(const char *tagString /Encoding="None"/);
%End
+%End
};
|