diff options
Diffstat (limited to 'src/webchannel')
-rw-r--r-- | src/webchannel/qmetaobjectpublisher.cpp | 4 | ||||
-rw-r--r-- | src/webchannel/signalhandler_p.h | 4 |
2 files changed, 4 insertions, 4 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 ¬ifySignal = 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) { |