summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.qmake.conf2
-rw-r--r--src/remoteobjects/qremoteobjectnode.cpp7
-rw-r--r--src/remoteobjects/qremoteobjectnode_p.h1
-rw-r--r--src/remoteobjects/qremoteobjectsourceio.cpp12
-rw-r--r--src/remoteobjects/qremoteobjectsourceio_p.h3
-rw-r--r--tests/auto/auto.pro3
-rw-r--r--tests/auto/integration/integration.pro3
-rw-r--r--tests/auto/modelview/modelview.pro1
-rw-r--r--tests/auto/modelview/tst_modelview.cpp14
9 files changed, 23 insertions, 23 deletions
diff --git a/.qmake.conf b/.qmake.conf
index c38da4b..6922eff 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -1,6 +1,6 @@
load(qt_build_config)
CONFIG += qt_example_installs
-MODULE_VERSION = 5.9.2
+MODULE_VERSION = 5.10.0
QTRO_SOURCE_TREE = $$PWD
diff --git a/src/remoteobjects/qremoteobjectnode.cpp b/src/remoteobjects/qremoteobjectnode.cpp
index 3c47fd1..408ac6a 100644
--- a/src/remoteobjects/qremoteobjectnode.cpp
+++ b/src/remoteobjects/qremoteobjectnode.cpp
@@ -309,8 +309,9 @@ bool QRemoteObjectNodePrivate::initConnection(const QUrl &address)
qROPrivDebug() << "Replica Connection isValid" << connection->isOpen();
QObject::connect(connection, SIGNAL(shouldReconnect(ClientIoDevice*)), q, SLOT(onShouldReconnect(ClientIoDevice*)));
connection->connectToServer();
- QObject::connect(connection, SIGNAL(readyRead()), &clientRead, SLOT(map()));
- clientRead.setMapping(connection, connection);
+ QObject::connect(connection, &ClientIoDevice::readyRead, q, [this, connection]() {
+ onClientRead(connection);
+ });
return true;
}
@@ -715,12 +716,10 @@ void QRemoteObjectNodePrivate::onClientRead(QObject *obj)
void QRemoteObjectNodePrivate::initialize()
{
- Q_Q(QRemoteObjectNode);
qRegisterMetaType<QRemoteObjectNode *>();
qRegisterMetaType<QRemoteObjectNode::ErrorCode>();
qRegisterMetaType<QAbstractSocket::SocketError>(); //For queued qnx error()
qRegisterMetaTypeStreamOperators<QVector<int> >();
- QObject::connect(&clientRead, SIGNAL(mapped(QObject*)), q, SLOT(onClientRead(QObject*)));
}
bool QRemoteObjectNodePrivate::checkSignatures(const QByteArray &a, const QByteArray &b)
diff --git a/src/remoteobjects/qremoteobjectnode_p.h b/src/remoteobjects/qremoteobjectnode_p.h
index 8a948f6..89d6bf8 100644
--- a/src/remoteobjects/qremoteobjectnode_p.h
+++ b/src/remoteobjects/qremoteobjectnode_p.h
@@ -118,7 +118,6 @@ public:
QMap<QString, SourceInfo> connectedSources;
QSet<ClientIoDevice*> pendingReconnect;
QSet<QUrl> requestedUrls;
- QSignalMapper clientRead;
QRemoteObjectRegistry *registry;
int retryInterval;
QBasicTimer reconnectTimer;
diff --git a/src/remoteobjects/qremoteobjectsourceio.cpp b/src/remoteobjects/qremoteobjectsourceio.cpp
index 17a6638..c7e8026 100644
--- a/src/remoteobjects/qremoteobjectsourceio.cpp
+++ b/src/remoteobjects/qremoteobjectsourceio.cpp
@@ -66,8 +66,6 @@ QRemoteObjectSourceIo::QRemoteObjectSourceIo(const QUrl &address, QObject *paren
}
connect(m_server.data(), &QConnectionAbstractServer::newConnection, this, &QRemoteObjectSourceIo::handleConnection);
- connect(&m_serverDelete, static_cast<void (QSignalMapper::*)(QObject *)>(&QSignalMapper::mapped), this, &QRemoteObjectSourceIo::onServerDisconnect);
- connect(&m_serverRead, static_cast<void (QSignalMapper::*)(QObject *)>(&QSignalMapper::mapped), this, &QRemoteObjectSourceIo::onServerRead);
}
QRemoteObjectSourceIo::~QRemoteObjectSourceIo()
@@ -250,10 +248,12 @@ void QRemoteObjectSourceIo::handleConnection()
ServerIoDevice *conn = m_server->nextPendingConnection();
m_connections.insert(conn);
- connect(conn, SIGNAL(disconnected()), &m_serverDelete, SLOT(map()));
- m_serverDelete.setMapping(conn, conn);
- connect(conn, SIGNAL(readyRead()), &m_serverRead, SLOT(map()));
- m_serverRead.setMapping(conn, conn);
+ connect(conn, &ServerIoDevice::disconnected, this, [this, conn]() {
+ onServerDisconnect(conn);
+ });
+ connect(conn, &ServerIoDevice::readyRead, this, [this, conn]() {
+ onServerRead(conn);
+ });
QRemoteObjectPackets::ObjectInfoList infos;
foreach (auto remoteObject, m_remoteObjects) {
diff --git a/src/remoteobjects/qremoteobjectsourceio_p.h b/src/remoteobjects/qremoteobjectsourceio_p.h
index b3045cd..f1f8520 100644
--- a/src/remoteobjects/qremoteobjectsourceio_p.h
+++ b/src/remoteobjects/qremoteobjectsourceio_p.h
@@ -57,7 +57,6 @@
#include <QIODevice>
#include <QScopedPointer>
-#include <QSignalMapper>
QT_BEGIN_NAMESPACE
@@ -95,8 +94,6 @@ public:
QSet<ServerIoDevice*> m_connections;
QHash<QObject *, QRemoteObjectSource*> m_objectToSourceMap;
QMap<QString, QRemoteObjectSource*> m_remoteObjects;
- QSignalMapper m_serverDelete;
- QSignalMapper m_serverRead;
QHash<ServerIoDevice*, QUrl> m_registryMapping;
QScopedPointer<QConnectionAbstractServer> m_server;
QRemoteObjectPackets::DataStreamPacket m_packet;
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index d4fba92..f942af4 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -10,6 +10,3 @@ sub_integration.depends = sub-localsockettestserver
SUBDIRS += benchmarks repc sub_integration integration_multiprocess modelview cmake pods repcodegenerator repparser \
sub_localsockettestserver \
modelreplica
-
-# QTBUG-60268
-boot2qt: SUBDIRS -= sub_integration modelview
diff --git a/tests/auto/integration/integration.pro b/tests/auto/integration/integration.pro
index 601d9ad..d241f67 100644
--- a/tests/auto/integration/integration.pro
+++ b/tests/auto/integration/integration.pro
@@ -6,3 +6,6 @@ qnx: SUBDIRS += qnx
local.path = local
tcp.path = tcp
qnx.path = qnx
+
+# QTBUG-61552
+boot2qt: SUBDIRS -= local
diff --git a/tests/auto/modelview/modelview.pro b/tests/auto/modelview/modelview.pro
index b89b500..b21c191 100644
--- a/tests/auto/modelview/modelview.pro
+++ b/tests/auto/modelview/modelview.pro
@@ -8,3 +8,4 @@ HEADERS += $$PWD/modeltest.h
contains(QT_CONFIG, c++11): CONFIG += c++11
+boot2qt: DEFINES += SLOW_MODELTEST
diff --git a/tests/auto/modelview/tst_modelview.cpp b/tests/auto/modelview/tst_modelview.cpp
index 071d164..c032959 100644
--- a/tests/auto/modelview/tst_modelview.cpp
+++ b/tests/auto/modelview/tst_modelview.cpp
@@ -36,8 +36,7 @@
#include <QStandardItemModel>
#include <QSortFilterProxyModel>
#include <QEventLoop>
-
-#include <cstdlib>
+#include <QRandomGenerator>
namespace {
@@ -401,7 +400,7 @@ QList<QStandardItem*> addChild(int numChilds, int nestingLevel)
int getRandomNumber(int min, int max)
{
- int res = std::rand();
+ int res = QRandomGenerator::get32() & INT_MAX;
const int diff = (max - min);
res = res % diff;
res += min;
@@ -650,7 +649,6 @@ void TestModelView::initTestCase()
hHeaderList << QStringLiteral("First Column with spacing") << QStringLiteral("Second Column with spacing");
m_sourceModel.setHorizontalHeaderLabels(hHeaderList);
- std::srand(0);
for (int i = 0; i < modelSize; ++i) {
QStandardItem *firstItem = new QStandardItem(QStringLiteral("FancyTextNumber %1").arg(i));
QStandardItem *secondItem = new QStandardItem(QStringLiteral("FancyRow2TextNumber %1").arg(i));
@@ -1066,6 +1064,12 @@ void TestModelView::testServerInsertDataTree()
compareData(&testTreeModel, model.data());
}
+#ifdef SLOW_MODELTEST
+#define MODELTEST_WAIT_TIME 10000
+#else
+#define MODELTEST_WAIT_TIME
+#endif
+
void TestModelView::testModelTest()
{
QScopedPointer<QAbstractItemModelReplica> repModel( m_client.acquireModel(QStringLiteral("test")));
@@ -1073,7 +1077,7 @@ void TestModelView::testModelTest()
FetchData f(repModel.data());
f.addAll();
- QVERIFY(f.fetchAndWait());
+ QVERIFY(f.fetchAndWait(MODELTEST_WAIT_TIME));
Q_UNUSED(test);
}