Skip to content

Commit

Permalink
Update to minor version 5.10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
baoboa committed Mar 9, 2018
1 parent 257bf03 commit 7477cf9
Show file tree
Hide file tree
Showing 19 changed files with 156 additions and 55 deletions.
70 changes: 70 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,75 @@
2018-02-26 Phil Thompson <[email protected]>

* NEWS:
Released as v5.10.1.
[dc149e6643d5] [5.10.1] <5.10-maint>

2018-02-21 Phil Thompson <[email protected]>

* PyQt5.msp:
Added the new QAbstractOAuth2 methods added in Qt v5.10.1.
[b2ea22e58de6] <5.10-maint>

2018-02-20 Phil Thompson <[email protected]>

* PyQt5.msp:
Updated for Qt v5.10.1.
[e27d89dd3457] <5.10-maint>

2018-02-13 Phil Thompson <[email protected]>

* PyQt5.msp:
Added the missing qmlClearTypeRegistrations() to the QtQml module.
[c9a7040cb4a7] <5.10-maint>

2018-02-12 Phil Thompson <[email protected]>

* PyQt5.msp:
Removed incorrect annotation on
QQmlNetworkAccessManagerFactory::create().
[6401ed81edee] <5.10-maint>

2018-02-08 Phil Thompson <[email protected]>

* qpy/QtCore/qpycore_chimera.cpp:
Removed some (hopefully) redundant code.
[6e9e33411f41] <5.10-maint>

2018-02-06 Phil Thompson <[email protected]>

* PyQt5.msp:
Make sure LTS releases of Qt v5.9 don't get handled as Qt v5.10.
[8474d7f26f1f] <5.10-maint>

2018-02-04 Phil Thompson <[email protected]>

* lib/configure.py:
Added the --disabled-feature option to configure.py.
[5a554278bbf0] <5.10-maint>

2018-01-31 Phil Thompson <[email protected]>

* examples/quick/tutorials/extending/chapter1-basics/chapter1-basics.p
y, examples/quick/tutorials/extending/chapter2-methods/chapter2-meth
ods.py, examples/quick/tutorials/extending/chapter3-bindings/chapter
3-bindings.py, examples/quick/tutorials/extending/chapter4-customPro
pertyTypes/chapter4-customPropertyTypes.py, examples/quick/tutorials
/extending/chapter5-listproperties/chapter5-listproperties.py:
Avoid an assertion failure when using a debug version of Qt.
[6eb406e64db8] <5.10-maint>

* qpy/QtQml/qpyqml_register_singleton_type.cpp,
qpy/QtQml/qpyqml_register_type.cpp:
Reverted the change in PyQt v5.8 that dealt with QML and properties
so that all the examples work again.
[9eb53449681d] <5.10-maint>

2018-01-23 Phil Thompson <[email protected]>

* .hgtags:
Added tag 5.10 for changeset 9f68e48cf5f5
[c18dad0e8eec]

* NEWS:
Released as v5.10.
[9f68e48cf5f5] [5.10]
Expand Down
7 changes: 6 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
v5.10 23rd January 2017
v5.10.1 26th February 2018
- Added support for Qt v5.10.1.
- Added the missing qmlClearTypeRegistrations() to the QtQml module.
- Added the --disabled-feature option to configure.py.

v5.10 23rd January 2018
- Added support for Qt v5.10.0.
- Added the QtNetworkAuth module.

Expand Down
7 changes: 6 additions & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@


# Initialise the constants.
PYQT_VERSION_STR = "5.10"
PYQT_VERSION_STR = "5.10.1"

SIP_MIN_VERSION = '4.19.4'

Expand Down Expand Up @@ -858,6 +858,8 @@ def apply_post_options(self, opts):
configuration. opts are the command line options.
"""

self.pyqt_disabled_features.extend(opts.disabled_features)

if opts.assumeshared:
self.qt_shared = True

Expand Down Expand Up @@ -1106,6 +1108,9 @@ def store_version(option, opt_str, value, parser):
action='append', metavar="MODULE",
help="disable the specified MODULE [default: checks for all "
"modules will be enabled]")
g.add_option("--disable-feature", dest='disabled_features', default=[],
action='append', metavar="FEATURE",
help="disable the specified FEATURE")
g.add_option("--enable", "-e", dest='modules', default=[], action='append',
metavar="MODULE",
help="enable checks for the specified MODULE [default: checks for "
Expand Down
2 changes: 1 addition & 1 deletion examples/README
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ entry entitled "Examples and Demos" entry in the submenu containing PyQt5.

On all platforms:

The source code for the launcher can be found in the examples/qtdemo
The source code for the launcher can be found in the examples/demos/qtdemo
directory in the PyQt package.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#############################################################################
##
## Copyright (C) 2013 Riverbank Computing Limited.
## Copyright (C) 2018 Riverbank Computing Limited.
## Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
##
## This file is part of the examples of PyQt.
Expand Down Expand Up @@ -91,7 +91,8 @@ def paint(self, painter):
view.setResizeMode(QQuickView.SizeRootObjectToView)
view.setSource(
QUrl.fromLocalFile(
os.path.join(os.path.dirname(__file__),'app.qml')))
os.path.join(os.path.dirname(os.path.abspath(__file__)),
'app.qml')))
view.show()

sys.exit(app.exec_())
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#############################################################################
##
## Copyright (C) 2013 Riverbank Computing Limited.
## Copyright (C) 2018 Riverbank Computing Limited.
## Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
##
## This file is part of the examples of PyQt.
Expand Down Expand Up @@ -100,7 +100,8 @@ def clearChart(self):
view.setResizeMode(QQuickView.SizeRootObjectToView)
view.setSource(
QUrl.fromLocalFile(
os.path.join(os.path.dirname(__file__),'app.qml')))
os.path.join(os.path.dirname(os.path.abspath(__file__)),
'app.qml')))
view.show()

sys.exit(app.exec_())
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#############################################################################
##
## Copyright (C) 2013 Riverbank Computing Limited.
## Copyright (C) 2018 Riverbank Computing Limited.
## Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
##
## This file is part of the examples of PyQt.
Expand Down Expand Up @@ -101,7 +101,8 @@ def clearChart(self):
view.setResizeMode(QQuickView.SizeRootObjectToView)
view.setSource(
QUrl.fromLocalFile(
os.path.join(os.path.dirname(__file__),'app.qml')))
os.path.join(os.path.dirname(os.path.abspath(__file__)),
'app.qml')))
view.show()

sys.exit(app.exec_())
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#############################################################################
##
## Copyright (C) 2013 Riverbank Computing Limited.
## Copyright (C) 2018 Riverbank Computing Limited.
## Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
##
## This file is part of the examples of PyQt.
Expand Down Expand Up @@ -109,7 +109,8 @@ def __init__(self, parent=None):
view.setResizeMode(QQuickView.SizeRootObjectToView)
view.setSource(
QUrl.fromLocalFile(
os.path.join(os.path.dirname(__file__),'app.qml')))
os.path.join(os.path.dirname(os.path.abspath(__file__)),
'app.qml')))
view.show()

sys.exit(app.exec_())
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#############################################################################
##
## Copyright (C) 2013 Riverbank Computing Limited.
## Copyright (C) 2018 Riverbank Computing Limited.
## Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
##
## This file is part of the examples of PyQt.
Expand Down Expand Up @@ -122,7 +122,8 @@ def __init__(self, parent=None):
view.setResizeMode(QQuickView.SizeRootObjectToView)
view.setSource(
QUrl.fromLocalFile(
os.path.join(os.path.dirname(__file__),'app.qml')))
os.path.join(os.path.dirname(os.path.abspath(__file__)),
'app.qml')))
view.show()

sys.exit(app.exec_())
8 changes: 3 additions & 5 deletions qpy/QtCore/qpycore_chimera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1233,11 +1233,9 @@ QVariant Chimera::fromAnyPyObject(PyObject *py, int *is_err)

if (ct.parse_py_type(Py_TYPE(py)))
{
// If the type is a list or dict then try and convert it to a
// QVariantList or QVariantMap respectively if possible.
if (Py_TYPE(py) == &PyList_Type)
ct._metatype = QMetaType::QVariantList;
else if (Py_TYPE(py) == &PyDict_Type)
// If the type is a dict then try and convert it to a QVariantMap
// if possible.
if (Py_TYPE(py) == &PyDict_Type)
ct._metatype = QMetaType::QVariantMap;

// The conversion is non-strict in case the type was a dict and we
Expand Down
3 changes: 2 additions & 1 deletion qpy/QtQml/qpyqml_register_singleton_type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ static int register_type(QQmlPrivate::RegisterSingletonType *rt)
QPyQmlSingletonObject##n::factory = factory; \
rt->qobjectApi = QPyQmlSingletonObject##n::objectFactory; \
rt->typeId = qRegisterNormalizedMetaType<QPyQmlSingletonObject##n *>(ptr_name.constData()); \
rt->instanceMetaObject = mo; \
break


Expand Down Expand Up @@ -154,6 +153,8 @@ static QQmlPrivate::RegisterSingletonType *init_type(PyTypeObject *py_type,
}

// Initialise the remaining members.
rt->instanceMetaObject = mo;

rt->version = 2;
rt->uri = 0;
rt->versionMajor = 0;
Expand Down
37 changes: 6 additions & 31 deletions qpy/QtQml/qpyqml_register_type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,13 @@ static int register_type(QQmlPrivate::RegisterType *rt)

#define QPYQML_TYPE_INIT(n) \
case n##U: \
QPyQmlObject##n::staticMetaObject = static_mo; \
QPyQmlObject##n::staticMetaObject = *mo; \
QPyQmlObject##n::attachedPyType = attached; \
rt->typeId = qRegisterNormalizedMetaType<QPyQmlObject##n *>(ptr_name); \
rt->listId = qRegisterNormalizedMetaType<QQmlListProperty<QPyQmlObject##n> >(list_name); \
rt->objectSize = ctor ? sizeof(QPyQmlObject##n) : 0; \
if (ctor) rt->create = QQmlPrivate::createInto<QPyQmlObject##n>; else rt->create = 0; \
rt->metaObject = &QPyQmlObject##n::staticMetaObject; \
rt->attachedPropertiesFunction = attached_mo ? QPyQmlObject##n::attachedProperties : 0; \
rt->attachedPropertiesMetaObject = attached_mo; \
rt->parserStatusCast = is_parser_status ? QQmlPrivate::StaticCastSelector<QPyQmlObject##n,QQmlParserStatus>::cast() : -1; \
rt->valueSourceCast = is_value_source ? QQmlPrivate::StaticCastSelector<QPyQmlObject##n,QQmlPropertyValueSource>::cast() : -1; \
rt->valueInterceptorCast = QQmlPrivate::StaticCastSelector<QPyQmlObject##n,QQmlPropertyValueInterceptor>::cast(); \
Expand Down Expand Up @@ -219,33 +217,7 @@ static QQmlPrivate::RegisterType *init_type(PyTypeObject *py_type, bool ctor,
return 0;
}

const QMetaObject *orig_mo = pyqt5_qtqml_get_qmetaobject(py_type);
QMetaObject static_mo = *orig_mo;

#if QT_VERSION >= 0x050800
// Qt v5.8.0 changed the way properties are handled by directly calling a
// class's static meta-call (if there was one) directly. This bypasses the
// proxy and calls the static meta-call with a pointer to the proxy rather
// than a pointer to the real object. To work round this we clone the
// QMetaObject chain and remove the references to the static meta-call
// forcing the earlier behaviour. This approach may also work with earlier
// versions of Qt - but if it ain't broke...
static_mo.d.static_metacall = 0;

QMetaObject *sub_mo = &static_mo;

// By retaining the QObject static meta-object we don't appear to be a
// gadget.
for (const QMetaObject *mo = sub_mo->d.superdata; mo != &QObject::staticMetaObject; mo = mo->d.superdata)
{
QMetaObject *new_mo = new QMetaObject;
*new_mo = *mo;
new_mo->d.static_metacall = 0;

sub_mo->d.superdata = new_mo;
sub_mo = new_mo;
}
#endif
const QMetaObject *mo = pyqt5_qtqml_get_qmetaobject(py_type);

// See if the type is a parser status.
bool is_parser_status = PyType_IsSubtype(py_type,
Expand Down Expand Up @@ -298,7 +270,7 @@ static QQmlPrivate::RegisterType *init_type(PyTypeObject *py_type, bool ctor,

if (qquickitem_register)
{
sipErrorState estate = qquickitem_register(py_type, orig_mo, ptr_name,
sipErrorState estate = qquickitem_register(py_type, mo, ptr_name,
list_name, &rt);

if (estate == sipErrorFail)
Expand Down Expand Up @@ -388,6 +360,9 @@ static QQmlPrivate::RegisterType *init_type(PyTypeObject *py_type, bool ctor,
QPYQML_TYPE_INIT(59);
}

rt->metaObject = mo;
rt->attachedPropertiesMetaObject = attached_mo;

complete_init(rt, revision);

return rt;
Expand Down
2 changes: 1 addition & 1 deletion sip/QtCore/QtCoremod.sip
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

%Module(name=PyQt5.QtCore, call_super_init=True, default_VirtualErrorHandler=PyQt5, keyword_arguments="Optional", use_limited_api=True)

%Timeline {Qt_5_0_0 Qt_5_0_1 Qt_5_0_2 Qt_5_1_0 Qt_5_1_1 Qt_5_2_0 Qt_5_2_1 Qt_5_3_0 Qt_5_3_1 Qt_5_3_2 Qt_5_4_0 Qt_5_4_1 Qt_5_4_2 Qt_5_5_0 Qt_5_5_1 Qt_5_6_0 Qt_5_6_1 Qt_5_6_2 Qt_5_6_3 Qt_5_6_4 Qt_5_6_5 Qt_5_6_6 Qt_5_6_7 Qt_5_6_8 Qt_5_6_9 Qt_5_7_0 Qt_5_7_1 Qt_5_8_0 Qt_5_8_1 Qt_5_9_0 Qt_5_9_1 Qt_5_9_2 Qt_5_9_3 Qt_5_10_0}
%Timeline {Qt_5_0_0 Qt_5_0_1 Qt_5_0_2 Qt_5_1_0 Qt_5_1_1 Qt_5_2_0 Qt_5_2_1 Qt_5_3_0 Qt_5_3_1 Qt_5_3_2 Qt_5_4_0 Qt_5_4_1 Qt_5_4_2 Qt_5_5_0 Qt_5_5_1 Qt_5_6_0 Qt_5_6_1 Qt_5_6_2 Qt_5_6_3 Qt_5_6_4 Qt_5_6_5 Qt_5_6_6 Qt_5_6_7 Qt_5_6_8 Qt_5_6_9 Qt_5_7_0 Qt_5_7_1 Qt_5_8_0 Qt_5_8_1 Qt_5_9_0 Qt_5_9_1 Qt_5_9_2 Qt_5_9_3 Qt_5_9_99 Qt_5_10_0 Qt_5_10_1}

%Platforms {WS_X11 WS_WIN WS_MACX}

Expand Down
4 changes: 2 additions & 2 deletions sip/QtCore/qglobal.sip
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ int PYQT_VERSION;
const char *PYQT_VERSION_STR;

%ModuleCode
static int PYQT_VERSION = 0x050a00;
static const char *PYQT_VERSION_STR = "5.10";
static int PYQT_VERSION = 0x050a01;
static const char *PYQT_VERSION_STR = "5.10.1";
%End
const int QT_VERSION;
const char *QT_VERSION_STR;
Expand Down
2 changes: 1 addition & 1 deletion sip/QtGui/qimage.sip
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public:
bool reinterpretAsFormat(QImage::Format f);
%End
%If (Qt_5_10_0 -)
SIP_SSIZE_T sizeInBytes() const [unknown_type ()];
SIP_SSIZE_T sizeInBytes() const [qsizetype ()];
%End
};

Expand Down
14 changes: 14 additions & 0 deletions sip/QtNetworkAuth/qabstractoauth2.sip
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,20 @@ signals:

protected:
void setResponseType(const QString &responseType);

public:
%If (Qt_5_10_1 -)
virtual QNetworkReply *post(const QUrl &url, const QByteArray &data);
%End
%If (Qt_5_10_1 -)
virtual QNetworkReply *post(const QUrl &url, QHttpMultiPart *multiPart);
%End
%If (Qt_5_10_1 -)
virtual QNetworkReply *put(const QUrl &url, const QByteArray &data);
%End
%If (Qt_5_10_1 -)
virtual QNetworkReply *put(const QUrl &url, QHttpMultiPart *multiPart);
%End
};

%End
1 change: 1 addition & 0 deletions sip/QtQml/QtQmlmod.sip
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

%DefaultSupertype sip.simplewrapper

%Include qqml.sip
%Include qjsengine.sip
%Include qjsvalue.sip
%Include qjsvalueiterator.sip
Expand Down
Loading

0 comments on commit 7477cf9

Please sign in to comment.