diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-10-09 09:21:34 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-10-09 09:21:34 +0200 |
commit | e1f34d513f1c73d99844f21c60ed257382fd001c (patch) | |
tree | dd43ccaa61ed3907261d77f335471e84ee55057a | |
parent | be225bbd752e0c0ea2dc06ac55e1c8e55a32fb41 (diff) | |
parent | f4d1da2d912e915de3793c57c501b6b182b3fec1 (diff) |
Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: If440f80c2c71f0fab59f87317202cf0d849e63ca
23 files changed, 158 insertions, 26 deletions
diff --git a/dist/changes-5.12.5 b/dist/changes-5.12.5 new file mode 100644 index 0000000..e8be931 --- /dev/null +++ b/dist/changes-5.12.5 @@ -0,0 +1,20 @@ +Qt 5.12.5 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.12.0 through 5.12.4. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +https://doc.qt.io/qt-5/index.html + +The Qt version 5.12 series is binary compatible with the 5.11.x series. +Applications compiled for 5.11 will continue to run with 5.12. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + + - This release contains only minor code improvements. diff --git a/dist/changes-5.13.1 b/dist/changes-5.13.1 new file mode 100644 index 0000000..ce9927b --- /dev/null +++ b/dist/changes-5.13.1 @@ -0,0 +1,21 @@ +Qt 5.13.1 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.13.0. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +https://doc.qt.io/qt-5/index.html + +The Qt version 5.13 series is binary compatible with the 5.12.x series. +Applications compiled for 5.12 will continue to run with 5.13. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + + - Improved clarity and consistency of documentation. + - Made a number of fixes and improvements in the handling of enumerations. diff --git a/examples/remoteobjects/clientapp/clientapp.qrc b/examples/remoteobjects/clientapp/clientapp.qrc index 7e6bf64..23bdb39 100644 --- a/examples/remoteobjects/clientapp/clientapp.qrc +++ b/examples/remoteobjects/clientapp/clientapp.qrc @@ -5,5 +5,4 @@ <file>qml/plugins1.qml</file> <file>qml/plugins2.qml</file> </qresource> - <qresource prefix="/images"/> </RCC> diff --git a/src/imports/remoteobjects/plugin.cpp b/src/imports/remoteobjects/plugin.cpp index 43a25bd..04e469f 100644 --- a/src/imports/remoteobjects/plugin.cpp +++ b/src/imports/remoteobjects/plugin.cpp @@ -55,6 +55,8 @@ struct QtQmlRemoteObjectsResponse { QTimer *timer; }; + +// documentation updates for this class can be made in remoteobjects-qml.qdoc class QtQmlRemoteObjects : public QObject { Q_OBJECT diff --git a/src/remoteobjects/doc/src/remoteobjects-qml.qdoc b/src/remoteobjects/doc/src/remoteobjects-qml.qdoc index cdd3d5c..e69c9be 100644 --- a/src/remoteobjects/doc/src/remoteobjects-qml.qdoc +++ b/src/remoteobjects/doc/src/remoteobjects-qml.qdoc @@ -84,3 +84,22 @@ import QtRemoteObjects 5.\1 \section1 QML Types */ + +/*! +\qmltype QtRemoteObjects +\inqmlmodule QtRemoteObjects +\since 5.14 +\brief The QtRemoteObjects global object provides useful functions for working with remote + types in QML. +*/ + +/*! + \qmlmethod Promise QtRemoteObjects::QtRemoteObjects::watch(QRemoteObjectPendingCall reply, int timeout = 30000) + Encapsulates the return value from a replica in a JavaScript Promise. + + \qml + QtRemoteObjects.watch(replica.fetchDetails(identifier)) + .then(function(value) { details = value }, + function(error) { console.log("error fetching details:", error) }) + \endqml +*/ diff --git a/src/remoteobjects/qremoteobjectpendingcall.cpp b/src/remoteobjects/qremoteobjectpendingcall.cpp index 5393f12..c7574cf 100644 --- a/src/remoteobjects/qremoteobjectpendingcall.cpp +++ b/src/remoteobjects/qremoteobjectpendingcall.cpp @@ -72,6 +72,12 @@ void QRemoteObjectPendingCallWatcherHelper::emitSignals() emit finished(); } +/*! + \class QRemoteObjectPendingCall + \inmodule QtRemoteObjects + \brief Encapsulates the result of an asynchronous method call. +*/ + QRemoteObjectPendingCall::QRemoteObjectPendingCall() : d(new QRemoteObjectPendingCallData) { @@ -97,6 +103,12 @@ QRemoteObjectPendingCall &QRemoteObjectPendingCall::operator=(const QRemoteObjec return *this; } +/*! + Returns the return value of the remote call. + + returnValue will only be valid when the remote call has finished and there + are no \l {error}s. +*/ QVariant QRemoteObjectPendingCall::returnValue() const { if (!d) @@ -106,6 +118,20 @@ QVariant QRemoteObjectPendingCall::returnValue() const return d->returnValue; } +/*! + \enum QRemoteObjectPendingCall::Error + + This enum type specifies the possible error values for a remote call: + + \value NoError + No error occurred. + \value InvalidMessage + The default error state prior to the remote call finishing. +*/ + +/*! + Returns the error, if any, from the remote call. +*/ QRemoteObjectPendingCall::Error QRemoteObjectPendingCall::error() const { if (!d) @@ -115,6 +141,11 @@ QRemoteObjectPendingCall::Error QRemoteObjectPendingCall::error() const return d->error; } +/*! + Returns true if the remote call has finished, false otherwise. + + A finished call will include a returnValue or \l error. +*/ bool QRemoteObjectPendingCall::isFinished() const { if (!d) @@ -124,6 +155,9 @@ bool QRemoteObjectPendingCall::isFinished() const return d->error != InvalidMessage; } +/*! + Blocks for up to \a timeout milliseconds, until the remote call has finished. +*/ bool QRemoteObjectPendingCall::waitForFinished(int timeout) { if (!d) @@ -153,6 +187,15 @@ public: Q_DECLARE_PUBLIC(QRemoteObjectPendingCallWatcher) }; +/*! + \class QRemoteObjectPendingCallWatcher + \inmodule QtRemoteObjects + \brief Provides a QObject-based API for watching a QRemoteObjectPendingCall. + + QRemoteObjectPendingCallWatcher provides a signal indicating when a QRemoteObjectPendingCall + has finished, allowing for convenient, non-blocking handling of the call. +*/ + QRemoteObjectPendingCallWatcher::QRemoteObjectPendingCallWatcher(const QRemoteObjectPendingCall &call, QObject *parent) : QObject(*new QRemoteObjectPendingCallWatcherPrivate, parent) , QRemoteObjectPendingCall(call) @@ -174,6 +217,11 @@ QRemoteObjectPendingCallWatcher::~QRemoteObjectPendingCallWatcher() { } +/*! + Returns true if the remote call has finished, false otherwise. + + A finished call will include a returnValue or error. +*/ bool QRemoteObjectPendingCallWatcher::isFinished() const { if (!d) @@ -183,6 +231,9 @@ bool QRemoteObjectPendingCallWatcher::isFinished() const return d->error != QRemoteObjectPendingCall::InvalidMessage; } +/*! + Blocks until the remote call has finished. +*/ void QRemoteObjectPendingCallWatcher::waitForFinished() { if (d) { @@ -194,6 +245,24 @@ void QRemoteObjectPendingCallWatcher::waitForFinished() } } +/*! + \fn QRemoteObjectPendingCallWatcher::finished(QRemoteObjectPendingCallWatcher *self) + + This signal is emitted when the remote call has finished. A finished call will include a + returnValue or error. +*/ + +/*! + \class QRemoteObjectPendingReply + \inmodule QtRemoteObjects + \brief A templated version of QRemoteObjectPendingCall. +*/ + +/*! \fn template <typename T> T QRemoteObjectPendingReply<T>::returnValue() const + + Returns a strongly typed version of the return value of the remote call. +*/ + QT_END_NAMESPACE #include "moc_qremoteobjectpendingcall.cpp" diff --git a/src/remoteobjects/qremoteobjectpendingcall.h b/src/remoteobjects/qremoteobjectpendingcall.h index 086e5d8..b9709fc 100644 --- a/src/remoteobjects/qremoteobjectpendingcall.h +++ b/src/remoteobjects/qremoteobjectpendingcall.h @@ -140,7 +140,7 @@ struct QMetaTypeId< QRemoteObjectPendingReply<T> > static int qt_metatype_id() { static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); - if (const int id = metatype_id.load()) + if (const int id = metatype_id.loadRelaxed()) return id; const char *tName = QMetaType::typeName(qMetaTypeId<T>()); Q_ASSERT(tName); diff --git a/src/remoteobjects/qremoteobjectreplica_p.h b/src/remoteobjects/qremoteobjectreplica_p.h index 79a07cf..8acefda 100644 --- a/src/remoteobjects/qremoteobjectreplica_p.h +++ b/src/remoteobjects/qremoteobjectreplica_p.h @@ -117,7 +117,7 @@ public: void setProperty(int i, const QVariant &) override = 0; virtual bool isShortCircuit() const = 0; bool isInitialized() const override { return true; } - QRemoteObjectReplica::State state() const override { return QRemoteObjectReplica::State(m_state.load()); } + QRemoteObjectReplica::State state() const override { return QRemoteObjectReplica::State(m_state.loadRelaxed()); } void setState(QRemoteObjectReplica::State state); bool waitForSource(int) override { return true; } virtual bool waitForFinished(const QRemoteObjectPendingCall &, int) { return true; } diff --git a/tests/auto/integration_external/client/client.pro b/tests/auto/integration_external/client/client.pro index 4c42f5c..6bcc136 100644 --- a/tests/auto/integration_external/client/client.pro +++ b/tests/auto/integration_external/client/client.pro @@ -2,7 +2,7 @@ TEMPLATE = app QT += remoteobjects core testlib QT -= gui -TARGET = client +TARGET = integration_external_client DESTDIR = ./ CONFIG += c++11 CONFIG -= app_bundle diff --git a/tests/auto/integration_external/external/tst_integration_external.cpp b/tests/auto/integration_external/external/tst_integration_external.cpp index 8994db8..4c62e38 100644 --- a/tests/auto/integration_external/external/tst_integration_external.cpp +++ b/tests/auto/integration_external/external/tst_integration_external.cpp @@ -81,7 +81,7 @@ private slots: env.insert("TEMPLATED_REMOTING", "true"); serverProc.setProcessEnvironment(env); } - serverProc.start(findExecutable("server", { + serverProc.start(findExecutable("integration_external_server", { QCoreApplication::applicationDirPath() + "/../server/" })); QVERIFY(serverProc.waitForStarted()); @@ -92,7 +92,7 @@ private slots: qDebug() << "Starting client process"; QProcess clientProc; clientProc.setProcessChannelMode(QProcess::ForwardedChannels); - clientProc.start(findExecutable("client", { + clientProc.start(findExecutable("integration_external_client", { QCoreApplication::applicationDirPath() + "/../client/" })); QVERIFY(clientProc.waitForStarted()); diff --git a/tests/auto/integration_external/server/server.pro b/tests/auto/integration_external/server/server.pro index fea0c03..73b79b3 100644 --- a/tests/auto/integration_external/server/server.pro +++ b/tests/auto/integration_external/server/server.pro @@ -2,7 +2,7 @@ TEMPLATE = app QT += remoteobjects core testlib QT -= gui -TARGET = server +TARGET = integration_external_server DESTDIR = ./ CONFIG += c++11 CONFIG -= app_bundle @@ -14,6 +14,5 @@ SOURCES += main.cpp \ HEADERS += \ mytestserver.h - $$OUT_PWD/rep_MyInterface_source.h INCLUDEPATH += $$PWD diff --git a/tests/auto/integration_multiprocess/client/client.pro b/tests/auto/integration_multiprocess/client/client.pro index 4c42f5c..084e665 100644 --- a/tests/auto/integration_multiprocess/client/client.pro +++ b/tests/auto/integration_multiprocess/client/client.pro @@ -2,7 +2,7 @@ TEMPLATE = app QT += remoteobjects core testlib QT -= gui -TARGET = client +TARGET = integration_multiprocess_client DESTDIR = ./ CONFIG += c++11 CONFIG -= app_bundle diff --git a/tests/auto/integration_multiprocess/server/server.pro b/tests/auto/integration_multiprocess/server/server.pro index 5bb7120..71f9160 100644 --- a/tests/auto/integration_multiprocess/server/server.pro +++ b/tests/auto/integration_multiprocess/server/server.pro @@ -2,7 +2,7 @@ TEMPLATE = app QT += remoteobjects core testlib QT -= gui -TARGET = server +TARGET = integration_multiprocess_server DESTDIR = ./ CONFIG += c++11 CONFIG -= app_bundle @@ -15,6 +15,5 @@ SOURCES += main.cpp \ HEADERS += \ mytestserver.h - $$OUT_PWD/rep_MyInterface_source.h INCLUDEPATH += $$PWD diff --git a/tests/auto/integration_multiprocess/tst/tst_integration_multiprocess.cpp b/tests/auto/integration_multiprocess/tst/tst_integration_multiprocess.cpp index fe5d929..ccdc973 100644 --- a/tests/auto/integration_multiprocess/tst/tst_integration_multiprocess.cpp +++ b/tests/auto/integration_multiprocess/tst/tst_integration_multiprocess.cpp @@ -81,7 +81,7 @@ private slots: env.insert("TEMPLATED_REMOTING", "true"); serverProc.setProcessEnvironment(env); } - serverProc.start(findExecutable("server", { + serverProc.start(findExecutable("integration_multiprocess_server", { QCoreApplication::applicationDirPath() + "/../server/" })); QVERIFY(serverProc.waitForStarted()); @@ -92,7 +92,7 @@ private slots: qDebug() << "Starting client process"; QProcess clientProc; clientProc.setProcessChannelMode(QProcess::ForwardedChannels); - clientProc.start(findExecutable("client", { + clientProc.start(findExecutable("integration_multiprocess_client", { QCoreApplication::applicationDirPath() + "/../client/" })); QVERIFY(clientProc.waitForStarted()); diff --git a/tests/auto/proxy_multiprocess/client/client.pro b/tests/auto/proxy_multiprocess/client/client.pro index 7a181a2..aad86e2 100644 --- a/tests/auto/proxy_multiprocess/client/client.pro +++ b/tests/auto/proxy_multiprocess/client/client.pro @@ -2,7 +2,7 @@ TEMPLATE = app QT += remoteobjects core testlib QT -= gui -TARGET = client +TARGET = proxy_multiprocess_client DESTDIR = ./ CONFIG += c++11 CONFIG -= app_bundle diff --git a/tests/auto/proxy_multiprocess/namespace.h b/tests/auto/proxy_multiprocess/namespace.h index 2d06e67..1b9b59e 100644 --- a/tests/auto/proxy_multiprocess/namespace.h +++ b/tests/auto/proxy_multiprocess/namespace.h @@ -1,3 +1,6 @@ +#ifndef __PROXY_MULTIPROCESS_NAMESPACE_H__ +#define __PROXY_MULTIPROCESS_NAMESPACE_H__ + #include <QMetaType> namespace NS @@ -13,3 +16,5 @@ namespace NS2 enum class NamespaceEnum : quint8 { Alpha=1, Bravo, Charlie }; Q_ENUM_NS(NamespaceEnum) } + +#endif // include guard diff --git a/tests/auto/proxy_multiprocess/server/server.pro b/tests/auto/proxy_multiprocess/server/server.pro index 02ca498..a56477b 100644 --- a/tests/auto/proxy_multiprocess/server/server.pro +++ b/tests/auto/proxy_multiprocess/server/server.pro @@ -2,7 +2,7 @@ TEMPLATE = app QT += remoteobjects core testlib QT -= gui -TARGET = server +TARGET = proxy_multiprocess_server DESTDIR = ./ CONFIG += c++11 CONFIG -= app_bundle diff --git a/tests/auto/proxy_multiprocess/tst/tst_proxy_multiprocess.cpp b/tests/auto/proxy_multiprocess/tst/tst_proxy_multiprocess.cpp index e7f382b..6973101 100644 --- a/tests/auto/proxy_multiprocess/tst/tst_proxy_multiprocess.cpp +++ b/tests/auto/proxy_multiprocess/tst/tst_proxy_multiprocess.cpp @@ -89,7 +89,7 @@ private slots: env.insert("TEMPLATED_REMOTING", "true"); } serverProc.setProcessEnvironment(env); - serverProc.start(findExecutable("server", { + serverProc.start(findExecutable("proxy_multiprocess_server", { QCoreApplication::applicationDirPath() + "/../server/" })); QVERIFY(serverProc.waitForStarted()); @@ -102,7 +102,7 @@ private slots: QProcess clientProc; clientProc.setProcessChannelMode(QProcess::ForwardedChannels); clientProc.setProcessEnvironment(env); - clientProc.start(findExecutable("client", { + clientProc.start(findExecutable("proxy_multiprocess_client", { QCoreApplication::applicationDirPath() + "/../client/" })); QVERIFY(clientProc.waitForStarted()); diff --git a/tests/auto/repc/pods/pods.pro b/tests/auto/repc/pods/pods.pro index c32fffa..dc7b717 100644 --- a/tests/auto/repc/pods/pods.pro +++ b/tests/auto/repc/pods/pods.pro @@ -1,5 +1,5 @@ CONFIG += testcase -TARGET = tst_pods +TARGET = tst_repc_pods QT += testlib remoteobjects QT -= gui diff --git a/tests/auto/restart/client/client.pro b/tests/auto/restart/client/client.pro index ce435c2..24a83b3 100644 --- a/tests/auto/restart/client/client.pro +++ b/tests/auto/restart/client/client.pro @@ -2,7 +2,7 @@ TEMPLATE = app QT += remoteobjects core testlib QT -= gui -TARGET = client +TARGET = restart_client DESTDIR = ./ CONFIG += c++11 CONFIG -= app_bundle diff --git a/tests/auto/restart/server/server.pro b/tests/auto/restart/server/server.pro index eefc7a5..4ad55ee 100644 --- a/tests/auto/restart/server/server.pro +++ b/tests/auto/restart/server/server.pro @@ -2,7 +2,7 @@ TEMPLATE = app QT += remoteobjects core testlib QT -= gui -TARGET = server +TARGET = restart_server DESTDIR = ./ CONFIG += c++11 CONFIG -= app_bundle @@ -14,6 +14,5 @@ SOURCES += main.cpp \ HEADERS += \ mytestserver.h - $$OUT_PWD/rep_subclass_source.h INCLUDEPATH += $$PWD diff --git a/tests/auto/restart/tst/tst_restart.cpp b/tests/auto/restart/tst/tst_restart.cpp index a3633fa..d76b3de 100644 --- a/tests/auto/restart/tst/tst_restart.cpp +++ b/tests/auto/restart/tst/tst_restart.cpp @@ -96,7 +96,7 @@ private slots: env.insert("RunMode", QVariant::fromValue(runMode).toString()); env.insert("ObjectMode", QVariant::fromValue(objectMode).toString()); serverProc.setProcessEnvironment(env); - serverProc.start(findExecutable("server", { + serverProc.start(findExecutable("restart_server", { QCoreApplication::applicationDirPath() + "/../server/" })); QVERIFY(serverProc.waitForStarted()); @@ -108,7 +108,7 @@ private slots: QProcess clientProc; clientProc.setProcessChannelMode(QProcess::ForwardedChannels); clientProc.setProcessEnvironment(env); - clientProc.start(findExecutable("client", { + clientProc.start(findExecutable("restart_client", { QCoreApplication::applicationDirPath() + "/../client/" })); QVERIFY(clientProc.waitForStarted()); @@ -123,7 +123,7 @@ private slots: QCOMPARE(serverProc.exitCode(), 0); qDebug() << "Restarting server"; serverProc.setProcessEnvironment(env); - serverProc.start(findExecutable("server", { + serverProc.start(findExecutable("restart_server", { QCoreApplication::applicationDirPath() + "/../server/" })); QVERIFY(serverProc.waitForStarted()); diff --git a/tools/repc/moc_copy/moc.pri b/tools/repc/moc_copy/moc.pri index b689a35..6d0ca8a 100644 --- a/tools/repc/moc_copy/moc.pri +++ b/tools/repc/moc_copy/moc.pri @@ -1,7 +1,7 @@ INCLUDEPATH += $$PWD -HEADERS = $$PWD/moc.h \ +HEADERS += $$PWD/moc.h \ $$PWD/preprocessor.h \ $$PWD/parser.h \ $$PWD/symbols.h \ @@ -9,7 +9,7 @@ HEADERS = $$PWD/moc.h \ $$PWD/utils.h \ $$PWD/generator.h \ $$PWD/outputrevision.h -SOURCES = $$PWD/moc.cpp \ +SOURCES += $$PWD/moc.cpp \ $$PWD/preprocessor.cpp \ $$PWD/generator.cpp \ $$PWD/parser.cpp \ |