[neon/forks/pyqt5/Neon/release-lts] /: New upstream version 5.15.1+dfsg
Dmitry Shachnev
null at kde.org
Wed May 26 11:29:29 BST 2021
Git commit 4f26d644519c7985c7f9a6f6a2b3b4ec148aee82 by Dmitry Shachnev.
Committed on 16/09/2020 at 18:14.
Pushed by jriddell into branch 'Neon/release-lts'.
New upstream version 5.15.1+dfsg
M +67 -0 ChangeLog
M +11 -4 NEWS
M +1 -1 PKG-INFO
M +4 -0 config-tests/cfgtest_QtCore.cpp
M +5 -2 configure.py
M +20 -6 project.py
M +1 -1 pyproject.toml
M +11 -1 qpy/QtCore/qpycore_classinfo.cpp
M +15 -1 qpy/QtCore/qpycore_enums_flags.cpp
M +40 -2 qpy/QtCore/qpycore_pyqtboundsignal.cpp
M +7 -0 qpy/QtCore/qpycore_qjsonvalue.cpp
M +1 -0 sip/QtCore/QtCoremod.sip
M +2 -2 sip/QtCore/qglobal.sip
M +1 -1 sip/QtCore/qjsonvalue.sip
M +2 -0 sip/QtGui/qcolor.sip
M +8 -5 sip/QtQuick/qsgnode.sip
M +1 -1 sip/QtQuick/qsgrendernode.sip
A +49 -0 sip/QtTextToSpeech/QtTextToSpeechmod.sip
A +101 -0 sip/QtTextToSpeech/qtexttospeech.sip
A +60 -0 sip/QtTextToSpeech/qvoice.sip
https://invent.kde.org/neon/forks/pyqt5/commit/4f26d644519c7985c7f9a6f6a2b3b4ec148aee82
diff --git a/ChangeLog b/ChangeLog
index c8f3a325..6c78c632 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,72 @@
+2020-09-11 Phil Thompson <phil at riverbankcomputing.com>
+
+ * NEWS:
+ Released as v5.15.1.
+ [f99d8e2299f1] [5.15.1] <5.15-maint>
+
+ * NEWS:
+ Updated the NEWS file.
+ [51b9d0e4a153] <5.15-maint>
+
+ * PyQt5.msp:
+ Fixed bugs related to QSGNode.
+ [a8a92e00511e] <5.15-maint>
+
+2020-08-27 Phil Thompson <phil at riverbankcomputing.com>
+
+ * PyQt5.msp, config-tests/cfgtest_QtCore.cpp:
+ Fixed building with compilers without constexpr support (ie. MSVC
+ 2015).
+ [ae7bb0399061] <5.15-maint>
+
+2020-08-22 Phil Thompson <phil at riverbankcomputing.com>
+
+ * lib/project.py:
+ Set the name of the sip module explicitly.
+ [16811c7f937c] <5.15-maint>
+
+2020-08-08 Phil Thompson <phil at riverbankcomputing.com>
+
+ * qpy/QtCore/qpycore_pyqtboundsignal.cpp:
+ Fix a signal disconnect() when None is passed as the argument.
+ [22794b6d6a6c] <5.15-maint>
+
+2020-07-11 Phil Thompson <phil at riverbankcomputing.com>
+
+ * NEWS, qpy/QtCore/qpycore_pyqtboundsignal.cpp:
+ Bound signals can now be tested for equality.
+ [2651d9efa223] <5.15-maint>
+
+ * NEWS, qpy/QtCore/qpycore_classinfo.cpp,
+ qpy/QtCore/qpycore_enums_flags.cpp:
+ Raise an appropriate exception if Q_CLASSINFO, Q_ENUM, Q_ENUMS,
+ Q_FLAG or Q_FLAGS are used on PyPy.
+ [1d22af022477] <5.15-maint>
+
+2020-06-16 Phil Thompson <phil at riverbankcomputing.com>
+
+ * NEWS, PyQt5.msp, lib/configure.py, lib/project.py:
+ Added the QtTextToSpeech module.
+ [d31c28251af2] <5.15-maint>
+
+2020-06-10 Phil Thompson <phil at riverbankcomputing.com>
+
+ * NEWS, PyQt5.msp, qpy/QtCore/qpycore_qjsonvalue.cpp:
+ None is now interpreted as a null QJsonValue.
+ [1b4fdf6609d4] <5.15-maint>
+
+2020-06-01 Phil Thompson <phil at riverbankcomputing.com>
+
+ * lib/project.py:
+ Fixed the platform tag for macOS wheels.
+ [72fd5bbd2388] <5.15-maint>
+
2020-05-30 Phil Thompson <phil at riverbankcomputing.com>
+ * .hgtags:
+ Added tag 5.15.0 for changeset 5e7e90d17d36
+ [720e8a99e5df]
+
* NEWS:
Released as v5.15.0.
[5e7e90d17d36] [5.15.0]
diff --git a/NEWS b/NEWS
index af2894b8..a4fe9c28 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,10 @@
+v5.15.1 12th September 2020
+ - Added the QtTextToSpeech module.
+ - None is now interpreted as a null QJsonValue.
+ - Bound signals can now be compared for equality.
+ - Q_CLASSINFO, Q_ENUM, Q_ENUMS, Q_FLAG and Q_FLAGS are not implemented when
+ using PyPy.
+
v5.15.0 1st June 2020
- Added support for Qt v5.15.0.
- Added the QtQuick3D module.
@@ -12,7 +19,7 @@ v5.14.2 3rd April 2020
- Added QFlags.__index__().
v5.14.1 6th January 2020
- - This is a bug fix release.
+ - This is a bug-fix release.
v5.14.0 18th December 2019
- Added support for Qt v5.14.0.
@@ -122,10 +129,10 @@ v5.9 3rd July 2017
- SIP v4.19.3 is required.
v5.8.2 30th March 2017
- - This is a bug fix release.
+ - This is a bug-fix release.
v5.8.1 7th March 2017
- - This is a bug fix release.
+ - This is a bug-fix release.
v5.8 15th February 2017
- Added support for Qt v5.8.0.
@@ -246,7 +253,7 @@ v5.2 8th January 2014
configure.py.
v5.1.1 16th October 2013
- - This is a bug fix release.
+ - This is a bug-fix release.
v5.1 2nd October 2013
- Added full support for Qt v5.1.
diff --git a/PKG-INFO b/PKG-INFO
index 29b613d8..4d0dc10f 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: PyQt5
-Version: 5.15.0
+Version: 5.15.1
Requires-Python: >=3.5
Summary: Python bindings for the Qt cross platform application toolkit
Home-Page: https://www.riverbankcomputing.com/software/pyqt/
diff --git a/config-tests/cfgtest_QtCore.cpp b/config-tests/cfgtest_QtCore.cpp
index 7fad5ba6..4dd7109f 100644
--- a/config-tests/cfgtest_QtCore.cpp
+++ b/config-tests/cfgtest_QtCore.cpp
@@ -38,5 +38,9 @@ int main(int argc, char **argv)
out << "PyQt_qreal_double\n";
#endif
+#if !defined(Q_COMPILER_CONSTEXPR) || !defined(Q_COMPILER_UNIFORM_INIT)
+ out << "PyQt_CONSTEXPR\n";
+#endif
+
return 0;
}
diff --git a/configure.py b/configure.py
index fdc86f23..bc267a79 100644
--- a/configure.py
+++ b/configure.py
@@ -28,7 +28,7 @@ import sys
# Initialise the constants.
-PYQT_VERSION_STR = "5.15.0"
+PYQT_VERSION_STR = "5.15.1"
SIP_MIN_VERSION = '4.19.23'
@@ -96,6 +96,7 @@ MODULE_METADATA = {
'QtSql': ModuleMetadata(qmake_QT=['sql', 'widgets']),
'QtSvg': ModuleMetadata(qmake_QT=['svg']),
'QtTest': ModuleMetadata(qmake_QT=['testlib', 'widgets']),
+ 'QtTextToSpeech': ModuleMetadata(qmake_QT=['texttospeech', '-gui']),
'QtWebChannel': ModuleMetadata(
qmake_QT=['webchannel', 'network',
'-gui']),
@@ -163,7 +164,7 @@ COMPOSITE_COMPONENTS = (
'QtWebKitWidgets', 'QtBluetooth', 'QtMacExtras', 'QtPositioning',
'QtWinExtras', 'QtX11Extras', 'QtQuick3D', 'QtQuickWidgets',
'QtWebSockets', 'Enginio', 'QtWebChannel',
- 'QtLocation', 'QtNfc', 'QtRemoteObjects'
+ 'QtLocation', 'QtNfc', 'QtRemoteObjects', 'QtTextToSpeech'
)
@@ -1495,6 +1496,8 @@ def check_5_15_modules(target_config, disabled_modules, verbose):
check_module(target_config, disabled_modules, verbose, 'QtQuick3D',
'qquick3d.h', 'QQuick3D::idealSurfaceFormat()')
+ check_module(target_config, disabled_modules, verbose, 'QtTextToSpeech',
+ 'QTextToSpeech', 'new QTextToSpeech()')
def generate_makefiles(target_config, verbose, parts, tracing, fatal_warnings, distinfo):
diff --git a/project.py b/project.py
index 338bd80e..e67aa377 100644
--- a/project.py
+++ b/project.py
@@ -33,7 +33,8 @@ class PyQt(PyQtProject):
def __init__(self):
""" Initialise the project. """
- super().__init__(abi_version='12.8', dunder_init=True, tag_prefix='Qt',
+ super().__init__(sip_module='PyQt5.sip', abi_version='12.8',
+ dunder_init=True, tag_prefix='Qt',
console_scripts=[
'pylupdate5 = PyQt5.pylupdate_main:main',
'pyrcc5 = PyQt5.pyrcc_main:main',
@@ -46,10 +47,11 @@ class PyQt(PyQtProject):
QtMultimediaWidgets, QtNetworkAuth, QtNfc, QtOpenGL, QtPositioning,
QtLocation, QtPrintSupport, QtQuick, QtQuick3D, QtQuickWidgets,
QtRemoteObjects, QtSensors, QtSerialPort, QtSql, QtSvg, QtTest,
- QtWebChannel, QtWebKit, QtWebKitWidgets, QtWebSockets, QtWinExtras,
- QtX11Extras, QtXml, QtXmlPatterns, _QOpenGLFunctions_2_0,
- _QOpenGLFunctions_2_1, _QOpenGLFunctions_4_1_Core,
- _QOpenGLFunctions_ES2, pylupdate, pyrcc]
+ QtTextToSpeech, QtWebChannel, QtWebKit, QtWebKitWidgets,
+ QtWebSockets, QtWinExtras, QtX11Extras, QtXml, QtXmlPatterns,
+ _QOpenGLFunctions_2_0, _QOpenGLFunctions_2_1,
+ _QOpenGLFunctions_4_1_Core, _QOpenGLFunctions_ES2, pylupdate,
+ pyrcc]
def apply_user_defaults(self, tool):
""" Set default values where needed. """
@@ -172,7 +174,7 @@ del find_qt
self.bindings['QtCore'].tags.append(plattag)
# Make sure the bindings are buildable.
- self.update_buildable_bindings()
+ super().update(tool)
# PyQtWebEngine needs to know if QtWebChannel is available.
if 'QtWebChannel' not in self.bindings:
@@ -918,6 +920,18 @@ class QtTest(PyQtBindings):
test_headers=['QtTest'], test_statement='QTest::qSleep(0)')
+class QtTextToSpeech(PyQtBindings):
+ """ The QtTextToSpeech bindings. """
+
+ def __init__(self, project):
+ """ Initialise the bindings. """
+
+ super().__init__(project, 'QtTextToSpeech',
+ qmake_QT=['texttospeech', '-gui'],
+ test_headers=['QTextToSpeech'],
+ test_statement='new QTextToSpeech()')
+
+
class QtWebChannel(PyQtBindings):
""" The QtWebChannel bindings. """
diff --git a/pyproject.toml b/pyproject.toml
index 66917a68..49d36505 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -6,7 +6,7 @@ build-backend = "sipbuild.api"
# Specify the PEP 566 metadata for the project.
[tool.sip.metadata]
name = "PyQt5"
-version = "5.15.0"
+version = "5.15.1"
summary = "Python bindings for the Qt cross platform application toolkit"
home-page = "https://www.riverbankcomputing.com/software/pyqt/"
author = "Riverbank Computing Limited"
diff --git a/qpy/QtCore/qpycore_classinfo.cpp b/qpy/QtCore/qpycore_classinfo.cpp
index 803d1740..781e078e 100644
--- a/qpy/QtCore/qpycore_classinfo.cpp
+++ b/qpy/QtCore/qpycore_classinfo.cpp
@@ -34,6 +34,11 @@ static QMultiHash<const struct _frame *, ClassInfo> class_info_hash;
// Add the given name/value pair to the current class info hash.
PyObject *qpycore_ClassInfo(const char *name, const char *value)
{
+#if defined(PYPY_VERSION)
+ PyErr_SetString(PyExc_AttributeError,
+ "Q_CLASSINFO is not supported on PyPy");
+ return 0;
+#else
// We need the frame we were called from, not the current one.
struct _frame *frame = sipGetFrame(1);
@@ -48,16 +53,21 @@ PyObject *qpycore_ClassInfo(const char *name, const char *value)
Py_INCREF(Py_None);
return Py_None;
+#endif
}
// Return the current class info list.
QList<ClassInfo> qpycore_get_class_info_list()
{
+ QList<ClassInfo> class_info_list;
+
+#if !defined(PYPY_VERSION)
struct _frame *frame = sipGetFrame(0);
- QList<ClassInfo> class_info_list = class_info_hash.values(frame);
+ class_info_list = class_info_hash.values(frame);
class_info_hash.remove(frame);
+#endif
return class_info_list;
}
diff --git a/qpy/QtCore/qpycore_enums_flags.cpp b/qpy/QtCore/qpycore_enums_flags.cpp
index aad88967..8465de6f 100644
--- a/qpy/QtCore/qpycore_enums_flags.cpp
+++ b/qpy/QtCore/qpycore_enums_flags.cpp
@@ -93,6 +93,10 @@ static struct _frame *get_calling_frame()
// Add the given Q_ENUM() or Q_FLAG() argument to the current enums/flags hash.
static PyObject *parse_enum_flag(PyObject *arg, bool flag, const char *context)
{
+#if defined(PYPY_VERSION)
+ PyErr_Format(PyExc_AttributeError, "%s is not supported on PyPy", context);
+ return 0;
+#else
struct _frame *frame = get_calling_frame();
if (!frame)
@@ -103,6 +107,7 @@ static PyObject *parse_enum_flag(PyObject *arg, bool flag, const char *context)
Py_INCREF(Py_None);
return Py_None;
+#endif
}
@@ -111,6 +116,10 @@ static PyObject *parse_enum_flag(PyObject *arg, bool flag, const char *context)
static PyObject *parse_enums_flags(PyObject *args, bool flags,
const char *context)
{
+#if defined(PYPY_VERSION)
+ PyErr_Format(PyExc_AttributeError, "%s is not supported on PyPy", context);
+ return 0;
+#else
struct _frame *frame = get_calling_frame();
if (!frame)
@@ -127,6 +136,7 @@ static PyObject *parse_enums_flags(PyObject *args, bool flags,
Py_INCREF(Py_None);
return Py_None;
+#endif
}
@@ -320,10 +330,14 @@ static bool objectify(const char *s, PyObject **objp)
// Return the current enums/flags list.
QList<EnumFlag> qpycore_get_enums_flags_list()
{
+ QList<EnumFlag> enums_flags_list;
+
+#if !defined(PYPY_VERSION)
struct _frame *frame = sipGetFrame(0);
- QList<EnumFlag> enums_flags_list = enums_flags_hash.values(frame);
+ enums_flags_list = enums_flags_hash.values(frame);
enums_flags_hash.remove(frame);
+#endif
return enums_flags_list;
}
diff --git a/qpy/QtCore/qpycore_pyqtboundsignal.cpp b/qpy/QtCore/qpycore_pyqtboundsignal.cpp
index 50310c5c..31fb8193 100644
--- a/qpy/QtCore/qpycore_pyqtboundsignal.cpp
+++ b/qpy/QtCore/qpycore_pyqtboundsignal.cpp
@@ -53,6 +53,8 @@ static PyObject *pyqtBoundSignal_call(PyObject *self, PyObject *args,
PyObject *kw);
static void pyqtBoundSignal_dealloc(PyObject *self);
static PyObject *pyqtBoundSignal_repr(PyObject *self);
+static PyObject *pyqtBoundSignal_richcompare(PyObject *self, PyObject *other,
+ int op);
static PyObject *pyqtBoundSignal_get_doc(PyObject *self, void *);
static PyObject *pyqtBoundSignal_get_signal(PyObject *self, void *);
static PyObject *pyqtBoundSignal_connect(PyObject *self, PyObject *args,
@@ -136,6 +138,7 @@ static PyType_Slot qpycore_pyqtBoundSignal_Slots[] = {
{Py_tp_new, (void *)PyType_GenericNew},
{Py_tp_dealloc, (void *)pyqtBoundSignal_dealloc},
{Py_tp_repr, (void *)pyqtBoundSignal_repr},
+ {Py_tp_richcompare, (void *)pyqtBoundSignal_richcompare},
{Py_tp_call, (void *)pyqtBoundSignal_call},
{Py_mp_subscript, (void *)pyqtBoundSignal_mp_subscript},
{Py_tp_methods, pyqtBoundSignal_methods},
@@ -186,7 +189,7 @@ static PyTypeObject qpycore_pyqtBoundSignal_Type = {
0, /* tp_doc */
0, /* tp_traverse */
0, /* tp_clear */
- 0, /* tp_richcompare */
+ pyqtBoundSignal_richcompare, /* tp_richcompare */
0, /* tp_weaklistoffset */
0, /* tp_iter */
0, /* tp_iternext */
@@ -277,6 +280,41 @@ static PyObject *pyqtBoundSignal_repr(PyObject *self)
}
+// The type richcompare slot.
+static PyObject *pyqtBoundSignal_richcompare(PyObject *self, PyObject *other,
+ int op)
+{
+ if ((op != Py_EQ && op != Py_NE) || !PyObject_TypeCheck(other, qpycore_pyqtBoundSignal_TypeObject))
+ {
+ Py_INCREF(Py_NotImplemented);
+ return Py_NotImplemented;
+ }
+
+ qpycore_pyqtBoundSignal *bs = (qpycore_pyqtBoundSignal *)self;
+ qpycore_pyqtBoundSignal *other_bs = (qpycore_pyqtBoundSignal *)other;
+
+ int eq = PyObject_RichCompareBool((PyObject *)(bs->unbound_signal),
+ (PyObject *)(other_bs->unbound_signal), Py_EQ);
+
+ if (eq == 1)
+ eq = PyObject_RichCompareBool(bs->bound_pyobject,
+ other_bs->bound_pyobject, Py_EQ);
+
+ if (eq < 0)
+ return 0;
+
+ PyObject *res;
+
+ if (op == Py_EQ)
+ res = eq ? Py_True : Py_False;
+ else
+ res = eq ? Py_False : Py_True;
+
+ Py_INCREF(res);
+ return res;
+}
+
+
// The type call slot.
static PyObject *pyqtBoundSignal_call(PyObject *self, PyObject *args,
PyObject *kw)
@@ -586,7 +624,7 @@ static PyObject *pyqtBoundSignal_disconnect(PyObject *self, PyObject *args)
}
// See if the slot is a connection.
- if (sipCanConvertToType(py_slot, sipType_QMetaObject_Connection, 0))
+ if (sipCanConvertToType(py_slot, sipType_QMetaObject_Connection, SIP_NOT_NONE))
{
int is_error = 0;
QMetaObject::Connection *connection = reinterpret_cast<QMetaObject::Connection *>(sipConvertToType(py_slot, sipType_QMetaObject_Connection, NULL, 0, NULL, &is_error));
diff --git a/qpy/QtCore/qpycore_qjsonvalue.cpp b/qpy/QtCore/qpycore_qjsonvalue.cpp
index ac7f72b3..2f8adf55 100644
--- a/qpy/QtCore/qpycore_qjsonvalue.cpp
+++ b/qpy/QtCore/qpycore_qjsonvalue.cpp
@@ -65,6 +65,13 @@ int qpycore_canConvertTo_QJsonValue(PyObject *py)
int qpycore_convertTo_QJsonValue(PyObject *py, PyObject *transferObj,
QJsonValue **cpp, int *isErr)
{
+ if (py == Py_None)
+ {
+ *cpp = new QJsonValue();
+
+ return sipGetState(transferObj);
+ }
+
if (PyObject_TypeCheck(py, sipTypeAsPyTypeObject(sipType_QJsonValue_Type)))
{
int v = sipConvertToEnum(py, sipType_QJsonValue_Type);
diff --git a/sip/QtCore/QtCoremod.sip b/sip/QtCore/QtCoremod.sip
index 61666495..34ff9930 100644
--- a/sip/QtCore/QtCoremod.sip
+++ b/sip/QtCore/QtCoremod.sip
@@ -42,6 +42,7 @@
%Feature PyQt_Process
%Feature PyQt_MacOSXOnly
%Feature PyQt_WebChannel
+%Feature PyQt_CONSTEXPR
%Copying
Copyright (c) 2020 Riverbank Computing Limited <info at riverbankcomputing.com>
diff --git a/sip/QtCore/qglobal.sip b/sip/QtCore/qglobal.sip
index ea9958c7..3dfb4e65 100644
--- a/sip/QtCore/qglobal.sip
+++ b/sip/QtCore/qglobal.sip
@@ -29,8 +29,8 @@ int PYQT_VERSION;
const char *PYQT_VERSION_STR;
%ModuleCode
-static int PYQT_VERSION = 0x050f00;
-static const char *PYQT_VERSION_STR = "5.15.0";
+static int PYQT_VERSION = 0x050f01;
+static const char *PYQT_VERSION_STR = "5.15.1";
%End
const int QT_VERSION;
const char *QT_VERSION_STR;
diff --git a/sip/QtCore/qjsonvalue.sip b/sip/QtCore/qjsonvalue.sip
index 8c0b37bc..22e01223 100644
--- a/sip/QtCore/qjsonvalue.sip
+++ b/sip/QtCore/qjsonvalue.sip
@@ -20,7 +20,7 @@
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-class QJsonValue /TypeHintIn="Union[QJsonValue, QJsonValue.Type, QJsonArray, QJsonObject, bool, int, float, QString]"/
+class QJsonValue /AllowNone,TypeHintIn="Union[QJsonValue, QJsonValue.Type, QJsonArray, QJsonObject, bool, int, float, None, QString]"/
{
%TypeHeaderCode
#include <qjsonvalue.h>
diff --git a/sip/QtGui/qcolor.sip b/sip/QtGui/qcolor.sip
index 5ac1d130..023a2dfb 100644
--- a/sip/QtGui/qcolor.sip
+++ b/sip/QtGui/qcolor.sip
@@ -199,6 +199,7 @@ public:
QDataStream &operator<<(QDataStream &, const QColor & /Constrained/) /ReleaseGIL/;
QDataStream &operator>>(QDataStream &, QColor & /Constrained/) /ReleaseGIL/;
%If (Qt_5_14_0 -)
+%If (PyQt_CONSTEXPR)
namespace QColorConstants
{
@@ -384,3 +385,4 @@ namespace QColorConstants
};
%End
+%End
diff --git a/sip/QtQuick/qsgnode.sip b/sip/QtQuick/qsgnode.sip
index d1fda5b3..b922efe1 100644
--- a/sip/QtQuick/qsgnode.sip
+++ b/sip/QtQuick/qsgnode.sip
@@ -20,7 +20,7 @@
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-class QSGNode /NoDefaultCtors,Supertype=sip.wrapper/
+class QSGNode /Supertype=sip.wrapper/
{
%TypeHeaderCode
#include <qsgnode.h>
@@ -240,6 +240,9 @@ public:
void setFlags(QSGNode::Flags, bool enabled = true);
virtual void preprocess();
+
+private:
+ QSGNode(const QSGNode &);
};
class QSGBasicGeometryNode : QSGNode /NoDefaultCtors/
@@ -261,7 +264,7 @@ public:
QSGGeometry *geometry();
};
-class QSGGeometryNode : QSGBasicGeometryNode /NoDefaultCtors/
+class QSGGeometryNode : QSGBasicGeometryNode
{
%TypeHeaderCode
#include <qsgnode.h>
@@ -290,7 +293,7 @@ public:
QSGMaterial *opaqueMaterial() const;
};
-class QSGClipNode : QSGBasicGeometryNode /NoDefaultCtors/
+class QSGClipNode : QSGBasicGeometryNode
{
%TypeHeaderCode
#include <qsgnode.h>
@@ -305,7 +308,7 @@ public:
QRectF clipRect() const;
};
-class QSGTransformNode : QSGNode /NoDefaultCtors/
+class QSGTransformNode : QSGNode
{
%TypeHeaderCode
#include <qsgnode.h>
@@ -318,7 +321,7 @@ public:
const QMatrix4x4 &matrix() const;
};
-class QSGOpacityNode : QSGNode /NoDefaultCtors/
+class QSGOpacityNode : QSGNode
{
%TypeHeaderCode
#include <qsgnode.h>
diff --git a/sip/QtQuick/qsgrendernode.sip b/sip/QtQuick/qsgrendernode.sip
index b7f57a7d..83964e8a 100644
--- a/sip/QtQuick/qsgrendernode.sip
+++ b/sip/QtQuick/qsgrendernode.sip
@@ -22,7 +22,7 @@
%If (Qt_5_8_0 -)
-class QSGRenderNode : QSGNode /NoDefaultCtors/
+class QSGRenderNode : QSGNode
{
%TypeHeaderCode
#include <qsgrendernode.h>
diff --git a/sip/QtTextToSpeech/QtTextToSpeechmod.sip b/sip/QtTextToSpeech/QtTextToSpeechmod.sip
new file mode 100644
index 00000000..3c001f42
--- /dev/null
+++ b/sip/QtTextToSpeech/QtTextToSpeechmod.sip
@@ -0,0 +1,49 @@
+// QtTextToSpeechmod.sip generated by MetaSIP
+//
+// This file is part of the QtTextToSpeech Python extension module.
+//
+// Copyright (c) 2020 Riverbank Computing Limited <info at 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 at 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.
+
+
+%Module(name=PyQt5.QtTextToSpeech, keyword_arguments="Optional", use_limited_api=True)
+
+%Import QtCore/QtCoremod.sip
+
+%Copying
+Copyright (c) 2020 Riverbank Computing Limited <info at 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 at 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.
+%End
+
+%DefaultSupertype sip.simplewrapper
+
+%Include qtexttospeech.sip
+%Include qvoice.sip
diff --git a/sip/QtTextToSpeech/qtexttospeech.sip b/sip/QtTextToSpeech/qtexttospeech.sip
new file mode 100644
index 00000000..729996e7
--- /dev/null
+++ b/sip/QtTextToSpeech/qtexttospeech.sip
@@ -0,0 +1,101 @@
+// qtexttospeech.sip generated by MetaSIP
+//
+// This file is part of the QtTextToSpeech Python extension module.
+//
+// Copyright (c) 2020 Riverbank Computing Limited <info at 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 at 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.
+
+
+%If (Qt_5_15_0 -)
+
+class QTextToSpeech : QObject
+{
+%TypeHeaderCode
+#include <qtexttospeech.h>
+%End
+
+%ConvertToSubClassCode
+ static struct class_graph {
+ const char *name;
+ sipTypeDef **type;
+ int yes, no;
+ } graph[] = {
+ {sipName_QTextToSpeech, &sipType_QTextToSpeech, -1, -1},
+ };
+
+ int i = 0;
+
+ sipType = NULL;
+
+ do
+ {
+ struct class_graph *cg = &graph[i];
+
+ if (cg->name != NULL && sipCpp->inherits(cg->name))
+ {
+ sipType = *cg->type;
+ i = cg->yes;
+ }
+ else
+ i = cg->no;
+ }
+ while (i >= 0);
+%End
+
+public:
+ enum State
+ {
+ Ready,
+ Speaking,
+ Paused,
+ BackendError,
+ };
+
+ explicit QTextToSpeech(QObject *parent /TransferThis/ = 0);
+ QTextToSpeech(const QString &engine, QObject *parent /TransferThis/ = 0);
+ QTextToSpeech::State state() const;
+ QVector<QLocale> availableLocales() const;
+ QLocale locale() const;
+ QVoice voice() const;
+ QVector<QVoice> availableVoices() const;
+ double rate() const;
+ double pitch() const;
+ double volume() const;
+ static QStringList availableEngines();
+
+public slots:
+ void say(const QString &text);
+ void stop();
+ void pause();
+ void resume();
+ void setLocale(const QLocale &locale);
+ void setRate(double rate);
+ void setPitch(double pitch);
+ void setVolume(double volume);
+ void setVoice(const QVoice &voice);
+
+signals:
+ void stateChanged(QTextToSpeech::State state);
+ void localeChanged(const QLocale &locale);
+ void rateChanged(double rate);
+ void pitchChanged(double pitch);
+ void volumeChanged(double volume /Constrained/);
+ void volumeChanged(int volume);
+ void voiceChanged(const QVoice &voice);
+};
+
+%End
diff --git a/sip/QtTextToSpeech/qvoice.sip b/sip/QtTextToSpeech/qvoice.sip
new file mode 100644
index 00000000..e5416ffd
--- /dev/null
+++ b/sip/QtTextToSpeech/qvoice.sip
@@ -0,0 +1,60 @@
+// qvoice.sip generated by MetaSIP
+//
+// This file is part of the QtTextToSpeech Python extension module.
+//
+// Copyright (c) 2020 Riverbank Computing Limited <info at 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 at 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.
+
+
+%If (Qt_5_15_0 -)
+
+class QVoice
+{
+%TypeHeaderCode
+#include <qvoice.h>
+%End
+
+public:
+ enum Gender
+ {
+ Male,
+ Female,
+ Unknown,
+ };
+
+ enum Age
+ {
+ Child,
+ Teenager,
+ Adult,
+ Senior,
+ Other,
+ };
+
+ QVoice();
+ QVoice(const QVoice &other);
+ ~QVoice();
+ bool operator==(const QVoice &other);
+ bool operator!=(const QVoice &other);
+ QString name() const;
+ QVoice::Gender gender() const;
+ QVoice::Age age() const;
+ static QString genderName(QVoice::Gender gender);
+ static QString ageName(QVoice::Age age);
+};
+
+%End
More information about the Neon-commits
mailing list