aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/webchannel/qmetaobjectpublisher.cpp4
-rw-r--r--src/webchannel/signalhandler_p.h4
-rw-r--r--tests/auto/webchannel/tst_webchannel.cpp6
3 files changed, 7 insertions, 7 deletions
diff --git a/src/webchannel/qmetaobjectpublisher.cpp b/src/webchannel/qmetaobjectpublisher.cpp
index e27d620..b1fed71 100644
--- a/src/webchannel/qmetaobjectpublisher.cpp
+++ b/src/webchannel/qmetaobjectpublisher.cpp
@@ -152,7 +152,7 @@ QMetaType resultTypeOfQFuture(QByteArrayView typeName)
if (!typeName.startsWith("QFuture<") || !typeName.endsWith('>'))
return {};
- return QMetaType::fromName(typeName.sliced(8, typeName.length() - 9));
+ return QMetaType::fromName(typeName.sliced(8, typeName.size() - 9));
}
template<typename Func>
@@ -302,7 +302,7 @@ QJsonObject QMetaObjectPublisher::classInfoForObject(const QObject *object, QWeb
// optimize: compress the common propertyChanged notification names, just send a 1
const QByteArray &notifySignal = prop.notifySignal().name();
static const QByteArray changedSuffix = QByteArrayLiteral("Changed");
- if (notifySignal.length() == changedSuffix.length() + propertyName.length() &&
+ if (notifySignal.size() == changedSuffix.size() + propertyName.size() &&
notifySignal.endsWith(changedSuffix) && notifySignal.startsWith(prop.name()))
{
signalInfo.append(1);
diff --git a/src/webchannel/signalhandler_p.h b/src/webchannel/signalhandler_p.h
index 876413d..f5a378a 100644
--- a/src/webchannel/signalhandler_p.h
+++ b/src/webchannel/signalhandler_p.h
@@ -195,9 +195,9 @@ void SignalHandler<Receiver>::dispatch(const QObject *object, const int signalId
}
const QList<int> &argumentTypes = *signalIt;
QVariantList arguments;
- arguments.reserve(argumentTypes.count());
+ arguments.reserve(argumentTypes.size());
// TODO: basic overload resolution based on number of arguments?
- for (int i = 0; i < argumentTypes.count(); ++i) {
+ for (int i = 0; i < argumentTypes.size(); ++i) {
const QMetaType::Type type = static_cast<QMetaType::Type>(argumentTypes.at(i));
QVariant arg;
if (type == QMetaType::QVariant) {
diff --git a/tests/auto/webchannel/tst_webchannel.cpp b/tests/auto/webchannel/tst_webchannel.cpp
index 780d045..d628937 100644
--- a/tests/auto/webchannel/tst_webchannel.cpp
+++ b/tests/auto/webchannel/tst_webchannel.cpp
@@ -976,7 +976,7 @@ void TestWebChannel::testWrapObjectWithMultipleTransports()
pub->wrapResult(QVariant::fromValue(&obj), dummyTransport);
pub->wrapResult(QVariant::fromValue(&obj), dummyTransport2);
- QCOMPARE(pub->transportedWrappedObjects.count(), 2);
+ QCOMPARE(pub->transportedWrappedObjects.size(), 2);
}
void TestWebChannel::testJsonToVariant_data()
@@ -1545,9 +1545,9 @@ void TestWebChannel::qtbug46548_overriddenProperties()
QSignalSpy spy(&engine, &TestJSEngine::channelSetupReady);
connect(&engine, &TestJSEngine::channelSetupReady, TestSubclassedFunctor(&engine));
engine.initWebChannelJS();
- if (!spy.count())
+ if (!spy.size())
spy.wait();
- QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.size(), 1);
QJSValue subclassedTestObject = engine.evaluate("channel.objects[\"subclassedTestObject\"]");
QVERIFY(subclassedTestObject.isObject());